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

public enum GAFErrorCode extends Enum<GAFErrorCode> implements ExceptionMessageSet
The GAF error code is used to define first failure data capture (FFDC) for errors that occur when working with GAF Components. It is used in conjunction with the GAFCheckedException and GAFRuntimeException. 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
    • 404 - not found
    • 409 - data conflict errors - eg item already defined
  • Error Message Id - 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
  • 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
    GAF-PROPERTIES-400-009 - {0} is unable to add a new element to location {1} of an array of size {2} value
    GAF-CONVERTER-500-011 - An entity has been retrieved by method {0} from service {1} that has an invalid header: {2}
    GAF-CONVERTER-500-005 - One of the converters for the {0} service is not able to populate a bean of type {1} because a metadata instance of type {2} was passed to method {3} instead of the expected type of {4}
    GAF-CONVERTER-500-013 - A relationship has been retrieved by method {0} from service {1} that has an invalid header: {2}
    GAF-PROPERTIES-400-007 - The unique name {0} passed on the {1} parameter of the {2} operation matches multiple elements: {3}
    GAF-PROPERTIES-HELPER-503-001 - A caller {0} has passed an invalid parameter to the propertiesHelper {1} operation as part of the {2} request
    GAF-PROPERTIES-HELPER-503-002 - A caller {0} has passed an invalid parameter to the property helper {1} operation as part of the {2} request resulting in an unexpected exception {3} with message {4}
    GAF-CONVERTER-500-001 - An unsupported bean class named {0} was passed to the repository services by the {1} request for open metadata access service {2} on server {3}; error message was: {4}
    GAF-GOVERNANCE-SERVICE-400-002 - The governance engine {0} is not able to create the governance action service for request type {1} and request parameters {2}.
    GAF-GOVERNANCE-SERVICE-400-003 - Invalid governance action service for request type {0}.
    GAF-PROPERTIES-500-003 - There is a problem in the definition of primitive type {0}
    GAF-PROPERTIES-500-001 - The Java class {0} for PrimitiveTypeCategory {1} is not known
    GAF-PROPERTIES-500-004 - The value supplied for an attribute of PrimitiveTypeCategory {0} is expected as Java class {1} but was supplied as Java class {2}
    GAF-PROPERTIES-500-002 - The primitive value should be stored in Java class {0} rather than {1} since it is of PrimitiveTypeCategory {2}
    GAF-CONVERTER-500-002 - The {0} service has not implemented the {1} method in a subclass of the {2} converter class for bean class {3} and so is unable to create the bean for method {4}
    GAF-CONVERTER-500-004 - One of the converters for the {0} service is not able to populate a bean of type {1} because a metadata instance of type {2} has not passed to method {3}
    GAF-GOVERNANCE-SERVICE-400-001 - No governance context supplied to the governance action service {0}
    GAF-PROPERTIES-400-005 - The unique identifier (guid) passed on the {0} parameter of the {1} operation is null
    GAF-PROPERTIES-400-004 - The name passed on the {0} parameter of the {1} operation is null
    GAF-PROPERTIES-400-008 - Null property name passed to properties object
    GAF-CONVERTER-500-003 - An unexpected bean class named {0} was passed to the repository services by the {1} request for open metadata access service {2} on server {3}; the expected class name is: {4}
    GAF-GOVERNANCE-SERVICE-500-001 - Unexpected {0} exception in governance action service {1} of type {2} detected by method {3}.
    GAF-PROPERTIES-400-006 - The unique name {0} passed on the {1} parameter of the {2} operation is not known to the metadata store
  • 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.
    static GAFErrorCode[]
    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

    • NULL_GOVERNANCE_CONTEXT

      public static final GAFErrorCode NULL_GOVERNANCE_CONTEXT
      GAF-GOVERNANCE-SERVICE-400-001 - No governance context supplied to the governance action service {0}
    • INVALID_GOVERNANCE_SERVICE_CONNECTION

      public static final GAFErrorCode INVALID_GOVERNANCE_SERVICE_CONNECTION
      GAF-GOVERNANCE-SERVICE-400-002 - The governance engine {0} is not able to create the governance action service for request type {1} and request parameters {2}. Error message was {3}. The connection was {4}
    • INVALID_GOVERNANCE_SERVICE_CONNECTOR

      public static final GAFErrorCode INVALID_GOVERNANCE_SERVICE_CONNECTOR
      GAF-GOVERNANCE-SERVICE-400-003 - Invalid governance action service for request type {0}. Governance engine {1} is not able to execute the request
    • NULL_NAME

      public static final GAFErrorCode NULL_NAME
      GAF-PROPERTIES-400-004 - The name passed on the {0} parameter of the {1} operation is null
    • NULL_GUID

      public static final GAFErrorCode NULL_GUID
      GAF-PROPERTIES-400-005 - The unique identifier (guid) passed on the {0} parameter of the {1} operation is null
    • UNKNOWN_ELEMENT

      public static final GAFErrorCode UNKNOWN_ELEMENT
      GAF-PROPERTIES-400-006 - The unique name {0} passed on the {1} parameter of the {2} operation is not known to the metadata store
    • DUPLICATE_ELEMENT

      public static final GAFErrorCode DUPLICATE_ELEMENT
      GAF-PROPERTIES-400-007 - The unique name {0} passed on the {1} parameter of the {2} operation matches multiple elements: {3}
    • NULL_PROPERTY_NAME

      public static final GAFErrorCode NULL_PROPERTY_NAME
      GAF-PROPERTIES-400-008 - Null property name passed to properties object
    • ARRAY_OUT_OF_BOUNDS

      public static final GAFErrorCode ARRAY_OUT_OF_BOUNDS
      GAF-PROPERTIES-400-009 - {0} is unable to add a new element to location {1} of an array of size {2} value
    • UNEXPECTED_EXCEPTION

      public static final GAFErrorCode UNEXPECTED_EXCEPTION
      GAF-GOVERNANCE-SERVICE-500-001 - Unexpected {0} exception in governance action service {1} of type {2} detected by method {3}. The error message was {4}
    • INVALID_PRIMITIVE_CLASS_NAME

      public static final GAFErrorCode INVALID_PRIMITIVE_CLASS_NAME
      GAF-PROPERTIES-500-001 - The Java class {0} for PrimitiveTypeCategory {1} is not known
    • INVALID_PRIMITIVE_VALUE

      public static final GAFErrorCode INVALID_PRIMITIVE_VALUE
      GAF-PROPERTIES-500-002 - The primitive value should be stored in Java class {0} rather than {1} since it is of PrimitiveTypeCategory {2}
    • INVALID_PRIMITIVE_CATEGORY

      public static final GAFErrorCode INVALID_PRIMITIVE_CATEGORY
      GAF-PROPERTIES-500-003 - There is a problem in the definition of primitive type {0}
    • INVALID_PRIMITIVE_TYPE

      public static final GAFErrorCode INVALID_PRIMITIVE_TYPE
      GAF-PROPERTIES-500-004 - The value supplied for an attribute of PrimitiveTypeCategory {0} is expected as Java class {1} but was supplied as Java class {2}
    • HELPER_LOGIC_ERROR

      public static final GAFErrorCode HELPER_LOGIC_ERROR
      GAF-PROPERTIES-HELPER-503-001 - A caller {0} has passed an invalid parameter to the propertiesHelper {1} operation as part of the {2} request
    • HELPER_LOGIC_EXCEPTION

      public static final GAFErrorCode HELPER_LOGIC_EXCEPTION
      GAF-PROPERTIES-HELPER-503-002 - A caller {0} has passed an invalid parameter to the property helper {1} operation as part of the {2} request resulting in an unexpected exception {3} with message {4}
    • INVALID_BEAN_CLASS

      public static final GAFErrorCode INVALID_BEAN_CLASS
      GAF-CONVERTER-500-001 - An unsupported bean class named {0} was passed to the repository services by the {1} request for open metadata access service {2} on server {3}; error message was: {4}
    • MISSING_CONVERTER_METHOD

      public static final GAFErrorCode MISSING_CONVERTER_METHOD
      GAF-CONVERTER-500-002 - The {0} service has not implemented the {1} method in a subclass of the {2} converter class for bean class {3} and so is unable to create the bean for method {4}
    • UNEXPECTED_BEAN_CLASS

      public static final GAFErrorCode UNEXPECTED_BEAN_CLASS
      GAF-CONVERTER-500-003 - An unexpected bean class named {0} was passed to the repository services by the {1} request for open metadata access service {2} on server {3}; the expected class name is: {4}
    • MISSING_METADATA_INSTANCE

      public static final GAFErrorCode MISSING_METADATA_INSTANCE
      GAF-CONVERTER-500-004 - One of the converters for the {0} service is not able to populate a bean of type {1} because a metadata instance of type {2} has not passed to method {3}
    • BAD_INSTANCE_TYPE

      public static final GAFErrorCode BAD_INSTANCE_TYPE
      GAF-CONVERTER-500-005 - One of the converters for the {0} service is not able to populate a bean of type {1} because a metadata instance of type {2} was passed to method {3} instead of the expected type of {4}
    • BAD_ENTITY

      public static final GAFErrorCode BAD_ENTITY
      GAF-CONVERTER-500-011 - An entity has been retrieved by method {0} from service {1} that has an invalid header: {2}
    • BAD_RELATIONSHIP

      public static final GAFErrorCode BAD_RELATIONSHIP
      GAF-CONVERTER-500-013 - A relationship has been retrieved by method {0} from service {1} that has an invalid header: {2}
  • Method Details

    • values

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