Enum RepositoryHandlerErrorCode
- java.lang.Object
-
- java.lang.Enum<RepositoryHandlerErrorCode>
-
- org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandlerErrorCode
-
- All Implemented Interfaces:
Serializable,Comparable<RepositoryHandlerErrorCode>,ExceptionMessageSet
public enum RepositoryHandlerErrorCode extends Enum<RepositoryHandlerErrorCode> implements ExceptionMessageSet
The RepositoryHandlerErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with the Repository Handler Services. It is used in conjunction with both Checked and Runtime (unchecked) exceptions. 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 RepositoryHandlerErrorCodevalueOf(String name)Returns the enum constant of this type with the specified name.static RepositoryHandlerErrorCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INVALID_PROPERTY
public static final RepositoryHandlerErrorCode INVALID_PROPERTY
-
INVALID_PARAMETER
public static final RepositoryHandlerErrorCode INVALID_PARAMETER
-
BAD_CLASSIFICATION_PROPERTIES
public static final RepositoryHandlerErrorCode BAD_CLASSIFICATION_PROPERTIES
-
INVALID_TYPE
public static final RepositoryHandlerErrorCode INVALID_TYPE
-
INVALID_PROPERTY_VALUE
public static final RepositoryHandlerErrorCode INVALID_PROPERTY_VALUE
-
DUPLICATE_CREATE_REQUEST
public static final RepositoryHandlerErrorCode DUPLICATE_CREATE_REQUEST
-
WRONG_EXTERNAL_SOURCE
public static final RepositoryHandlerErrorCode WRONG_EXTERNAL_SOURCE
-
LOCAL_CANNOT_CHANGE_EXTERNAL
public static final RepositoryHandlerErrorCode LOCAL_CANNOT_CHANGE_EXTERNAL
-
UNRECOGNIZED_PROPERTY
public static final RepositoryHandlerErrorCode UNRECOGNIZED_PROPERTY
-
UNAVAILABLE_ENTITY
public static final RepositoryHandlerErrorCode UNAVAILABLE_ENTITY
-
NO_ENTITY
public static final RepositoryHandlerErrorCode NO_ENTITY
-
USER_NOT_AUTHORIZED
public static final RepositoryHandlerErrorCode USER_NOT_AUTHORIZED
-
ONLY_CREATOR_CAN_DELETE
public static final RepositoryHandlerErrorCode ONLY_CREATOR_CAN_DELETE
-
INSTANCE_WRONG_TYPE_FOR_GUID
public static final RepositoryHandlerErrorCode INSTANCE_WRONG_TYPE_FOR_GUID
-
OMRS_NOT_INITIALIZED
public static final RepositoryHandlerErrorCode OMRS_NOT_INITIALIZED
-
OMRS_NOT_AVAILABLE
public static final RepositoryHandlerErrorCode OMRS_NOT_AVAILABLE
-
NO_METADATA_COLLECTION
public static final RepositoryHandlerErrorCode NO_METADATA_COLLECTION
-
PROXY_ENTITY_FOUND
public static final RepositoryHandlerErrorCode PROXY_ENTITY_FOUND
-
MULTIPLE_RELATIONSHIPS_FOUND
public static final RepositoryHandlerErrorCode MULTIPLE_RELATIONSHIPS_FOUND
-
UNKNOWN_ENTITY
public static final RepositoryHandlerErrorCode UNKNOWN_ENTITY
-
NO_RELATIONSHIPS_FOUND
public static final RepositoryHandlerErrorCode NO_RELATIONSHIPS_FOUND
-
NULL_ENTITY_RETURNED
public static final RepositoryHandlerErrorCode NULL_ENTITY_RETURNED
-
MULTIPLE_ENTITIES_FOUND
public static final RepositoryHandlerErrorCode MULTIPLE_ENTITIES_FOUND
-
NULL_ENTITY_RETURNED_FOR_CLASSIFICATION
public static final RepositoryHandlerErrorCode NULL_ENTITY_RETURNED_FOR_CLASSIFICATION
-
UNKNOWN_RELATIONSHIP
public static final RepositoryHandlerErrorCode UNKNOWN_RELATIONSHIP
-
NOT_EFFECTIVE_ELEMENT
public static final RepositoryHandlerErrorCode NOT_EFFECTIVE_ELEMENT
-
BROADER_EFFECTIVE_RELATIONSHIP
public static final RepositoryHandlerErrorCode BROADER_EFFECTIVE_RELATIONSHIP
-
NARROWER_EFFECTIVE_RELATIONSHIP
public static final RepositoryHandlerErrorCode NARROWER_EFFECTIVE_RELATIONSHIP
-
OVERLAPPING_EFFECTIVE_RELATIONSHIPS
public static final RepositoryHandlerErrorCode OVERLAPPING_EFFECTIVE_RELATIONSHIPS
-
FUNCTION_NOT_SUPPORTED
public static final RepositoryHandlerErrorCode FUNCTION_NOT_SUPPORTED
-
PROPERTY_SERVER_ERROR
public static final RepositoryHandlerErrorCode PROPERTY_SERVER_ERROR
-
UNABLE_TO_SET_ANCHORS
public static final RepositoryHandlerErrorCode UNABLE_TO_SET_ANCHORS
-
-
Method Detail
-
values
public static RepositoryHandlerErrorCode[] 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 (RepositoryHandlerErrorCode c : RepositoryHandlerErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RepositoryHandlerErrorCode 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<RepositoryHandlerErrorCode>- Returns:
- string of property names and values for this enum
-
-