public class FCMessage extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
FCMessage.ESeverity |
Constructor and Description |
---|
FCMessage(FCMessage.ESeverity severity,
String i18nMessage,
Function<Locale,Serializable[]> params)
Use this instead of
FCMessage(ESeverity, String, Serializable...) in case the parameters depend on the
locale as well. |
FCMessage(FCMessage.ESeverity severity,
String i18nMessage,
Serializable... params) |
FCMessage(FCMessage.ESeverity severity,
String i18nTitle,
String i18nMessage,
Function<Locale,Serializable[]> params)
Use this instead of
FCMessage(ESeverity, String, String, Serializable...) in case the parameters depend on
the locale as well. |
FCMessage(FCMessage.ESeverity severity,
String i18nTitle,
String i18nMessage,
Serializable... params) |
Modifier and Type | Method and Description |
---|---|
String |
getI18nMessage() |
String |
getI18nTitle() |
Serializable[] |
getParams()
Prefer
getParams(Locale) if the locale is known. |
Serializable[] |
getParams(Locale locale)
The parameters of the message may depend on the locale as well.
|
FCMessage.ESeverity |
getSeverity() |
public FCMessage(FCMessage.ESeverity severity, String i18nMessage, Serializable... params)
severity
- The severity of this message.i18nMessage
- i18n key of the message details to be shown.params
- Optional parameters for the message. Occurrences of {0}
,
{1}
in the message are replaced with these parameters.public FCMessage(FCMessage.ESeverity severity, String i18nMessage, Function<Locale,Serializable[]> params)
FCMessage(ESeverity, String, Serializable...)
in case the parameters depend on the
locale as well. This constructor creates a message with no title (summary).severity
- The severity of this message.i18nMessage
- i18n key of the message details to be shown.params
- Function that receives the desired locale and returns the localized parameters. Use Localizer
to retrieve i18n strings for the given locale.public FCMessage(FCMessage.ESeverity severity, String i18nTitle, String i18nMessage, Serializable... params)
severity
- The severity of this message.i18nTitle
- i18n key of the message summary to be shown.i18nMessage
- i18n key of the message details to be shown.params
- Function that receives the desired locale and returns the localized parameters. Use Localizer
to retrieve i18n strings for the given locale.public FCMessage(FCMessage.ESeverity severity, String i18nTitle, String i18nMessage, Function<Locale,Serializable[]> params)
FCMessage(ESeverity, String, String, Serializable...)
in case the parameters depend on
the locale as well.severity
- The severity of this message.i18nTitle
- i18n key of the message summary to be shown.i18nMessage
- i18n key of the message details to be shown.params
- Function that receives the desired locale and returns the localized parameters. Use Localizer
to retrieve i18n strings for the given locale.public String getI18nTitle()
public String getI18nMessage()
public Serializable[] getParams(Locale locale)
locale
- The desired locale.public Serializable[] getParams()
getParams(Locale)
if the locale is known.public FCMessage.ESeverity getSeverity()
Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.