Enum Class ServerOpsErrorCode

java.lang.Object
java.lang.Enum<ServerOpsErrorCode>
org.odpi.openmetadata.serveroperations.ffdc.ServerOpsErrorCode
All Implemented Interfaces:
Serializable, Comparable<ServerOpsErrorCode>, Constable, ExceptionMessageSet

public enum ServerOpsErrorCode extends Enum<ServerOpsErrorCode> implements ExceptionMessageSet
The ServerOpsErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMAG Server It is used in conjunction with OMAG Exceptions, both Checked and Runtime (unchecked). The 5 fields in the enum are:
  • HTTP Error Code - for translating between REST and JAVA - Typically the numbers used are:
    • 500 - internal error
    • 501 - not implemented
    • 503 - service not available
    • 400 - invalid parameters
    • 401 - unauthorized
    • 404 - not found
    • 405 - method not allowed
    • 409 - data conflict errors - eg item already defined
  • Error Message Identifier - to uniquely identify the message
  • Error Message Text - includes placeholder to allow additional values to be captured
  • SystemAction - describes the result of the error
  • UserAction - describes how a user should correct the error
  • Enum Constant Details

    • NULL_ACCESS_SERVICE_ADMIN_CLASS

      public static final ServerOpsErrorCode NULL_ACCESS_SERVICE_ADMIN_CLASS
      SERVER-OPS-400-011 - The OMAG server {0} has been passed a null admin services class name for access service {1}
    • BAD_ACCESS_SERVICE_ADMIN_CLASS

      public static final ServerOpsErrorCode BAD_ACCESS_SERVICE_ADMIN_CLASS
      SERVER-OPS-400-012 - The OMAG server {0} has been passed an invalid admin services class name {1} for access service {2}
    • BAD_MAX_PAGE_SIZE

      public static final ServerOpsErrorCode BAD_MAX_PAGE_SIZE
      SERVER-OPS-400-014 - The OMAG server {0} has been passed an invalid maximum page size of {1}
    • ENTERPRISE_TOPIC_START_FAILED

      public static final ServerOpsErrorCode ENTERPRISE_TOPIC_START_FAILED
      SERVER-OPS-400-015 - The OMAG server {0} is unable to start the {1} enterprise OMRS topic connector, {2} exception with error message {3} occurred
    • NO_EVENT_BUS_SET

      public static final ServerOpsErrorCode NO_EVENT_BUS_SET
      SERVER-OPS-400-017 - The OMAG server {0} is unable to add open metadata services until the event bus is configured
    • EMPTY_CONFIGURATION

      public static final ServerOpsErrorCode EMPTY_CONFIGURATION
      SERVER-OPS-400-019 - OMAG server {0} has been called with a configuration document that has no services configured
    • NULL_VIEW_SERVICE_ADMIN_CLASS

      public static final ServerOpsErrorCode NULL_VIEW_SERVICE_ADMIN_CLASS
      SERVER-OPS-400-029 - The View Server {0} has been passed a null admin services class name for view service {1}
    • BAD_VIEW_SERVICE_ADMIN_CLASS

      public static final ServerOpsErrorCode BAD_VIEW_SERVICE_ADMIN_CLASS
      SERVER-OPS-400-030 - The View Server {0} has been passed an invalid admin services class name {1} for view service {2}
    • OLD_CONFIGURATION

      public static final ServerOpsErrorCode OLD_CONFIGURATION
      SERVER-OPS-400-050 - The OMAG Server {0} has been passed configuration which contains the following obsolete section {1}
    • UNEXPECTED_EXCEPTION

      public static final ServerOpsErrorCode UNEXPECTED_EXCEPTION
      SERVER-OPS-500-001 - Method {1} for OMAG server {0} returned an unexpected {2} exception with message {3}
    • UNEXPECTED_INITIALIZATION_EXCEPTION

      public static final ServerOpsErrorCode UNEXPECTED_INITIALIZATION_EXCEPTION
      SERVER-OPS-500-004 - The {0} service detected an unexpected {1} exception with message {2} during initialization
    • CLIENT_SIDE_REST_API_ERROR

      public static final ServerOpsErrorCode CLIENT_SIDE_REST_API_ERROR
      SERVER-OPS-503-001 - A client-side exception was received from API call {0} to OMAG Server Platform at {1}. The error message was {2}
  • Method Details

    • values

      public static ServerOpsErrorCode[] 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 ServerOpsErrorCode 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
    • getMessageDefinition

      public ExceptionMessageDefinition getMessageDefinition()
      Retrieve a message definition object for an exception. This method is used when there are no message inserts.
      Specified by:
      getMessageDefinition in interface ExceptionMessageSet
      Returns:
      message definition object.
    • getMessageDefinition

      public ExceptionMessageDefinition getMessageDefinition(String... params)
      Retrieve a message definition object for an exception. This method is used when there are values to be inserted into the message.
      Specified by:
      getMessageDefinition in interface ExceptionMessageSet
      Parameters:
      params - array of parameters (all strings). They are inserted into the message according to the numbering in the message text.
      Returns:
      message definition object.
    • toString

      public String toString()
      JSON-style toString
      Overrides:
      toString in class Enum<ServerOpsErrorCode>
      Returns:
      string of property names and values for this enum