org.ldaptive.control
Enum PasswordPolicyControl.Error

java.lang.Object
  extended by java.lang.Enum<PasswordPolicyControl.Error>
      extended by 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
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_SHORT
          password too short.
PASSWORD_TOO_YOUNG
          password too young.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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.

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 name
NullPointerException - if the argument is null

getCode

public int getCode()
Returns the error code.

Specified by:
getCode in interface AccountState.Error
Returns:
error code

getMessage

public String getMessage()
Returns the error message.

Specified by:
getMessage in interface AccountState.Error
Returns:
error message

throwSecurityException

public void throwSecurityException()
                            throws LoginException
Throws the LoginException that best maps to this error.

Specified by:
throwSecurityException in interface AccountState.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


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.