Enum Class OMAGCommonErrorCode

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

public enum OMAGCommonErrorCode extends Enum<OMAGCommonErrorCode> implements ExceptionMessageSet
The OMAGCommonErrorCode is used to define first failure data capture (FFDC) for common errors. It belongs to the FFDC Services module and should not be used by other modules. The 5 fields in the enum are:
  • HTTP Error Code - for translating between REST and JAVA. Typically the numbers used are:
    • 500 - internal error
    • 400 - invalid parameters
    • 403 - forbidden
    • 404 - not found
    • 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 consumer should correct the error
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    OMAG-COMMON-400-019 - The type name {0} passed on method {1} of service {2} is not a sub-type of {3}
    OMAG-COMMON-400-023 - Method {0} of service {1} is unable to delete {2} identified by {3} because it is still in use.
    OMAG-COMMON-503-001 - A client-side exception was received from API call {0} to OMAG Server {1} at {2}.
    OMAG-COMMON-404-001 - The {0} method has retrieved an instance for unique identifier (guid) {1} which is of type {2} rather than type {3}
    OMAG-COMMON-400-030 - The {0} operation is only supported by {1} servers and server {2} is a {3}
    OMAG-COMMON-400-029 - The properties object passed on the {0} operation is either null or not of the correct {1} class
    OMAG-COMMON-400-028 - The search string passed on the {0} parameter of the {1} operation is invalid and results in a {2} exception when executed.
    OMAG-COMMON-400-010 - The number of records to return, {0}, passed on the {1} parameter of the {2} operation, is greater than the allowable maximum of {3}
    OMAG-COMMON-500-001 - Method {0} called by user {1} to OMAG Server {2} is not implemented in service {3}
    OMAG-COMMON-400-009 - The page size {0} for the results, passed on the {1} parameter of the {2} operation, is negative
    OMAG-COMMON-400-008 - The starting point for the results {0}, passed on the {1} parameter of the {2} operation, is negative
    OMAG-COMMON-400-017 - An request by user {0} to method {1} on server {2} had no request body
    OMAG-COMMON-400-031 - A request by user {0} to method {1} on server {2} had no request body.
    OMAG-COMMON-400-027 - The {0} element {1} is expected to be an anchor entity but is in fact anchored to {2}.
    OMAG-COMMON-400-020 - Asset {0} is not recognized by the {1} service
    OMAG-COMMON-400-007 - The array value passed on the {0} parameter of the {1} operation is null or empty
    OMAG-COMMON-400-011 - The connection object passed on the {0} parameter of the {1} operation is null
    OMAG-COMMON-400-024 - The connection object passed on the {0} parameter of the {1} operation has a null connector type
    OMAG-COMMON-400-012 - The enumeration value passed on the {0} parameter of the {1} operation is null
    OMAG-COMMON-400-005 - The unique identifier (guid) passed on the {0} parameter of the {1} operation is null
    OMAG-COMMON-400-014 - OMAG server has been called with a null local server name
    OMAG-COMMON-400-006 - The name passed on the {0} parameter of the {1} operation is null
    OMAG-COMMON-400-015 - The object passed on the {0} parameter of the {1} operation is null
    OMAG-COMMON-400-022 - The search string passed on the {0} parameter of the {1} operation is null
    OMAG-COMMON-400-013 - The text field value passed on the {0} parameter of the {1} operation is null
    OMAG-COMMON-400-004 - The user identifier (user id) passed on the {0} operation is null
    OMAG-COMMON-400-003 - The OMAG Server name is null
    OMAG-COMMON-400-002 - The OMAS Server URL {0} is not in a recognized format
    OMAGCommonAuditCode - The OMAG Server Platform URL is null
    OMAG-COMMON-400-016 - An unexpected {0} exception was caught by {1}; error message was {2}
    OMAG-COMMON-409-001 - Method {0} of service {1} is not able to create an instance of type {2} because parameter name {3} is defined as a unique property and value {4} is not available for use
    OMAG-COMMON-400-021 - The identifier {0} of the {1} passed by {2} to method {3} of service {4} is not recognized by the {5} server
    OMAG-COMMON-400-018 - The type name {0} passed on method {1} of service {2} is not recognized
    OMAG-COMMON-400-026 - The {0} element {1} is expected to be anchored to {2} but is in fact anchored to {3}.
    OMAG-COMMON-400-025 - Method {0} of service {1} is not able to update instance {2} of type {3} as part of {4} metadata collection named {5} (GUID {6}) because this instance actually belongs to {7} metadata collection name {8} (GUID {9})
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieve a message definition object for an exception.
    Retrieve a message definition object for an exception.
    JSON-style toString
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SERVER_URL_NOT_SPECIFIED

      public static final OMAGCommonErrorCode SERVER_URL_NOT_SPECIFIED
      OMAGCommonAuditCode - The OMAG Server Platform URL is null
    • SERVER_URL_MALFORMED

      public static final OMAGCommonErrorCode SERVER_URL_MALFORMED
      OMAG-COMMON-400-002 - The OMAS Server URL {0} is not in a recognized format
    • SERVER_NAME_NOT_SPECIFIED

      public static final OMAGCommonErrorCode SERVER_NAME_NOT_SPECIFIED
      OMAG-COMMON-400-003 - The OMAG Server name is null
    • NULL_USER_ID

      public static final OMAGCommonErrorCode NULL_USER_ID
      OMAG-COMMON-400-004 - The user identifier (user id) passed on the {0} operation is null
    • NULL_GUID

      public static final OMAGCommonErrorCode NULL_GUID
      OMAG-COMMON-400-005 - The unique identifier (guid) passed on the {0} parameter of the {1} operation is null
    • NULL_NAME

      public static final OMAGCommonErrorCode NULL_NAME
      OMAG-COMMON-400-006 - The name passed on the {0} parameter of the {1} operation is null
    • NULL_ARRAY_PARAMETER

      public static final OMAGCommonErrorCode NULL_ARRAY_PARAMETER
      OMAG-COMMON-400-007 - The array value passed on the {0} parameter of the {1} operation is null or empty
    • NEGATIVE_START_FROM

      public static final OMAGCommonErrorCode NEGATIVE_START_FROM
      OMAG-COMMON-400-008 - The starting point for the results {0}, passed on the {1} parameter of the {2} operation, is negative
    • NEGATIVE_PAGE_SIZE

      public static final OMAGCommonErrorCode NEGATIVE_PAGE_SIZE
      OMAG-COMMON-400-009 - The page size {0} for the results, passed on the {1} parameter of the {2} operation, is negative
    • MAX_PAGE_SIZE

      public static final OMAGCommonErrorCode MAX_PAGE_SIZE
      OMAG-COMMON-400-010 - The number of records to return, {0}, passed on the {1} parameter of the {2} operation, is greater than the allowable maximum of {3}
    • NULL_CONNECTION_PARAMETER

      public static final OMAGCommonErrorCode NULL_CONNECTION_PARAMETER
      OMAG-COMMON-400-011 - The connection object passed on the {0} parameter of the {1} operation is null
    • NULL_ENUM

      public static final OMAGCommonErrorCode NULL_ENUM
      OMAG-COMMON-400-012 - The enumeration value passed on the {0} parameter of the {1} operation is null
    • NULL_TEXT

      public static final OMAGCommonErrorCode NULL_TEXT
      OMAG-COMMON-400-013 - The text field value passed on the {0} parameter of the {1} operation is null
    • NULL_LOCAL_SERVER_NAME

      public static final OMAGCommonErrorCode NULL_LOCAL_SERVER_NAME
      OMAG-COMMON-400-014 - OMAG server has been called with a null local server name
    • NULL_OBJECT

      public static final OMAGCommonErrorCode NULL_OBJECT
      OMAG-COMMON-400-015 - The object passed on the {0} parameter of the {1} operation is null
    • UNEXPECTED_EXCEPTION

      public static final OMAGCommonErrorCode UNEXPECTED_EXCEPTION
      OMAG-COMMON-400-016 - An unexpected {0} exception was caught by {1}; error message was {2}
    • NO_REQUEST_BODY

      public static final OMAGCommonErrorCode NO_REQUEST_BODY
      OMAG-COMMON-400-017 - An request by user {0} to method {1} on server {2} had no request body
    • UNRECOGNIZED_TYPE_NAME

      public static final OMAGCommonErrorCode UNRECOGNIZED_TYPE_NAME
      OMAG-COMMON-400-018 - The type name {0} passed on method {1} of service {2} is not recognized
    • BAD_SUB_TYPE_NAME

      public static final OMAGCommonErrorCode BAD_SUB_TYPE_NAME
      OMAG-COMMON-400-019 - The type name {0} passed on method {1} of service {2} is not a sub-type of {3}
    • NOT_IN_THE_ZONE

      public static final OMAGCommonErrorCode NOT_IN_THE_ZONE
      OMAG-COMMON-400-020 - Asset {0} is not recognized by the {1} service
    • UNKNOWN_ELEMENT

      public static final OMAGCommonErrorCode UNKNOWN_ELEMENT
      OMAG-COMMON-400-021 - The identifier {0} of the {1} passed by {2} to method {3} of service {4} is not recognized by the {5} server
    • NULL_SEARCH_STRING

      public static final OMAGCommonErrorCode NULL_SEARCH_STRING
      OMAG-COMMON-400-022 - The search string passed on the {0} parameter of the {1} operation is null
    • CANNOT_DELETE_ELEMENT_IN_USE

      public static final OMAGCommonErrorCode CANNOT_DELETE_ELEMENT_IN_USE
      OMAG-COMMON-400-023 - Method {0} of service {1} is unable to delete {2} identified by {3} because it is still in use.
    • NULL_CONNECTOR_TYPE_PARAMETER

      public static final OMAGCommonErrorCode NULL_CONNECTOR_TYPE_PARAMETER
      OMAG-COMMON-400-024 - The connection object passed on the {0} parameter of the {1} operation has a null connector type
    • WRONG_METADATA_COLLECTION_FOR_UPDATE

      public static final OMAGCommonErrorCode WRONG_METADATA_COLLECTION_FOR_UPDATE
      OMAG-COMMON-400-025 - Method {0} of service {1} is not able to update instance {2} of type {3} as part of {4} metadata collection named {5} (GUID {6}) because this instance actually belongs to {7} metadata collection name {8} (GUID {9})
    • WRONG_ANCHOR_GUID

      public static final OMAGCommonErrorCode WRONG_ANCHOR_GUID
      OMAG-COMMON-400-026 - The {0} element {1} is expected to be anchored to {2} but is in fact anchored to {3}. Method {4} is unable to proceed
    • NOT_ANCHOR_ELEMENT

      public static final OMAGCommonErrorCode NOT_ANCHOR_ELEMENT
      OMAG-COMMON-400-027 - The {0} element {1} is expected to be an anchor entity but is in fact anchored to {2}. Method {3} is unable to proceed
    • INVALID_SEARCH_STRING

      public static final OMAGCommonErrorCode INVALID_SEARCH_STRING
      OMAG-COMMON-400-028 - The search string passed on the {0} parameter of the {1} operation is invalid and results in a {2} exception when executed. The error message is {3}
    • INVALID_PROPERTIES_OBJECT

      public static final OMAGCommonErrorCode INVALID_PROPERTIES_OBJECT
      OMAG-COMMON-400-029 - The properties object passed on the {0} operation is either null or not of the correct {1} class
    • INVALID_CALL_FOR_SERVER

      public static final OMAGCommonErrorCode INVALID_CALL_FOR_SERVER
      OMAG-COMMON-400-030 - The {0} operation is only supported by {1} servers and server {2} is a {3}
    • NO_REQUEST_BODY_FOR_CLASS

      public static final OMAGCommonErrorCode NO_REQUEST_BODY_FOR_CLASS
      OMAG-COMMON-400-031 - A request by user {0} to method {1} on server {2} had no request body. Add a request body of type {3}
    • INSTANCE_WRONG_TYPE_FOR_GUID

      public static final OMAGCommonErrorCode INSTANCE_WRONG_TYPE_FOR_GUID
      OMAG-COMMON-404-001 - The {0} method has retrieved an instance for unique identifier (guid) {1} which is of type {2} rather than type {3}
    • UNIQUE_NAME_ALREADY_IN_USE

      public static final OMAGCommonErrorCode UNIQUE_NAME_ALREADY_IN_USE
      OMAG-COMMON-409-001 - Method {0} of service {1} is not able to create an instance of type {2} because parameter name {3} is defined as a unique property and value {4} is not available for use
    • METHOD_NOT_IMPLEMENTED

      public static final OMAGCommonErrorCode METHOD_NOT_IMPLEMENTED
      OMAG-COMMON-500-001 - Method {0} called by user {1} to OMAG Server {2} is not implemented in service {3}
    • CLIENT_SIDE_REST_API_ERROR

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

    • values

      public static OMAGCommonErrorCode[] 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 OMAGCommonErrorCode 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<OMAGCommonErrorCode>
      Returns:
      string of property names and values for this enum