Package org.ldaptive.auth.ext
Enum EDirectoryAccountState.Error
- java.lang.Object
-
- java.lang.Enum<EDirectoryAccountState.Error>
-
- 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
Enum Constants Enum Constant Description 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.
-
Constructor Summary
Constructors Modifier Constructor Description private
Error(int i)
Creates a new edirectory error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-
Field Detail
-
PATTERN
private static final Pattern PATTERN
pattern to find decimal code in edirectory messages.
-
code
private final int code
underlying error code.
-
-
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 nameNullPointerException
- if the argument is null
-
getCode
public int getCode()
Description copied from interface:AccountState.Error
Returns the error code.- Specified by:
getCode
in interfaceAccountState.Error
- Returns:
- error code
-
getMessage
public String getMessage()
Description copied from interface:AccountState.Error
Returns the error message.- Specified by:
getMessage
in interfaceAccountState.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 interfaceAccountState.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 findPATTERN
and parses the second group match as a decimal integer.- Parameters:
message
- to parse- Returns:
- edirectory error
-
-