Enum Class OMAGCommonErrorCode
- All Implemented Interfaces:
Serializable
,Comparable<OMAGCommonErrorCode>
,Constable
,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 ConstantDescriptionOMAG-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} classOMAG-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 negativeOMAG-COMMON-400-008 - The starting point for the results {0}, passed on the {1} parameter of the {2} operation, is negativeOMAG-COMMON-400-017 - An request by user {0} to method {1} on server {2} had no request bodyOMAG-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} serviceOMAG-COMMON-400-007 - The array value passed on the {0} parameter of the {1} operation is null or emptyOMAG-COMMON-400-011 - The connection object passed on the {0} parameter of the {1} operation is nullOMAG-COMMON-400-024 - The connection object passed on the {0} parameter of the {1} operation has a null connector typeOMAG-COMMON-400-012 - The enumeration value passed on the {0} parameter of the {1} operation is nullOMAG-COMMON-400-005 - The unique identifier (guid) passed on the {0} parameter of the {1} operation is nullOMAG-COMMON-400-014 - OMAG server has been called with a null local server nameOMAG-COMMON-400-006 - The name passed on the {0} parameter of the {1} operation is nullOMAG-COMMON-400-015 - The object passed on the {0} parameter of the {1} operation is nullOMAG-COMMON-400-022 - The search string passed on the {0} parameter of the {1} operation is nullOMAG-COMMON-400-013 - The text field value passed on the {0} parameter of the {1} operation is nullOMAG-COMMON-400-004 - The user identifier (user id) passed on the {0} operation is nullOMAG-COMMON-400-003 - The OMAG Server name is nullOMAG-COMMON-400-002 - The OMAS Server URL {0} is not in a recognized formatOMAGCommonAuditCode - The OMAG Server Platform URL is nullOMAG-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 useOMAG-COMMON-400-021 - The identifier {0} of the {1} passed by {2} to method {3} of service {4} is not recognized by the {5} serverOMAG-COMMON-400-018 - The type name {0} passed on method {1} of service {2} is not recognizedOMAG-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 TypeMethodDescriptionRetrieve a message definition object for an exception.getMessageDefinition
(String... params) Retrieve a message definition object for an exception.toString()
JSON-style toStringstatic OMAGCommonErrorCode
Returns the enum constant of this class with the specified name.static OMAGCommonErrorCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SERVER_URL_NOT_SPECIFIED
OMAGCommonAuditCode - The OMAG Server Platform URL is null -
SERVER_URL_MALFORMED
OMAG-COMMON-400-002 - The OMAS Server URL {0} is not in a recognized format -
SERVER_NAME_NOT_SPECIFIED
OMAG-COMMON-400-003 - The OMAG Server name is null -
NULL_USER_ID
OMAG-COMMON-400-004 - The user identifier (user id) passed on the {0} operation is null -
NULL_GUID
OMAG-COMMON-400-005 - The unique identifier (guid) passed on the {0} parameter of the {1} operation is null -
NULL_NAME
OMAG-COMMON-400-006 - The name passed on the {0} parameter of the {1} operation is null -
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
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
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
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
OMAG-COMMON-400-011 - The connection object passed on the {0} parameter of the {1} operation is null -
NULL_ENUM
OMAG-COMMON-400-012 - The enumeration value passed on the {0} parameter of the {1} operation is null -
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
OMAG-COMMON-400-014 - OMAG server has been called with a null local server name -
NULL_OBJECT
OMAG-COMMON-400-015 - The object passed on the {0} parameter of the {1} operation is null -
UNEXPECTED_EXCEPTION
OMAG-COMMON-400-016 - An unexpected {0} exception was caught by {1}; error message was {2} -
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
OMAG-COMMON-400-018 - The type name {0} passed on method {1} of service {2} is not recognized -
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
OMAG-COMMON-400-020 - Asset {0} is not recognized by the {1} service -
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
OMAG-COMMON-400-022 - The search string passed on the {0} parameter of the {1} operation is null -
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
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
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
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
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
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
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
OMAG-COMMON-400-030 - The {0} operation is only supported by {1} servers and server {2} is a {3} -
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
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
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
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
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
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<OMAGCommonErrorCode>
- Returns:
- string of property names and values for this enum
-