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 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-CONNECTION-500-002 - OCF method {0} detected an unexpected exception, message was {1}OCF-CONNECTOR-500-009 - Unable to load Connector Java class {0}OCF-CONNECTION-500-005 - Internal error in OCF method {0}OCF-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-PROPERTIES-400-012 - Non-string property names stored in entity {0} of type {1}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-CONNECTION-400-010 - The endpoint attribute {0} in connection {1} is set to "{2}" which is invalidOCF-CONNECTOR-400-009 - The {0} connector is unable to proceed with is processing of {1} because the configuration property called {2} was not suppliedOCF-CONNECTOR-500-002 - No information about the asset {0} has been returned from the asset store for connector {1}OCF-CONNECTOR-500-003 - No type name is available for the asset passed to connector {0}.OCF-PROPERTIES-400-015 - No type-specific iterator for {0} paging iteratorOCF-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-500-003 - OCF method {0} not yet implementedOCF-CONNECTOR-500-012 - Java class {0} is not a VirtualConnector and so can not support VirtualConnection {1}OCF-PROPERTIES-400-016 - No classification name for entity {0} of type {1}OCF-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-CONNECTION-400-009 - Null endpoint detected in connection {0}OCF-PROPERTIES-400-011 - Null property name passed to entity {0} of type {1}OCF-PROPERTIES-400-013 - Null securedProperty name passed to connection {0}OCF-PROPERTIES-400-017 - No tag name for entity {0} of type {1}OCF-PROPERTIES-404-002 - Exception with error message "{0}" was returned to object {1} resulted from a request for connected asset propertiesOCF-PROPERTIES-400-018 - Unable to remove element through iterator {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}OCF-CONNECTOR-404-001 - Endpoint {0} in connection {1} for connector instance {2} is either unknown or unavailableOCF-CONNECTION-500-004 - Connection error detectedOCF-PROPERTIES-404-003 - {0} retrieved a schema attribute of type {1} which does not have an associated schema type.OCF-CONNECTION-400-002 - Unnamed connection object passed to requested action {0} -
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 OCFErrorCode
Returns 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 -
UNNAMED_CONNECTION
OCF-CONNECTION-400-002 - Unnamed connection object passed to requested action {0} -
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} -
NULL_ENDPOINT_IN_CONNECTION
OCF-CONNECTION-400-009 - Null endpoint detected in connection {0} -
MALFORMED_ENDPOINT
OCF-CONNECTION-400-010 - The endpoint attribute {0} in connection {1} is set to "{2}" which is invalid -
MALFORMED_DATE_CONFIGURATION_PROPERTY
-
NULL_PROPERTY_NAME
OCF-PROPERTIES-400-011 - Null property name passed to entity {0} of type {1} -
INVALID_PROPERTY_NAMES
OCF-PROPERTIES-400-012 - Non-string property names stored in entity {0} of type {1} -
NULL_SECURED_PROPERTY_NAME
OCF-PROPERTIES-400-013 - Null securedProperty name passed to connection {0} -
NO_MORE_ELEMENTS
OCF-PROPERTIES-400-014 - No more elements in {0} iterator -
NO_ITERATOR
OCF-PROPERTIES-400-015 - No type-specific iterator for {0} paging iterator -
NULL_CLASSIFICATION_NAME
OCF-PROPERTIES-400-016 - No classification name for entity {0} of type {1} -
NULL_TAG_NAME
OCF-PROPERTIES-400-017 - No tag name for entity {0} of type {1} -
UNABLE_TO_REMOVE
OCF-PROPERTIES-400-018 - Unable to remove element through iterator {0} -
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 is unable to proceed with is processing of {1} because the configuration property called {2} was not supplied -
UNKNOWN_ENDPOINT
OCF-CONNECTOR-404-001 - Endpoint {0} in connection {1} for connector instance {2} is either unknown or unavailable -
PROPERTIES_NOT_AVAILABLE
OCF-PROPERTIES-404-002 - Exception with error message "{0}" was returned to object {1} resulted from a request for connected asset properties -
UNKNOWN_SCHEMA_TYPE
OCF-PROPERTIES-404-003 - {0} retrieved a schema attribute of type {1} which does not have an associated schema type. The schema attribute is from metadata collection {2} ({3}) -
CAUGHT_EXCEPTION
OCF-CONNECTION-500-001 - OCF method detected an unexpected exception -
CAUGHT_EXCEPTION_WITH_MSG
OCF-CONNECTION-500-002 - OCF method {0} detected an unexpected exception, message was {1} -
NOT_IMPLEMENTED
OCF-CONNECTION-500-003 - OCF method {0} not yet implemented -
UNKNOWN_ERROR
OCF-CONNECTION-500-004 - Connection error detected -
INTERNAL_ERROR
OCF-CONNECTION-500-005 - Internal error in OCF method {0} -
NO_ASSET
OCF-CONNECTOR-500-002 - No information about the asset {0} has been returned from the asset store for connector {1} -
NO_ASSET_TYPE
OCF-CONNECTOR-500-003 - No type name is available for the asset passed to connector {0}. The full asset contents are: {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 -
INCOMPLETE_CONNECTOR
OCF-CONNECTOR-500-009 - Unable to load Connector Java class {0} -
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} -
NOT_VIRTUAL_CONNECTOR
OCF-CONNECTOR-500-012 - Java class {0} is not a VirtualConnector and so can not support VirtualConnection {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:
getMessageDefinition
in 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:
getMessageDefinition
in 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:
toString
in classEnum<OCFErrorCode>
- Returns:
- string of property names and values for this enum
-