java.lang.Object
church.i18n.processing.message.ContextInfo
- All Implemented Interfaces:
Serializable
Holder of contextual info of the
ProcessingMessage. When the message is constructed, the
place where it occurs is usually the place with the most contextual information that can be added
to the message. Such information could be useful either for user either for machine processing.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionContextInfo(@NotNull String name, @Nullable ContextValue context, @Nullable ContextValue help, @Nullable I18nMessage message, @Nullable SecurityLevel securityLevel) Constructor for contextual information associated with message. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ContextInfoBuilderbuilder(@NotNull ContextInfo copy) Creates a newContextInfoBuilderby copying values from existing instance.boolean@Nullable ContextValue@Nullable ContextValuegetHelp()@Nullable I18nMessage@NotNull StringgetName()@Nullable SecurityPolicyinthashCode()static @NotNull ContextInfoBuilderContextual info builder with minimal required information - the name of contextual information.static @Nullable ContextInfoof(@NotNull String name, @Nullable ContextValue context) New instance creator with only the name and contextual information.static @NotNull ContextInfoof(@NotNull String name, @Nullable ContextValue context, @Nullable ContextValue help, @Nullable I18nMessage message) Constructor for full contextual info specification.static @NotNull ContextInfoof(@NotNull String name, @Nullable ContextValue context, @Nullable I18nMessage message) New instance creator with the name, contextual information and message.@NotNull StringtoString()
-
Constructor Details
-
ContextInfo
public ContextInfo(@NotNull @NotNull String name, @Nullable @Nullable ContextValue context, @Nullable @Nullable ContextValue help, @Nullable @Nullable I18nMessage message, @Nullable @Nullable SecurityLevel securityLevel) Constructor for contextual information associated with message.- Parameters:
name- Name or identification of an contextual information. Should be unique per message. E.g. contains the name of invalid property value.context- Contextual information associated with the message. May contain e.g. invalid value from validation and it's type.help- Help information associated with invalid value. May contain e.g. regular expression that value needs to meet; value range information; or so.message- Human-readable message describing the problem associated with the context info. E.g.: "E-mail address 'info@@i18n.church' contains context character at position [6]."securityLevel- The sensitivity level of this contextual information.
-
-
Method Details
-
builder
Creates a newContextInfoBuilderby copying values from existing instance.- Parameters:
copy- Context info to copy.- Returns:
- A new
ContextInfoBuilderwith copied values.
-
of
@Nullable public static @Nullable ContextInfo of(@NotNull @NotNull String name, @Nullable @Nullable ContextValue context) New instance creator with only the name and contextual information.- Parameters:
name- Name or identification of an contextual information. Should be unique per message. E.g. contains the name of invalid property value.context- Contextual information associated with the message. May contain e.g. invalid value from validation and it's type.- Returns:
- A new
ContextInfoinstance with name and contextual information only.
-
of
@NotNull public static @NotNull ContextInfo of(@NotNull @NotNull String name, @Nullable @Nullable ContextValue context, @Nullable @Nullable I18nMessage message) New instance creator with the name, contextual information and message.- Parameters:
name- Name or identification of an contextual information. Should be unique per message. E.g. contains the name of invalid property value.context- Contextual information associated with the message. May contain e.g. invalid value from validation and it's type.message- Human-readable message describing the problem associated with the context info. E.g.: "E-mail address 'info@@i18n.church' contains context character at position [6]."- Returns:
- A new
ContextInfoinstance with name, contextual information and message.
-
of
@NotNull public static @NotNull ContextInfo of(@NotNull @NotNull String name, @Nullable @Nullable ContextValue context, @Nullable @Nullable ContextValue help, @Nullable @Nullable I18nMessage message) Constructor for full contextual info specification.- Parameters:
name- Name or identification of contextual information. Should be unique per message. E.g. contains the name of invalid property value.context- Contextual information associated with the message. May contain e.g. invalid value from validation and it's type.help- Help information associated with invalid value. May contain e.g. regular expression that value needs to meet; value range information; or so.message- Human-readable message describing the problem associated with the context info. E.g.: "E-mail address 'info@@i18n.church' contains context character at position [6]."- Returns:
- A new
ContextInfoinstance with name, message, context and help information.
-
of
Contextual info builder with minimal required information - the name of contextual information.- Parameters:
name- Name or identification of contextual information. Should be unique per message. E.g. contains the name of invalid property value.- Returns:
- A new
ContextInfoBuilderwith name.
-
getContext
-
getHelp
-
getMessage
-
getName
-
getSecurityLevel
-
hashCode
public int hashCode() -
equals
-
toString
-