com.unboundid.ldap.sdk.unboundidds.extensions
Class GetPasswordQualityRequirementsExtendedResult

java.lang.Object
  extended by com.unboundid.ldap.sdk.LDAPResult
      extended by com.unboundid.ldap.sdk.ExtendedResult
          extended by com.unboundid.ldap.sdk.unboundidds.extensions.GetPasswordQualityRequirementsExtendedResult
All Implemented Interfaces:
LDAPResponse, java.io.Serializable

@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class GetPasswordQualityRequirementsExtendedResult
extends ExtendedResult

NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.
This class provides an implementation of an extended result that can provide information about the requirements that the server will enforce for operations that change or replace a user's password, including adding a new user, a user changing his/her own password, and an administrator resetting another user's password.

If the get password quality request was processed successfully, then the result will include an OID of 1.3.6.1.4.1.30221.2.6.44 and a value with the following encoding:
   GetPasswordQualityRequirementsResultValue ::= SEQUENCE {
        requirements                SEQUENCE OF PasswordQualityRequirement,
        currentPasswordRequired     [0] BOOLEAN OPTIONAL,
        mustChangePassword          [1] BOOLEAN OPTIONAL,
        secondsUntilExpiration      [2] INTEGER OPTIONAL,
        ... }
 

See Also:
Serialized Form

Field Summary
static java.lang.String OID_GET_PASSWORD_QUALITY_REQUIREMENTS_RESULT
          The OID (1.3.6.1.4.1.30221.2.6.44) for the get password quality requirements extended result.
 
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS
 
Constructor Summary
GetPasswordQualityRequirementsExtendedResult(ExtendedResult r)
          Creates a new get password quality requirements extended result from the provided generic result.
GetPasswordQualityRequirementsExtendedResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, java.util.Collection<PasswordQualityRequirement> passwordRequirements, java.lang.Boolean currentPasswordRequired, java.lang.Boolean mustChangePassword, java.lang.Integer secondsUntilExpiration, Control... controls)
          Creates a new get password quality requirements extended result with the provided information.
 
Method Summary
 java.lang.Boolean getCurrentPasswordRequired()
          Retrieves a flag that indicates whether the target user will be required to provide his/her current password in order to set a new password with a self change.
 java.lang.String getExtendedResultName()
          Retrieves the user-friendly name for the extended result, if available.
 java.lang.Boolean getMustChangePassword()
          Retrieves a flag that indicates whether the target user will be required to immediately change his/her own password after the associated add or administrative reset operation before that user will be allowed to issue any other types of requests.
 java.util.List<PasswordQualityRequirement> getPasswordRequirements()
          Retrieves the list of password quality requirements that specify the constraints that a proposed password must satisfy in order to be accepted by the server in an operation of the type specified in the get password quality requirements request.
 java.lang.Integer getSecondsUntilExpiration()
          Retrieves the length of time, in seconds, that the new password will be considered valid after the change is applied.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this extended response to the provided buffer.
 
Methods inherited from class com.unboundid.ldap.sdk.ExtendedResult
getOID, getValue, hasValue, toString
 
Methods inherited from class com.unboundid.ldap.sdk.LDAPResult
getDiagnosticMessage, getMatchedDN, getMessageID, getReferralURLs, getResponseControl, getResponseControls, getResultCode, hasResponseControl, hasResponseControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OID_GET_PASSWORD_QUALITY_REQUIREMENTS_RESULT

public static final java.lang.String OID_GET_PASSWORD_QUALITY_REQUIREMENTS_RESULT
The OID (1.3.6.1.4.1.30221.2.6.44) for the get password quality requirements extended result.

See Also:
Constant Field Values
Constructor Detail

GetPasswordQualityRequirementsExtendedResult

public GetPasswordQualityRequirementsExtendedResult(int messageID,
                                                    ResultCode resultCode,
                                                    java.lang.String diagnosticMessage,
                                                    java.lang.String matchedDN,
                                                    java.lang.String[] referralURLs,
                                                    java.util.Collection<PasswordQualityRequirement> passwordRequirements,
                                                    java.lang.Boolean currentPasswordRequired,
                                                    java.lang.Boolean mustChangePassword,
                                                    java.lang.Integer secondsUntilExpiration,
                                                    Control... controls)
Creates a new get password quality requirements extended result with the provided information.

