/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
*/
/**
* This enumeration defines the set of password policy errors that may be
* included in the password policy response control defined in
* draft-behera-ldap-password-policy.
*/
public enum PasswordPolicyErrorType
{
/**
* The error type that will be used to indicate that the user's password is
* expired.
*/
/**
* The error type that will be used to indicate that the user's account is
* locked.
*/
/**
* The error type that will be used to indicate that the user's password must
* be changed because it has been administratively reset.
*/
/**
* The error type that will be used to indicate that user password changes are
* not allowed.
*/
3,
/**
* The error type that will be used to indicate that the user's current
* password must be provided in order to choose a new password.
*/
4,
/**
* The error type that will be used to indicate that the provided password is
* not acceptable according to the configured password validators.
*/
5,
/**
* The error type that will be used to indicate that the provided password is
* too short.
*/
/**
* The error type that will be used to indicate that the user's password is
* too young (i.e., it was changed too recently to allow it to be changed
* again).
*/
/**
* The error type that will be used to indicate that the provided password is
* in the user's password history.
*/
// A lookup table for resolving an error type from its integer value.
static
{
.values())
{
}
}
// The integer value associated with the error type to use in the associated
// enumerated element in the password policy response control.
private int value;
// The message ID for the description of this password policy error type.
/**
* Creates a new instance of a password policy error type with the provided
* value.
*
* @param value The integer value associated with the error type to
* use in the associated enumerated element in the
* password policy response control.
* @param description The message for the description of this password
* policy error type.
*/
{
this.description = description;
}
/**
* Retrieves the integer value associated with the error type to use in the
* associated enumerated element in the password policy response control.
*
* @return The integer value associated with the error type to use in the
* associated enumerated element in the password policy response
* control.
*/
public int intValue()
{
return value;
}
/**
* Retrieves the password policy error type for the provided integer value.
*
* @param value The value for which to retrieve the corresponding error
* type.
*
* @return The requested password policy error type, or <CODE>null</CODE> if
* the provided value does not match any error types.
*/
{
}
/**
* Retrieves a string representation of this password policy error type.
*
* @return A string representation of this password policy error type.
*/
{
return description.toString();
}
}