Package io.vertigo.core.locale
Class LocaleMessageText
java.lang.Object
io.vertigo.core.locale.LocaleMessageText
- All Implemented Interfaces:
Serializable
A Text that can be externalized in a resource file,
based on the application's configuration settings.
If the label is not found, the display is
- Author:
- npiedeloup, pchretien
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionFormat message with parameters.Format message with parameters.static LocaleMessageTextof(LocaleMessageKey key, Serializable... params) Static Builder of a messageText by its key.static LocaleMessageTextof(String msg, Serializable... params) Static Builder of a messageText by its default message.static LocaleMessageTextofDefaultMsg(String defaultMsg, LocaleMessageKey key, Serializable... params) Static Builder of a messageText by its default message.toString()
-
Method Details
-
of
Static Builder of a messageText by its key.- Parameters:
key- Key of the resource- Returns:
- the messageText
-
of
Static Builder of a messageText by its default message.- Parameters:
msg- Default message (unformatted) of the resource- Returns:
- the messageText
-
ofDefaultMsg
public static LocaleMessageText ofDefaultMsg(String defaultMsg, LocaleMessageKey key, Serializable... params) Static Builder of a messageText by its default message.- Parameters:
defaultMsg- Default message (unformatted) of the resource- Returns:
- the messageText
-
getDisplayOpt
Format message with parameters. No exception thrown!!- Returns:
- Formatted message, if exists.
-
getDisplay
Format message with parameters. If nothing is found, return a "panic message" displaying what is missing. No exception thrown!!- Returns:
- Formatted message.
-
toString
-