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_LOCKEDaccount locked.CHANGE_AFTER_RESETchange after reset.INSUFFICIENT_PASSWORD_QUALITYinsufficient password quality.MUST_SUPPLY_OLD_PASSWORDmust supply old password.PASSWORD_EXPIREDpassword expired.PASSWORD_IN_HISTORYpassword in history.PASSWORD_MOD_NOT_ALLOWEDpassword modification not allowed.PASSWORD_TOO_LONGpassword too long.PASSWORD_TOO_SHORTpassword too short.PASSWORD_TOO_YOUNGpassword too young. 
- 
Field Summary
Fields Modifier and Type Field Description private intcodeunderlying error code. 
- 
Constructor Summary
Constructors Modifier Constructor Description privateError(int i)Creates a new 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.voidthrowSecurityException()Throws the LoginException that best maps to this error.static PasswordPolicyControl.ErrorvalueOf(int code)Returns the error for the supplied integer constant.static PasswordPolicyControl.ErrorvalueOf(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.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 PasswordPolicyControl.Error valueOf(int code)
Returns the error for the supplied integer constant.- Parameters:
 code- to find error for- Returns:
 - error
 
 
 - 
 
 -