Parameters:
messageID - The message ID for the LDAP message that is associated with this LDAP result.
resultCode - The result code for the response. This must not be null.
diagnosticMessage - The diagnostic message for the response. This may be null if no diagnostic message is needed.
matchedDN - The matched DN for the response. This may be null if no matched DN is needed.
referralURLs - The set of referral URLs from the response. This may be null or empty if no referral URLs are needed.
passwordRequirements - The password quality requirements for this result. This must be null or empty if this result is for an operation that was not processed successfully. It may be null or empty if the server will not enforce any password quality requirements for the target operation.
currentPasswordRequired - Indicates whether the user will be required to provide his/her current password when performing a self change. This must be null if this result is for an operation that was not processed successfully or if the target operation is not a self change.
mustChangePassword - Indicates whether the user will be required to change their password after the associated add or administrative reset before that user will be allowed to issue any other requests. This must be null if this result is for an operation that was not processed successfully or if the target operation is not an add or an administrative reset.
secondsUntilExpiration - Indicates the maximum length of time, in seconds, that the password set in the target operation will be valid. If mustChangePassword is true then this will indicate the length of time that the user has to change his/her password after the add/reset. If mustChangePassword is null or false then this will indicate the length of time until the password expires. This must be null if this result is for an operation that was not processed successfully, or if the new password will be valid indefinitely.
controls - The set of controls to include in the result. It may be null or empty if no controls are needed.

GetPasswordQualityRequirementsExtendedResult

public GetPasswordQualityRequirementsExtendedResult(ExtendedResult r)
                                             throws LDAPException
Creates a new get password quality requirements extended result from the provided generic result.

Parameters:
r - The generic extended result to parse as a get password quality requirements result.
Throws:
LDAPException - If the provided generic extended result cannot be parsed as a get password quality requirements result.
Method Detail

getPasswordRequirements

public java.util.List<PasswordQualityRequirement> getPasswordRequirements()
Retrieves the list of password quality requirements that specify the constraints that a proposed password must satisfy in order to be accepted by the server in an operation of the type specified in the get password quality requirements request.

Returns:
A list of the password quality requirements returned by the server, or an empty list if this result is for a non-successful get password quality requirements operation or if the server will not impose any password quality requirements for the specified operation type.

getCurrentPasswordRequired

public java.lang.Boolean getCurrentPasswordRequired()
Retrieves a flag that indicates whether the target user will be required to provide his/her current password in order to set a new password with a self change.

Returns:
A value of Boolean.TRUE if the target operation is a self change and the user will be required to provide his/her current password when setting a new one, Boolean.FALSE if the target operation is a self change and the user will not be required to provide his/her current password, or null if the target operation is not a self change or if this result is for a non-successful get password quality requirements operation.

getMustChangePassword

public java.lang.Boolean getMustChangePassword()
Retrieves a flag that indicates whether the target user will be required to immediately change his/her own password after the associated add or administrative reset operation before that user will be allowed to issue any other types of requests.

Returns:
A value of Boolean.TRUE if the target operation is an add or administrative reset and the user will be required to immediately perform a self change to select a new password before being allowed to perform any other kinds of operations, Boolean.FALSE if the target operation is an add or administrative reset but the user will not be required to immediately select a new password with a self change, or null if the target operation is not an add or administrative reset, or if this result is for a non-successful get password quality requirements operation.

getSecondsUntilExpiration

public java.lang.Integer getSecondsUntilExpiration()
Retrieves the length of time, in seconds, that the new password will be considered valid after the change is applied. If the associated operation is an add or an administrative reset and getMustChangePassword() returns Boolean.TRUE, then this will indicate the length of time that the user has to choose a new password with a self change before the account becomes locked. If the associated operation is a self change, or if getMustChangePassword returns Boolean.FALSE, then this will indicate the maximum length of time that the newly-selected password may be used until it expires.

Returns:
The length of time, in seconds, that the new password will be considered valid after the change is applied, or null if this result is for a non-successful get password quality requirements operation or if the newly-selected password can be used indefinitely.

getExtendedResultName

public java.lang.String getExtendedResultName()
Retrieves the user-friendly name for the extended result, if available. If no user-friendly name has been defined, but a response OID is available, then that will be returned. If neither a user-friendly name nor a response OID are available, then null will be returned.

Overrides:
getExtendedResultName in class ExtendedResult
Returns:
The user-friendly name for this extended request, the response OID if a user-friendly name is not available but a response OID is, or null if neither a user-friendly name nor a response OID are available.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this extended response to the provided buffer.

Specified by:
toString in interface LDAPResponse
Overrides:
toString in class ExtendedResult
Parameters:
buffer - The buffer to which a string representation of this extended response will be appended.