Enum Class OCFErrorCode

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

public enum OCFErrorCode extends Enum<OCFErrorCode> implements ExceptionMessageSet
The OCF error code is used to define first failure data capture (FFDC) for errors that occur when working with OCF Connectors. It is used in conjunction with all OCF 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
    • 400 - invalid parameters
    • 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 user should correct the error
  • Enum Constant Details

    • NULL_CONNECTION

      public static final OCFErrorCode NULL_CONNECTION
      OCF-CONNECTION-400-001 - Null connection object passed on request for new connector instance
    • NULL_CONNECTOR_TYPE

      public static final OCFErrorCode NULL_CONNECTOR_TYPE
      OCF-CONNECTION-400-003 - Null connectorType property passed in connection {0}
    • NULL_CONNECTOR_PROVIDER

      public static final OCFErrorCode NULL_CONNECTOR_PROVIDER
      OCF-CONNECTION-400-004 - Null Connector Provider passed in connection {0}
    • UNKNOWN_CONNECTOR_PROVIDER

      public static final OCFErrorCode UNKNOWN_CONNECTOR_PROVIDER
      OCF-CONNECTION-400-005 - Unknown Connector Provider class {0} passed in connection {1}
    • NOT_CONNECTOR_PROVIDER

      public static final OCFErrorCode NOT_CONNECTOR_PROVIDER
      OCF-CONNECTION-400-006 - Class {0} passed in connection {1} is not a Connector Provider
    • INVALID_CONNECTOR_PROVIDER

      public static final OCFErrorCode INVALID_CONNECTOR_PROVIDER
      OCF-CONNECTION-400-008 - Connector Provider class {0} passed in connection {1} resulted in a {2} exception with error message of {3}
    • MALFORMED_DATE_CONFIGURATION_PROPERTY

      public static final OCFErrorCode MALFORMED_DATE_CONFIGURATION_PROPERTY
    • NO_MORE_ELEMENTS

      public static final OCFErrorCode NO_MORE_ELEMENTS
      OCF-PROPERTIES-400-014 - No more elements in {0} iterator
    • INVALID_VIRTUAL_CONNECTION

      public static final OCFErrorCode INVALID_VIRTUAL_CONNECTION
      OCF-PROPERTIES-400-019 - Virtual connection {0} has no embedded connections
    • ALREADY_COUNTER_NAME

      public static final OCFErrorCode ALREADY_COUNTER_NAME
      OCF-STATISTICS-400-001 - The {0} is already in use as a counter statistic and can not be used by the {1} method to {2}
    • ALREADY_PROPERTY_NAME

      public static final OCFErrorCode ALREADY_PROPERTY_NAME
      OCF-STATISTICS-400-002 - The {0} is already in use as a property statistic and can not be used by the {1} method to {2}
    • ALREADY_TIMESTAMP_NAME

      public static final OCFErrorCode ALREADY_TIMESTAMP_NAME
      OCF-STATISTICS-400-003 - The {0} is already in use as a timestamp statistic and can not be used by the {1} method to {2}
    • INVALID_ASSET_TYPE

      public static final OCFErrorCode INVALID_ASSET_TYPE
      OCF-CONNECTOR-400-005 - Asset {0} is of type {1} but the {2} connector only supports the following asset type(s): {3}
    • INVALID_ROOT_SCHEMA_TYPE

      public static final OCFErrorCode INVALID_ROOT_SCHEMA_TYPE
      OCF-CONNECTOR-400-006 - Asset {0} has a root schema of type {1} but survey action service {2} only supports the following root schema type(s): {3}
    • INVALID_RESOURCE

      public static final OCFErrorCode INVALID_RESOURCE
      OCF-CONNECTOR-400-007 - {0} asset {1} describes a resource called {2} which is of type {3} but connector {4} only supports the following type(s) of resources: {5}
    • NO_RESOURCE

      public static final OCFErrorCode NO_RESOURCE
      OCF-CONNECTOR-400-008 - {0} asset {1} describes a resource called {2} does not exist
    • MISSING_CONFIGURATION_PROPERTY

      public static final OCFErrorCode MISSING_CONFIGURATION_PROPERTY
      OCF-CONNECTOR-400-009 - The {0} connector cannot proceed with is processing of {1} because the configuration property called {2} was not supplied
    • MISSING_ENDPOINT_ADDRESS

      public static final OCFErrorCode MISSING_ENDPOINT_ADDRESS
      OCF-CONNECTOR-400-010 - The {0} connector cannot proceed with is processing because the endpoint address is null
    • MISSING_ELEMENT

      public static final OCFErrorCode MISSING_ELEMENT
      OCF-CONNECTOR-400-011 - {0} element {1} does not exist
    • CAUGHT_EXCEPTION

      public static final OCFErrorCode CAUGHT_EXCEPTION
      OCF-CONNECTION-500-001 - OCF method detected an unexpected exception
    • NO_ASSET

      public static final OCFErrorCode NO_ASSET
      OCF-CONNECTOR-500-002 - No information about the asset {0} has been returned from the asset store for connector {1}
    • NULL_CONNECTOR_CLASS

      public static final OCFErrorCode NULL_CONNECTOR_CLASS
      OCF-CONNECTOR-500-006 - The class name for the connector is not set up
    • UNKNOWN_CONNECTOR

      public static final OCFErrorCode UNKNOWN_CONNECTOR
      OCF-CONNECTOR-500-007 - Unknown Connector Java class {0} for Connector {1}
    • NOT_CONNECTOR

      public static final OCFErrorCode NOT_CONNECTOR
      OCF-CONNECTOR-500-008 - Java class {0} for connector named {1} does not implement the Connector interface
    • INVALID_CONNECTOR

      public static final OCFErrorCode INVALID_CONNECTOR
      OCF-CONNECTION-500-010 - Invalid Connector class {0} for connector {1}; resulting exception {2} produced message {3}
    • NULL_CONNECTOR

      public static final OCFErrorCode NULL_CONNECTOR
      OCF-CONNECTION-500-011 - Connector Provider {0} returned a null connector instance for connection {1}
  • Method Details

    • values

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