Class ExceptionMessageDefinition

java.lang.Object
org.odpi.openmetadata.frameworks.auditlog.messagesets.MessageDefinition
org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition

public class ExceptionMessageDefinition extends MessageDefinition
ExceptionMessageDefinition extends MessageDefinition to provide a container that describes a single instance of a message for an exception.
  • Constructor Details

    • ExceptionMessageDefinition

      public ExceptionMessageDefinition(int httpErrorCode, String messageId, String messageTemplate, String systemAction, String userAction)
      Constructor to save all the fixed values of a message. This is typically populated from an Enum message set. The constructor passes most values to the super class and just retains the additional value for the exception.
      Parameters:
      httpErrorCode - the HTTP code that describes the nature of the error
      messageId - unique identifier for the message
      messageTemplate - text for the message
      systemAction - description of the action taken by the system when the condition happened
      userAction - instructions for resolving the situation, if any
    • ExceptionMessageDefinition

      public ExceptionMessageDefinition(int httpErrorCode, String messageId, String messageTemplate, String systemAction, String userAction, String url)
      Constructor to save all the fixed values of a message, including a link to further reading. This is typically populated from an Enum message set. The constructor passes most values to the super class and just retains the additional value for the exception.
      Parameters:
      httpErrorCode - the HTTP code that describes the nature of the error
      messageId - unique identifier for the message
      messageTemplate - text for the message
      systemAction - description of the action taken by the system when the condition happened
      userAction - instructions for resolving the situation, if any
      url - link to a page that describes the component or concept behind this message - null if there is no suitable page.
  • Method Details

    • getHttpErrorCode

      public int getHttpErrorCode()
      Return the HTTP code that describes the nature of the exception.
      Returns:
      integer code
    • toString

      public String toString()
      JSON-style toString.
      Overrides:
      toString in class MessageDefinition
      Returns:
      list of properties and their values.