java.lang.Object
java.lang.Enum<DocStoreErrorCode>
org.odpi.openmetadata.adapters.adminservices.configurationstore.encryptedfile.DocStoreErrorCode
All Implemented Interfaces:
Serializable, Comparable<DocStoreErrorCode>, Constable, ExceptionMessageSet

public enum DocStoreErrorCode extends Enum<DocStoreErrorCode> implements 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 Constants
    Enum Constant
    Description
    ENCRYPTED-DOC-STORE-500-002 - Unable to retrieve or generate the AEAD primitive
    ENCRYPTED-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 valid
    ENCRYPTED-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 key
    ENCRYPTED-DOC-STORE-400-009 - Unable to create secure file for storing encryption key
    ENCRYPTED-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 decryption
    ENCRYPTED-DOC-STORE-400-006 - Found multiple key files under secure directory, unable to determine which to use for decryption
    ENCRYPTED-DOC-STORE-400-011 - Unable to find any keys defined for decrypting the configuration
    ENCRYPTED-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 Type
    Method
    Description
    Retrieve a message definition object for an exception.
    Retrieve a message definition object for an exception.
    JSON-style toString
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • INIT_ERROR

      public static final DocStoreErrorCode INIT_ERROR
      ENCRYPTED-DOC-STORE-400-001 - Unable to initialize encryption library configuration; exception was {0} with message {1}
    • WRITE_ERROR

      public static final DocStoreErrorCode WRITE_ERROR
      ENCRYPTED-DOC-STORE-400-002 - Unable to write encrypted configuration file; exception was {0} with message {1}
    • READ_ERROR

      public static final DocStoreErrorCode READ_ERROR
      ENCRYPTED-DOC-STORE-400-003 - Unable to read encrypted configuration file; exception was {0} with message {1}
    • INVALID_KEYSTORE

      public static final DocStoreErrorCode INVALID_KEYSTORE
      ENCRYPTED-DOC-STORE-400-004 - Unable to parse the key store; exception was {0} with message {1}
    • KEYSTORE_NOT_DIRECTORY

      public static final DocStoreErrorCode 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

      public static final DocStoreErrorCode MULTIPLE_FILES
      ENCRYPTED-DOC-STORE-400-006 - Found multiple key files under secure directory, unable to determine which to use for decryption
    • MULTIPLE_DIRECTORIES

      public static final DocStoreErrorCode MULTIPLE_DIRECTORIES
      ENCRYPTED-DOC-STORE-400-007 - Found multiple key store directories, unable to determine which to use for decryption
    • INVALID_DIRECTORY

      public static final DocStoreErrorCode INVALID_DIRECTORY
      ENCRYPTED-DOC-STORE-400-008 - Unable to create secure location for storing encryption key
    • INVALID_FILE

      public static final DocStoreErrorCode INVALID_FILE
      ENCRYPTED-DOC-STORE-400-009 - Unable to create secure file for storing encryption key
    • KEYSTORE_EMPTY

      public static final DocStoreErrorCode 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

      public static final DocStoreErrorCode NO_KEYSTORE
      ENCRYPTED-DOC-STORE-400-011 - Unable to find any keys defined for decrypting the configuration
    • KEYSTORE_DELETE_ERROR

      public static final DocStoreErrorCode 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

      public static final DocStoreErrorCode 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

      public static final DocStoreErrorCode 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

      public static final DocStoreErrorCode 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

      public static final DocStoreErrorCode UNHANDLED_ERROR
      ENCRYPTED-DOC-STORE-500-001 - Unable to handle the error {0} with message {1}
    • AEAD_UNAVAILABLE

      public static final DocStoreErrorCode AEAD_UNAVAILABLE
      ENCRYPTED-DOC-STORE-500-002 - Unable to retrieve or generate the AEAD primitive
  • Method Details

    • values

      public static DocStoreErrorCode[] 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

      public static DocStoreErrorCode valueOf(String name)
      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 name
      NullPointerException - 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:
      getMessageDefinition in interface ExceptionMessageSet
      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:
      getMessageDefinition in interface ExceptionMessageSet
      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:
      toString in class Enum<DocStoreErrorCode>
      Returns:
      string of property names and values for this enum