Class BLCMessageUtils
java.lang.Object
org.broadleafcommerce.common.util.BLCMessageUtils
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Deprecated
@Service("blBLCMessageUtils")
public class BLCMessageUtils
extends Object
implements org.springframework.context.ApplicationContextAware
Deprecated.
Convenience class to faciliate getting internationalized messages.
Note that this class is scanned as a bean to pick up the applicationContext, but the methods this class provides should be invoked statically.
- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.springframework.context.ApplicationContextDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetMessage(String code) Deprecated.Returns the message requested by the code with no arguments and the currently set Java Locale on theBroadleafRequestContextas returned byBroadleafRequestContext.getJavaLocale()static StringgetMessage(String code, Object... args) Deprecated.Returns the message requested by the code with the specified arguments and the currently set Java Locale on theBroadleafRequestContextas returned byBroadleafRequestContext.getJavaLocale()protected static org.springframework.context.MessageSourceDeprecated.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Deprecated.
-
Field Details
-
applicationContext
protected static org.springframework.context.ApplicationContext applicationContextDeprecated.
-
-
Constructor Details
-
BLCMessageUtils
public BLCMessageUtils()Deprecated.
-
-
Method Details
-
getMessage
Deprecated.Returns the message requested by the code with no arguments and the currently set Java Locale on theBroadleafRequestContextas returned byBroadleafRequestContext.getJavaLocale()- Parameters:
code-- Returns:
- the message
-
getMessage
Deprecated.Returns the message requested by the code with the specified arguments and the currently set Java Locale on theBroadleafRequestContextas returned byBroadleafRequestContext.getJavaLocale()- Parameters:
code-- Returns:
- the message
-
getMessageSource
protected static org.springframework.context.MessageSource getMessageSource()Deprecated.- Returns:
- the "messageSource" bean from the application context
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException Deprecated.- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
MessageServiceshould be used instead