public static enum EDirectoryAccountState.Error extends Enum<EDirectoryAccountState.Error> implements AccountState.Error
Enum Constant and 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.
|
Modifier and Type | Field and Description |
---|---|
private int |
code
underlying error code.
|
private static Pattern |
PATTERN
pattern to find decimal code in edirectory messages.
|
Modifier and Type | Method and 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.
|
public static final EDirectoryAccountState.Error FAILED_AUTHENTICATION
public static final EDirectoryAccountState.Error PASSWORD_EXPIRED
public static final EDirectoryAccountState.Error BAD_PASSWORD
public static final EDirectoryAccountState.Error ACCOUNT_EXPIRED
public static final EDirectoryAccountState.Error MAXIMUM_LOGINS_EXCEEDED
public static final EDirectoryAccountState.Error LOGIN_TIME_LIMITED
public static final EDirectoryAccountState.Error LOGIN_LOCKOUT
private static final Pattern PATTERN
private final int code
public static EDirectoryAccountState.Error[] values()
for (EDirectoryAccountState.Error c : EDirectoryAccountState.Error.values()) System.out.println(c);
public static EDirectoryAccountState.Error valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getCode()
AccountState.Error
getCode
in interface AccountState.Error
public String getMessage()
AccountState.Error
getMessage
in interface AccountState.Error
public void throwSecurityException() throws LoginException
AccountState.Error
throwSecurityException
in interface AccountState.Error
LoginException
- for this account state errorpublic static EDirectoryAccountState.Error valueOf(int code)
code
- to find error forpublic static EDirectoryAccountState.Error parse(String message)
PATTERN
and parses the second group match as a decimal integer.message
- to parseCopyright © 2003-2019 Virginia Tech. All Rights Reserved.