org.opends.server.controls
Enum PasswordPolicyWarningType

java.lang.Object
  extended by java.lang.Enum<PasswordPolicyWarningType>
      extended by org.opends.server.controls.PasswordPolicyWarningType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PasswordPolicyWarningType>

public enum PasswordPolicyWarningType
extends java.lang.Enum<PasswordPolicyWarningType>

This enumeration defines the set of password policy warnings that may be included in the password policy response control defined in draft-behera-ldap-password-policy.


Enum Constant Summary
GRACE_LOGINS_REMAINING
          The warning type that will be used to indicate that the user is authenticating using a grace login and to provide the number of grace logins that the user has left.
TIME_BEFORE_EXPIRATION
          The warning type that will be used to indicate that the password will expire in the near future and to provide the length of time in seconds until expiration.
 
Field Summary
static byte TYPE_GRACE_LOGINS_REMAINING
          The BER type that will be used for the grace logins remaining type.
static byte TYPE_TIME_BEFORE_EXPIRATION
          The BER type that will be used for the time before expiration type.
 
Method Summary
 byte getType()
          Retrieves the BER type to use for the associated element in the password policy control.
 java.lang.String toString()
          Retrieves a string representation of this password policy warning type.
static PasswordPolicyWarningType valueOf(byte type)
          Retrieves the password policy warning type for the provided BER type.
static PasswordPolicyWarningType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PasswordPolicyWarningType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TIME_BEFORE_EXPIRATION

public static final PasswordPolicyWarningType TIME_BEFORE_EXPIRATION
The warning type that will be used to indicate that the password will expire in the near future and to provide the length of time in seconds until expiration.


GRACE_LOGINS_REMAINING

public static final PasswordPolicyWarningType GRACE_LOGINS_REMAINING
The warning type that will be used to indicate that the user is authenticating using a grace login and to provide the number of grace logins that the user has left.

Field Detail

TYPE_TIME_BEFORE_EXPIRATION

public static final byte TYPE_TIME_BEFORE_EXPIRATION
The BER type that will be used for the time before expiration type.

See Also:
Constant Field Values

TYPE_GRACE_LOGINS_REMAINING

public static final byte TYPE_GRACE_LOGINS_REMAINING
The BER type that will be used for the grace logins remaining type.

See Also:
Constant Field Values
Method Detail

values

public static PasswordPolicyWarningType[] 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 (PasswordPolicyWarningType c : PasswordPolicyWarningType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PasswordPolicyWarningType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getType

public byte getType()
Retrieves the BER type to use for the associated element in the password policy control.

Returns:
The BER type to use for the associated element in the password policy control.

valueOf

public static PasswordPolicyWarningType valueOf(byte type)
Retrieves the password policy warning type for the provided BER type.

Parameters:
type - The BER type for which to retrieve the corresponding password policy warning type.
Returns:
The requested password policy warning type, or null if none of the defined warning types have the provided BER type.

toString

public java.lang.String toString()
Retrieves a string representation of this password policy warning type.

Overrides:
toString in class java.lang.Enum<PasswordPolicyWarningType>
Returns:
A string representation of this password policy warning type.