@Service(value="blBLCMessageUtils") public class BLCMessageUtils extends Object implements org.springframework.context.ApplicationContextAware
Modifier and Type | Field and Description |
---|---|
protected static org.springframework.context.ApplicationContext |
applicationContext |
Constructor and Description |
---|
BLCMessageUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getMessage(String code)
Returns the message requested by the code with no arguments and the currently set Java Locale on
the
BroadleafRequestContext as returned by BroadleafRequestContext.getJavaLocale() |
static String |
getMessage(String code,
Object... args)
Returns the message requested by the code with the specified arguments and the currently set Java Locale on
the
BroadleafRequestContext as returned by BroadleafRequestContext.getJavaLocale() |
protected static org.springframework.context.MessageSource |
getMessageSource() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
protected static org.springframework.context.ApplicationContext applicationContext
public static String getMessage(String code)
BroadleafRequestContext
as returned by BroadleafRequestContext.getJavaLocale()
code
- public static String getMessage(String code, Object... args)
BroadleafRequestContext
as returned by BroadleafRequestContext.getJavaLocale()
code
- protected static org.springframework.context.MessageSource getMessageSource()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2022. All rights reserved.