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.ApplicationContext
Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getMessage
(String code) Deprecated.Returns the message requested by the code with no arguments and the currently set Java Locale on theBroadleafRequestContext
as returned byBroadleafRequestContext.getJavaLocale()
static String
getMessage
(String code, Object... args) Deprecated.Returns the message requested by the code with the specified arguments and the currently set Java Locale on theBroadleafRequestContext
as returned byBroadleafRequestContext.getJavaLocale()
protected static org.springframework.context.MessageSource
Deprecated.void
setApplicationContext
(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 theBroadleafRequestContext
as 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 theBroadleafRequestContext
as 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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
MessageService
should be used instead