Enum Class OCFErrorCode
- All Implemented Interfaces:
Serializable,Comparable<OCFErrorCode>,Constable,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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOCF-STATISTICS-400-001 - The {0} is already in use as a counter statistic and can not be used by the {1} method to {2}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}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}OCF-CONNECTION-500-001 - OCF method detected an unexpected exceptionOCF-CONNECTOR-400-005 - Asset {0} is of type {1} but the {2} connector only supports the following asset type(s): {3}OCF-CONNECTION-500-010 - Invalid Connector class {0} for connector {1}; resulting exception {2} produced message {3}OCF-CONNECTION-400-008 - Connector Provider class {0} passed in connection {1} resulted in a {2} exception with error message of {3}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}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}OCF-PROPERTIES-400-019 - Virtual connection {0} has no embedded connectionsOCF-CONNECTOR-400-009 - The {0} connector cannot proceed with is processing of {1} because the configuration property called {2} was not suppliedOCF-CONNECTOR-400-011 - {0} element {1} does not existOCF-CONNECTOR-400-010 - The {0} connector cannot proceed with is processing because the endpoint address is nullOCF-CONNECTOR-500-002 - No information about the asset {0} has been returned from the asset store for connector {1}OCF-PROPERTIES-400-014 - No more elements in {0} iteratorOCF-CONNECTOR-400-008 - {0} asset {1} describes a resource called {2} does not existOCF-CONNECTOR-500-008 - Java class {0} for connector named {1} does not implement the Connector interfaceOCF-CONNECTION-400-006 - Class {0} passed in connection {1} is not a Connector ProviderOCF-CONNECTION-400-001 - Null connection object passed on request for new connector instanceOCF-CONNECTION-500-011 - Connector Provider {0} returned a null connector instance for connection {1}OCF-CONNECTOR-500-006 - The class name for the connector is not set upOCF-CONNECTION-400-004 - Null Connector Provider passed in connection {0}OCF-CONNECTION-400-003 - Null connectorType property passed in connection {0}OCF-CONNECTOR-500-007 - Unknown Connector Java class {0} for Connector {1}OCF-CONNECTION-400-005 - Unknown Connector Provider class {0} passed in connection {1} -
Method Summary
Modifier and TypeMethodDescriptionRetrieve a message definition object for an exception.getMessageDefinition(String... params) Retrieve a message definition object for an exception.toString()JSON-style toStringstatic OCFErrorCodeReturns the enum constant of this class with the specified name.static OCFErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NULL_CONNECTION
OCF-CONNECTION-400-001 - Null connection object passed on request for new connector instance -
NULL_CONNECTOR_TYPE
OCF-CONNECTION-400-003 - Null connectorType property passed in connection {0} -
NULL_CONNECTOR_PROVIDER
OCF-CONNECTION-400-004 - Null Connector Provider passed in connection {0} -
UNKNOWN_CONNECTOR_PROVIDER
OCF-CONNECTION-400-005 - Unknown Connector Provider class {0} passed in connection {1} -
NOT_CONNECTOR_PROVIDER
OCF-CONNECTION-400-006 - Class {0} passed in connection {1} is not a Connector Provider -
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
-
NO_MORE_ELEMENTS
OCF-PROPERTIES-400-014 - No more elements in {0} iterator -
INVALID_VIRTUAL_CONNECTION
OCF-PROPERTIES-400-019 - Virtual connection {0} has no embedded connections -
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
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
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
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
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
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
OCF-CONNECTOR-400-008 - {0} asset {1} describes a resource called {2} does not exist -
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
OCF-CONNECTOR-400-010 - The {0} connector cannot proceed with is processing because the endpoint address is null -
MISSING_ELEMENT
OCF-CONNECTOR-400-011 - {0} element {1} does not exist -
CAUGHT_EXCEPTION
OCF-CONNECTION-500-001 - OCF method detected an unexpected exception -
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
OCF-CONNECTOR-500-006 - The class name for the connector is not set up -
UNKNOWN_CONNECTOR
OCF-CONNECTOR-500-007 - Unknown Connector Java class {0} for Connector {1} -
NOT_CONNECTOR
OCF-CONNECTOR-500-008 - Java class {0} for connector named {1} does not implement the Connector interface -
INVALID_CONNECTOR
OCF-CONNECTION-500-010 - Invalid Connector class {0} for connector {1}; resulting exception {2} produced message {3} -
NULL_CONNECTOR
OCF-CONNECTION-500-011 - Connector Provider {0} returned a null connector instance for connection {1}
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getMessageDefinition
Retrieve a message definition object for an exception. This method is used when there are no message inserts.- Specified by:
getMessageDefinitionin interfaceExceptionMessageSet- Returns:
- message definition object.
-
getMessageDefinition
Retrieve a message definition object for an exception. This method is used when there are values to be inserted into the message.- Specified by:
getMessageDefinitionin interfaceExceptionMessageSet- 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
JSON-style toString- Overrides:
toStringin classEnum<OCFErrorCode>- Returns:
- string of property names and values for this enum
-