Class SingleLocalizableMessage

java.lang.Object
com.evolveum.midpoint.util.SingleLocalizableMessage
All Implemented Interfaces:
LocalizableMessage, ShortDumpable, Serializable

public class SingleLocalizableMessage extends Object implements LocalizableMessage
This class is final and must remain so, as it's not cloneable.
Author:
semancik
See Also:
  • Constructor Details

    • SingleLocalizableMessage

      public SingleLocalizableMessage(String key)
    • SingleLocalizableMessage

      public SingleLocalizableMessage(String key, Object[] args)
    • SingleLocalizableMessage

      public SingleLocalizableMessage(String key, Object[] args, LocalizableMessage fallbackLocalizableMessage)
    • SingleLocalizableMessage

      public SingleLocalizableMessage(String key, Object[] args, String fallbackMessage)
  • Method Details

    • forEnum

      @Experimental public static SingleLocalizableMessage forEnum(@NotNull @NotNull Enum<?> value)
    • getKey

      public String getKey()
      Message key. This is the key in localization files that determine message or message template.
    • getArgs

      public Object[] getArgs()
      Message template arguments.
    • getFallbackMessage

      public String getFallbackMessage()
      Fallback message. This message is used in case that the message key cannot be found in the localization files.
      Specified by:
      getFallbackMessage in interface LocalizableMessage
    • getFallbackLocalizableMessage

      public LocalizableMessage getFallbackLocalizableMessage()
      Fallback localization message. This message is used in case that the message key cannot be found in the localization files.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • shortDump

      public void shortDump(StringBuilder sb)
      Description copied from interface: ShortDumpable
      Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.
      Specified by:
      shortDump in interface ShortDumpable
      Parameters:
      sb - StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface LocalizableMessage