Enum Class ErrorMessageFormat

java.lang.Object
java.lang.Enum<ErrorMessageFormat>
io.github.qubitpi.athena.config.ErrorMessageFormat
All Implemented Interfaces:
MessageFormatter, Serializable, Comparable<ErrorMessageFormat>, Constable

public enum ErrorMessageFormat extends Enum<ErrorMessageFormat> implements MessageFormatter
Common message formats for errors.
  • Enum Constant Details

    • CONFIG_NOT_FOUND

      public static final ErrorMessageFormat CONFIG_NOT_FOUND
      When a SystemConfig doesn't find a config key.
    • SYSTEM_CONFIG_LOADING_ERROR_MESSAGE

      public static final ErrorMessageFormat SYSTEM_CONFIG_LOADING_ERROR_MESSAGE
      When SystemConfig initialization fails.
    • EMPTY_LIST

      public static final ErrorMessageFormat EMPTY_LIST
      When a List instance is empty and is not allowed.
    • MISSING_MAP_KEY

      public static final ErrorMessageFormat MISSING_MAP_KEY
      When a Map is missing a required key.
    • JSON_DESERIALIZATION_ERROR

      public static final ErrorMessageFormat JSON_DESERIALIZATION_ERROR
      When an invalid JSON is seen.
    • INVALID_GRAPHQL_REQUEST

      public static final ErrorMessageFormat INVALID_GRAPHQL_REQUEST
      When an invalid GraphQL query is seen.
    • META_DATA_NOT_FOUND

      public static final ErrorMessageFormat META_DATA_NOT_FOUND
      When meta data not found.
  • Method Details

    • values

      public static ErrorMessageFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ErrorMessageFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getMessageFormat

      public String getMessageFormat()
      Description copied from interface: MessageFormatter
      Returns the message used for publishing out of the system, typically in error messages.
      Specified by:
      getMessageFormat in interface MessageFormatter
      Returns:
      the format for a message
    • getLoggingFormat

      public String getLoggingFormat()
      Description copied from interface: MessageFormatter
      Returns the message format used for logging.
      Specified by:
      getLoggingFormat in interface MessageFormatter
      Returns:
      the format for a log message