Class MessageDescription

java.lang.Object
org.odpi.openmetadata.reports.messages.MessageDescription

public class MessageDescription extends Object
MessageDescription captures the content of a single message definition found in a message set. A message definition is one of the enum constants of the message set. Its values are literal constants in the source of the message set and so they are extracted directly from the source file.
  • Method Details

    • getEnumConstantName

      public String getEnumConstantName()
      Return the name of the enum constant that defines this message. This is the name that a developer uses when they raise the message.
      Returns:
      java identifier
    • getMessageId

      public String getMessageId()
      Return the unique identifier of the message. This is the value that appears in the log or exception.
      Returns:
      message identifier
    • getMessageTemplate

      public String getMessageTemplate()
      Return the message text. The text includes {n} markers showing where the message inserts are placed.
      Returns:
      message template
    • getSystemAction

      public String getSystemAction()
      Return the description of what the system did when this situation occurred.
      Returns:
      system action
    • getUserAction

      public String getUserAction()
      Return the description of what the caller should do in response to this message.
      Returns:
      user action
    • getHttpErrorCode

      public int getHttpErrorCode()
      Return the HTTP error code returned when this message is used in a REST API response.
      Returns:
      HTTP status code; zero if this is not an exception message
    • getSeverity

      public String getSeverity()
      Return the name of the audit log severity used when this message is logged.
      Returns:
      severity name; null if this is not an audit log message
    • getUrl

      public String getUrl()
      Return the link to further reading about the component or concept behind this message.
      Returns:
      url; null if the message definition does not supply one
    • getMessageInserts

      public List<Integer> getMessageInserts()
      Return the numbers of the message inserts used in the message template, in ascending order. For example, a template of "Connector {1} failed for asset {0}" returns [0, 1].
      Returns:
      ordered list of insert numbers
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Object
      Returns:
      print out of variables in a JSON-style