org.ldaptive.auth.ext
Enum EDirectoryAccountState.Error

java.lang.Object
  extended by java.lang.Enum<EDirectoryAccountState.Error>
      extended by org.ldaptive.auth.ext.EDirectoryAccountState.Error
All Implemented Interfaces:
Serializable, Comparable<EDirectoryAccountState.Error>, 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 Summary
ACCOUNT_EXPIRED
          account expired.
BAD_PASSWORD
          bad password.
FAILED_AUTHENTICATION
          failed authentication.
LOGIN_LOCKOUT
          login lockout.
LOGIN_TIME_LIMITED
          login time limited.
MAXIMUM_LOGINS_EXCEEDED
          maximum logins exceeded.
PASSWORD_EXPIRED
          password expired.
 
Method Summary
 int getCode()
          Returns the error code.
 String getMessage()
          Returns the error message.
static EDirectoryAccountState.Error parse(String message)
          Parses the supplied error messages and returns the corresponding error enum.
 void throwSecurityException()
          Throws the LoginException that best maps to this error.
static EDirectoryAccountState.Error valueOf(int code)
          Returns the error for the supplied integer constant.
static EDirectoryAccountState.Error valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EDirectoryAccountState.Error[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FAILED_AUTHENTICATION

public static final EDirectoryAccountState.Error FAILED_AUTHENTICATION
failed authentication.


PASSWORD_EXPIRED

public static final EDirectoryAccountState.Error PASSWORD_EXPIRED
password expired. binds still succeed.


BAD_PASSWORD

public static final EDirectoryAccountState.Error BAD_PASSWORD
bad password.


ACCOUNT_EXPIRED

public static final EDirectoryAccountState.Error ACCOUNT_EXPIRED
account expired.


MAXIMUM_LOGINS_EXCEEDED

public static final EDirectoryAccountState.Error MAXIMUM_LOGINS_EXCEEDED
maximum logins exceeded.


LOGIN_TIME_LIMITED

public static final EDirectoryAccountState.Error LOGIN_TIME_LIMITED
login time limited.


LOGIN_LOCKOUT

public static final EDirectoryAccountState.Error LOGIN_LOCKOUT
login lockout.

Method Detail

values

public static EDirectoryAccountState.Error[] 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 (EDirectoryAccountState.Error c : EDirectoryAccountState.Error.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EDirectoryAccountState.Error 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 name
NullPointerException - if the argument is null

getCode

public int getCode()
Returns the error code.

Specified by:
getCode in interface AccountState.Error
Returns:
error code

getMessage

public String getMessage()
Returns the error message.

Specified by:
getMessage in interface AccountState.Error
Returns:
error message

throwSecurityException

public void throwSecurityException()
                            throws LoginException
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


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.