Package org.ldaptive.control
Enum PasswordPolicyControl.Error
- java.lang.Object
-
- java.lang.Enum<PasswordPolicyControl.Error>
-
- org.ldaptive.control.PasswordPolicyControl.Error
-
- All Implemented Interfaces:
Serializable
,Comparable<PasswordPolicyControl.Error>
,AccountState.Error
- Enclosing class:
- PasswordPolicyControl
public static enum PasswordPolicyControl.Error extends Enum<PasswordPolicyControl.Error> implements AccountState.Error
Enum for ppolicy errors.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCOUNT_LOCKED
account locked.CHANGE_AFTER_RESET
change after reset.INSUFFICIENT_PASSWORD_QUALITY
insufficient password quality.MUST_SUPPLY_OLD_PASSWORD
must supply old password.PASSWORD_EXPIRED
password expired.PASSWORD_IN_HISTORY
password in history.PASSWORD_MOD_NOT_ALLOWED
password modification not allowed.PASSWORD_TOO_LONG
password too long.PASSWORD_TOO_SHORT
password too short.PASSWORD_TOO_YOUNG
password too young.
-
Field Summary
Fields Modifier and Type Field Description private int
code
underlying error code.
-
Constructor Summary
Constructors Modifier Constructor Description private
Error(int i)
Creates a new 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.void
throwSecurityException()
Throws the LoginException that best maps to this error.static PasswordPolicyControl.Error
valueOf(int code)
Returns the error for the supplied integer constant.static PasswordPolicyControl.Error
valueOf(String name)
Returns the enum constant of this type with the specified name.static PasswordPolicyControl.Error[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PASSWORD_EXPIRED
public static final PasswordPolicyControl.Error PASSWORD_EXPIRED
password expired.
-
ACCOUNT_LOCKED
public static final PasswordPolicyControl.Error ACCOUNT_LOCKED
account locked.
-
CHANGE_AFTER_RESET
public static final PasswordPolicyControl.Error CHANGE_AFTER_RESET
change after reset.
-
PASSWORD_MOD_NOT_ALLOWED
public static final PasswordPolicyControl.Error PASSWORD_MOD_NOT_ALLOWED
password modification not allowed.
-
MUST_SUPPLY_OLD_PASSWORD
public static final PasswordPolicyControl.Error MUST_SUPPLY_OLD_PASSWORD
must supply old password.
-
INSUFFICIENT_PASSWORD_QUALITY
public static final PasswordPolicyControl.Error INSUFFICIENT_PASSWORD_QUALITY
insufficient password quality.
-
PASSWORD_TOO_SHORT
public static final PasswordPolicyControl.Error PASSWORD_TOO_SHORT
password too short.
-
PASSWORD_TOO_YOUNG
public static final PasswordPolicyControl.Error PASSWORD_TOO_YOUNG
password too young.
-
PASSWORD_IN_HISTORY
public static final PasswordPolicyControl.Error PASSWORD_IN_HISTORY
password in history.
-
PASSWORD_TOO_LONG
public static final PasswordPolicyControl.Error PASSWORD_TOO_LONG
password too long.
-
-
Method Detail
-
values
public static PasswordPolicyControl.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 (PasswordPolicyControl.Error c : PasswordPolicyControl.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 PasswordPolicyControl.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 PasswordPolicyControl.Error valueOf(int code)
Returns the error for the supplied integer constant.- Parameters:
code
- to find error for- Returns:
- error
-
-