Enum OMAGCommonErrorCode
- java.lang.Object
-
- java.lang.Enum<OMAGCommonErrorCode>
-
- org.odpi.openmetadata.commonservices.ffdc.OMAGCommonErrorCode
-
- All Implemented Interfaces:
Serializable,Comparable<OMAGCommonErrorCode>,ExceptionMessageSet
public enum OMAGCommonErrorCode extends Enum<OMAGCommonErrorCode> implements 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 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 consumer should correct the error
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExceptionMessageDefinitiongetMessageDefinition()Retrieve a message definition object for an exception.ExceptionMessageDefinitiongetMessageDefinition(String... params)Retrieve a message definition object for an exception.StringtoString()JSON-style toStringstatic OMAGCommonErrorCodevalueOf(String name)Returns the enum constant of this type with the specified name.static OMAGCommonErrorCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SERVER_URL_NOT_SPECIFIED
public static final OMAGCommonErrorCode SERVER_URL_NOT_SPECIFIED
-
SERVER_URL_MALFORMED
public static final OMAGCommonErrorCode SERVER_URL_MALFORMED
-
SERVER_NAME_NOT_SPECIFIED
public static final OMAGCommonErrorCode SERVER_NAME_NOT_SPECIFIED
-
NULL_USER_ID
public static final OMAGCommonErrorCode NULL_USER_ID
-
NULL_GUID
public static final OMAGCommonErrorCode NULL_GUID
-
NULL_NAME
public static final OMAGCommonErrorCode NULL_NAME
-
NULL_ARRAY_PARAMETER
public static final OMAGCommonErrorCode NULL_ARRAY_PARAMETER
-
NEGATIVE_START_FROM
public static final OMAGCommonErrorCode NEGATIVE_START_FROM
-
NEGATIVE_PAGE_SIZE
public static final OMAGCommonErrorCode NEGATIVE_PAGE_SIZE
-
MAX_PAGE_SIZE
public static final OMAGCommonErrorCode MAX_PAGE_SIZE
-
NULL_CONNECTION_PARAMETER
public static final OMAGCommonErrorCode NULL_CONNECTION_PARAMETER
-
NULL_ENUM
public static final OMAGCommonErrorCode NULL_ENUM
-
NULL_TEXT
public static final OMAGCommonErrorCode NULL_TEXT
-
NULL_LOCAL_SERVER_NAME
public static final OMAGCommonErrorCode NULL_LOCAL_SERVER_NAME
-
NULL_OBJECT
public static final OMAGCommonErrorCode NULL_OBJECT
-
UNEXPECTED_EXCEPTION
public static final OMAGCommonErrorCode UNEXPECTED_EXCEPTION
-
NO_REQUEST_BODY
public static final OMAGCommonErrorCode NO_REQUEST_BODY
-
UNRECOGNIZED_TYPE_NAME
public static final OMAGCommonErrorCode UNRECOGNIZED_TYPE_NAME
-
BAD_SUB_TYPE_NAME
public static final OMAGCommonErrorCode BAD_SUB_TYPE_NAME
-
NOT_IN_THE_ZONE
public static final OMAGCommonErrorCode NOT_IN_THE_ZONE
-
UNKNOWN_ELEMENT
public static final OMAGCommonErrorCode UNKNOWN_ELEMENT
-
NULL_SEARCH_STRING
public static final OMAGCommonErrorCode NULL_SEARCH_STRING
-
CANNOT_DELETE_ELEMENT_IN_USE
public static final OMAGCommonErrorCode CANNOT_DELETE_ELEMENT_IN_USE
-
NULL_CONNECTOR_TYPE_PARAMETER
public static final OMAGCommonErrorCode NULL_CONNECTOR_TYPE_PARAMETER
-
WRONG_METADATA_COLLECTION_FOR_UPDATE
public static final OMAGCommonErrorCode WRONG_METADATA_COLLECTION_FOR_UPDATE
-
WRONG_ANCHOR_GUID
public static final OMAGCommonErrorCode WRONG_ANCHOR_GUID
-
NOT_ANCHOR_ELEMENT
public static final OMAGCommonErrorCode NOT_ANCHOR_ELEMENT
-
INVALID_SEARCH_STRING
public static final OMAGCommonErrorCode INVALID_SEARCH_STRING
-
INSTANCE_WRONG_TYPE_FOR_GUID
public static final OMAGCommonErrorCode INSTANCE_WRONG_TYPE_FOR_GUID
-
UNIQUE_NAME_ALREADY_IN_USE
public static final OMAGCommonErrorCode UNIQUE_NAME_ALREADY_IN_USE
-
METHOD_NOT_IMPLEMENTED
public static final OMAGCommonErrorCode METHOD_NOT_IMPLEMENTED
-
CLIENT_SIDE_REST_API_ERROR
public static final OMAGCommonErrorCode CLIENT_SIDE_REST_API_ERROR
-
-
Method Detail
-
values
public static OMAGCommonErrorCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OMAGCommonErrorCode c : OMAGCommonErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OMAGCommonErrorCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- 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:
getMessageDefinitionin interfaceExceptionMessageSet- 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:
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
public String toString()
JSON-style toString- Overrides:
toStringin classEnum<OMAGCommonErrorCode>- Returns:
- string of property names and values for this enum
-
-