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_EXPIREDaccount expired.BAD_PASSWORDbad password.FAILED_AUTHENTICATIONfailed authentication.LOGIN_LOCKOUTlogin lockout.LOGIN_TIME_LIMITEDlogin time limited.MAXIMUM_LOGINS_EXCEEDEDmaximum logins exceeded.PASSWORD_EXPIREDpassword expired. binds still succeed.
-
Constructor Summary
Constructors Modifier Constructor Description privateError(int i)Creates a new edirectory error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()Returns the error code.StringgetMessage()Returns the error message.static EDirectoryAccountState.Errorparse(String message)Parses the supplied error messages and returns the corresponding error enum.voidthrowSecurityException()Throws the LoginException that best maps to this error.static EDirectoryAccountState.ErrorvalueOf(int code)Returns the error for the supplied integer constant.static EDirectoryAccountState.ErrorvalueOf(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.ErrorReturns the error code.- Specified by:
getCodein interfaceAccountState.Error- Returns:
- error code
-
getMessage
public String getMessage()
Description copied from interface:AccountState.ErrorReturns the error message.- Specified by:
getMessagein interfaceAccountState.Error- Returns:
- error message
-
throwSecurityException
public void throwSecurityException() throws LoginExceptionDescription 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
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 findPATTERNand parses the second group match as a decimal integer.- Parameters:
message- to parse- Returns:
- edirectory error
-
-