public static enum ActiveDirectoryAccountState.Error extends Enum<ActiveDirectoryAccountState.Error> implements AccountState.Error
Enum Constant and Description |
---|
ACCOUNT_DISABLED
account disabled.
|
ACCOUNT_EXPIRED
account expired.
|
ACCOUNT_LOCKED_OUT
account locked out.
|
INVALID_LOGON_HOURS
invalid logon hours.
|
INVALID_WORKSTATION
invalid workstation.
|
LOGON_FAILURE
logon failure.
|
NO_SUCH_USER
no such user.
|
PASSWORD_EXPIRED
password expired.
|
PASSWORD_MUST_CHANGE
password must change.
|
Modifier and Type | Field and Description |
---|---|
private int |
code
underlying error code.
|
private static int |
HEX_RADIX
hex radix for hex to decimal conversion.
|
private static Pattern |
PATTERN
pattern to find hex code in active directory messages.
|
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Returns the error code.
|
String |
getMessage()
Returns the error message.
|
static ActiveDirectoryAccountState.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 ActiveDirectoryAccountState.Error |
valueOf(int code)
Returns the error for the supplied integer constant.
|
static ActiveDirectoryAccountState.Error |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ActiveDirectoryAccountState.Error[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ActiveDirectoryAccountState.Error NO_SUCH_USER
public static final ActiveDirectoryAccountState.Error LOGON_FAILURE
public static final ActiveDirectoryAccountState.Error INVALID_LOGON_HOURS
public static final ActiveDirectoryAccountState.Error INVALID_WORKSTATION
public static final ActiveDirectoryAccountState.Error PASSWORD_EXPIRED
public static final ActiveDirectoryAccountState.Error ACCOUNT_DISABLED
public static final ActiveDirectoryAccountState.Error ACCOUNT_EXPIRED
public static final ActiveDirectoryAccountState.Error PASSWORD_MUST_CHANGE
public static final ActiveDirectoryAccountState.Error ACCOUNT_LOCKED_OUT
private static final int HEX_RADIX
private static final Pattern PATTERN
private final int code
public static ActiveDirectoryAccountState.Error[] values()
for (ActiveDirectoryAccountState.Error c : ActiveDirectoryAccountState.Error.values()) System.out.println(c);
public static ActiveDirectoryAccountState.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 ActiveDirectoryAccountState.Error valueOf(int code)
code
- to find error forpublic static ActiveDirectoryAccountState.Error parse(String message)
PATTERN
and parses the first group match as a hexadecimal integer.message
- to parseCopyright © 2003-2019 Virginia Tech. All Rights Reserved.