Package org.molgenis.i18n
Class ContextMessageSourceImpl
- java.lang.Object
-
- org.molgenis.i18n.ContextMessageSourceImpl
-
- All Implemented Interfaces:
ContextMessageSource
@Component public class ContextMessageSourceImpl extends java.lang.Object implements ContextMessageSource
-
-
Constructor Summary
Constructors Constructor Description ContextMessageSourceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMessage(java.lang.String code)Returns the message in the locale of the current user.java.lang.StringgetMessage(java.lang.String code, java.lang.Object[] args)Returns the message in the locale of the current user.
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage(java.lang.String code)
Description copied from interface:ContextMessageSourceReturns the message in the locale of the current user.- Specified by:
getMessagein interfaceContextMessageSource- Parameters:
code- the code to lookup up, such as 'calculator.noRateSet'- Returns:
- the resolved message, never null
-
getMessage
public java.lang.String getMessage(java.lang.String code, @Nullable @CheckForNull java.lang.Object[] args)Description copied from interface:ContextMessageSourceReturns the message in the locale of the current user.- Specified by:
getMessagein interfaceContextMessageSource- Parameters:
code- the code to lookup up, such as 'calculator.noRateSet'args- an array of arguments that will be filled in for params within the message (params look like "{0}", "{1,date}", "{2,time}" within a message), * ornullif none.- Returns:
- the resolved message, never null
-
-