Enum Class EDirectoryAccountState.Error

java.lang.Object
java.lang.Enum<EDirectoryAccountState.Error>
org.ldaptive.auth.ext.EDirectoryAccountState.Error
All Implemented Interfaces:
Serializable, Comparable<EDirectoryAccountState.Error>, Constable, AccountState.Error
Enclosing class:
EDirectoryAccountState

public static enum EDirectoryAccountState.Error extends Enum<EDirectoryAccountState.Error> implements AccountState.Error
Enum to define edirectory errors. See http://support.novell.com/docs/Tids/Solutions/10067240.html and http://www.novell.com/documentation/nwec/nwec_enu/nwec_nds_error_codes.html
  • Enum Constant Details

  • Field Details

    • PATTERN

      private static final Pattern PATTERN
      pattern to find decimal code in edirectory messages.
    • code

      private final int code
      underlying error code.
  • Constructor Details

    • Error

      private Error(int i)
      Creates a new edirectory error.
      Parameters:
      i - error code
  • Method Details

    • values

      public static EDirectoryAccountState.Error[] 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 EDirectoryAccountState.Error 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
    • getCode

      public int getCode()
      Description copied from interface: AccountState.Error
      Returns the error code.
      Specified by:
      getCode in interface AccountState.Error
      Returns:
      error code
    • getMessage

      public String getMessage()
      Description copied from interface: AccountState.Error
      Returns the error message.
      Specified by:
      getMessage in interface AccountState.Error
      Returns:
      error message
    • throwSecurityException

      public void throwSecurityException() throws LoginException
      Description copied from interface: AccountState.Error
      Throws the LoginException that best maps to this error.
      Specified by:
      throwSecurityException in interface AccountState.Error
      Throws:
      LoginException - for this account state error
    • valueOf

      public static EDirectoryAccountState.Error valueOf(int code)
      Returns the error for the supplied integer constant.
      Parameters:
      code - to find error for
      Returns:
      error
    • parse

      public static EDirectoryAccountState.Error parse(String message)
      Parses the supplied error messages and returns the corresponding error enum. Attempts to find PATTERN and parses the second group match as a decimal integer.
      Parameters:
      message - to parse
      Returns:
      edirectory error