| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Helper class for easy access to messages from a MessageSource, providing various overloaded getMessage methods.
Available from ApplicationObjectSupport, but also reusable as a standalone helper to delegate to in application objects.
| Constructor Summary | |
MessageSourceAccessor(MessageSource messageSource)Create a new MessageSourceAccessor, using the system Locale as default Locale. | |
MessageSourceAccessor(MessageSource messageSource, Locale defaultLocale)Create a new MessageSourceAccessor, using the given default locale. | |
| Method Summary | |
String | getMessage(String code, String defaultMessage)Retrieve the message for the given code and the default Locale. |
String | getMessage(String code, String defaultMessage, Locale locale)Retrieve the message for the given code and the given Locale. |
String | getMessage(String code, Object[] args, String defaultMessage)Retrieve the message for the given code and the default Locale. |
String | getMessage(String code, Object[] args, String defaultMessage, Locale locale)Retrieve the message for the given code and the given Locale. |
String | getMessage(String code)Retrieve the message for the given code and the default Locale. |
String | getMessage(String code, Locale locale)Retrieve the message for the given code and the given Locale. |
String | getMessage(String code, Object[] args)Retrieve the message for the given code and the default Locale. |
String | getMessage(String code, Object[] args, Locale locale)Retrieve the message for the given code and the given Locale. |
String | getMessage(MessageSourceResolvable resolvable)Retrieve the given MessageSourceResolvable (e.g. |
String | getMessage(MessageSourceResolvable resolvable, Locale locale)Retrieve the given MessageSourceResolvable (e.g. |
| Constructor Detail |
public MessageSourceAccessor(MessageSource messageSource)
public MessageSourceAccessor(MessageSource messageSource, Locale defaultLocale)
| Method Detail |
public String getMessage(String code, String defaultMessage)
public String getMessage(String code, String defaultMessage, Locale locale)
public String getMessage(String code, Object[] args, String defaultMessage)
public String getMessage(String code, Object[] args, String defaultMessage, Locale locale)
public String getMessage(String code)
throws org.springframework.context.NoSuchMessageException
public String getMessage(String code, Locale locale)
throws org.springframework.context.NoSuchMessageException
public String getMessage(String code, Object[] args)
throws org.springframework.context.NoSuchMessageException
public String getMessage(String code, Object[] args, Locale locale)
throws org.springframework.context.NoSuchMessageException
public String getMessage(MessageSourceResolvable resolvable)
throws org.springframework.context.NoSuchMessageException
public String getMessage(MessageSourceResolvable resolvable, Locale locale)
throws org.springframework.context.NoSuchMessageException
| Association Links |
to Class java.util.Locale
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||