Package org.ldaptive.auth.ext
Enum 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 ConstantsEnum ConstantDescriptionaccount expired.bad password.failed authentication.login lockout.login time limited.maximum logins exceeded.password expired. binds still succeed. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Returns the error code.Returns the error message.static EDirectoryAccountState.ErrorParses the supplied error messages and returns the corresponding error enum.voidThrows the LoginException that best maps to this error.static EDirectoryAccountState.ErrorvalueOf(int code) Returns the error for the supplied integer constant.static EDirectoryAccountState.ErrorReturns 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 Details
-
FAILED_AUTHENTICATION
failed authentication. -
PASSWORD_EXPIRED
password expired. binds still succeed. -
BAD_PASSWORD
bad password. -
ACCOUNT_EXPIRED
account expired. -
MAXIMUM_LOGINS_EXCEEDED
maximum logins exceeded. -
LOGIN_TIME_LIMITED
login time limited. -
LOGIN_LOCKOUT
login lockout.
-
-
Field Details
-
PATTERN
pattern to find decimal code in edirectory messages. -
code
private final int codeunderlying error code.
-
-
Constructor Details
-
Error
private Error(int i) Creates a new edirectory error.- Parameters:
i- error code
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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.ErrorReturns the error code.- Specified by:
getCodein interfaceAccountState.Error- Returns:
- error code
-
getMessage
Description copied from interface:AccountState.ErrorReturns the error message.- Specified by:
getMessagein interfaceAccountState.Error- Returns:
- error message
-
throwSecurityException
Description copied from interface:AccountState.ErrorThrows the LoginException that best maps to this error.- Specified by:
throwSecurityExceptionin interfaceAccountState.Error- Throws:
LoginException- for this account state error
-
valueOf
Returns the error for the supplied integer constant.- Parameters:
code- to find error for- Returns:
- error
-
parse
Parses the supplied error messages and returns the corresponding error enum. Attempts to findPATTERNand parses the second group match as a decimal integer.- Parameters:
message- to parse- Returns:
- edirectory error
-