Enum Class DocStoreErrorCode
java.lang.Object
java.lang.Enum<DocStoreErrorCode>
org.odpi.openmetadata.adapters.adminservices.configurationstore.encryptedfile.DocStoreErrorCode
- All Implemented Interfaces:
Serializable
,Comparable<DocStoreErrorCode>
,Constable
,ExceptionMessageSet
The DocStoreErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with
the encrypted file based doc store. It is used in conjunction with all 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 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 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 ConstantDescriptionENCRYPTED-DOC-STORE-500-002 - Unable to retrieve or generate the AEAD primitiveENCRYPTED-DOC-STORE-400-013 - Unable to delete the encrypted configuration file {0}; exception was {1} with message {2}ENCRYPTED-DOC-STORE-400-014 - Unable to retrieve the encrypted configuration files; exception was {0} with message {1}, while attempting access file {2}ENCRYPTED-DOC-STORE-400-015 - Unable to retrieve the encrypted configuration files because the store template name {0} is not validENCRYPTED-DOC-STORE-400-001 - Unable to initialize encryption library configuration; exception was {0} with message {1}ENCRYPTED-DOC-STORE-400-008 - Unable to create secure location for storing encryption keyENCRYPTED-DOC-STORE-400-009 - Unable to create secure file for storing encryption keyENCRYPTED-DOC-STORE-400-004 - Unable to parse the key store; exception was {0} with message {1}ENCRYPTED-DOC-STORE-400-012 - Unable to delete the secure key storage location; exception was {0} with message {1}ENCRYPTED-DOC-STORE-400-010 - Unable to find any file containing keys in the secure directory, and unable to remove the directory; exception was {0} with message {1}ENCRYPTED-DOC-STORE-400-005 - Found a file with the expected prefix 'keystore_', when this must be a directory: {1}ENCRYPTED-DOC-STORE-400-007 - Found multiple key store directories, unable to determine which to use for decryptionENCRYPTED-DOC-STORE-400-006 - Found multiple key files under secure directory, unable to determine which to use for decryptionENCRYPTED-DOC-STORE-400-011 - Unable to find any keys defined for decrypting the configurationENCRYPTED-DOC-STORE-400-003 - Unable to read encrypted configuration file; exception was {0} with message {1}ENCRYPTED-DOC-STORE-500-001 - Unable to handle the error {0} with message {1}ENCRYPTED-DOC-STORE-400-002 - Unable to write encrypted configuration file; exception was {0} with message {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 DocStoreErrorCode
Returns the enum constant of this class with the specified name.static DocStoreErrorCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INIT_ERROR
ENCRYPTED-DOC-STORE-400-001 - Unable to initialize encryption library configuration; exception was {0} with message {1} -
WRITE_ERROR
ENCRYPTED-DOC-STORE-400-002 - Unable to write encrypted configuration file; exception was {0} with message {1} -
READ_ERROR
ENCRYPTED-DOC-STORE-400-003 - Unable to read encrypted configuration file; exception was {0} with message {1} -
INVALID_KEYSTORE
ENCRYPTED-DOC-STORE-400-004 - Unable to parse the key store; exception was {0} with message {1} -
KEYSTORE_NOT_DIRECTORY
ENCRYPTED-DOC-STORE-400-005 - Found a file with the expected prefix 'keystore_', when this must be a directory: {1} -
MULTIPLE_FILES
ENCRYPTED-DOC-STORE-400-006 - Found multiple key files under secure directory, unable to determine which to use for decryption -
MULTIPLE_DIRECTORIES
ENCRYPTED-DOC-STORE-400-007 - Found multiple key store directories, unable to determine which to use for decryption -
INVALID_DIRECTORY
ENCRYPTED-DOC-STORE-400-008 - Unable to create secure location for storing encryption key -
INVALID_FILE
ENCRYPTED-DOC-STORE-400-009 - Unable to create secure file for storing encryption key -
KEYSTORE_EMPTY
ENCRYPTED-DOC-STORE-400-010 - Unable to find any file containing keys in the secure directory, and unable to remove the directory; exception was {0} with message {1} -
NO_KEYSTORE
ENCRYPTED-DOC-STORE-400-011 - Unable to find any keys defined for decrypting the configuration -
KEYSTORE_DELETE_ERROR
ENCRYPTED-DOC-STORE-400-012 - Unable to delete the secure key storage location; exception was {0} with message {1} -
CONFIG_DELETE_ERROR
ENCRYPTED-DOC-STORE-400-013 - Unable to delete the encrypted configuration file {0}; exception was {1} with message {2} -
CONFIG_RETRIEVE_ALL_ERROR
ENCRYPTED-DOC-STORE-400-014 - Unable to retrieve the encrypted configuration files; exception was {0} with message {1}, while attempting access file {2} -
CONFIG_RETRIEVE_ALL_ERROR_INVALID_TEMPLATE
ENCRYPTED-DOC-STORE-400-015 - Unable to retrieve the encrypted configuration files because the store template name {0} is not valid -
UNHANDLED_ERROR
ENCRYPTED-DOC-STORE-500-001 - Unable to handle the error {0} with message {1} -
AEAD_UNAVAILABLE
ENCRYPTED-DOC-STORE-500-002 - Unable to retrieve or generate the AEAD primitive
-
-
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<DocStoreErrorCode>
- Returns:
- string of property names and values for this enum
-