Class PasswordPolicyResponseImpl
java.lang.Object
org.apache.directory.api.ldap.model.message.controls.AbstractControl
org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyResponseImpl
- All Implemented Interfaces:
PasswordPolicyResponse, org.apache.directory.api.ldap.model.message.Control
public class PasswordPolicyResponseImpl
extends org.apache.directory.api.ldap.model.message.controls.AbstractControl
implements PasswordPolicyResponse
A PasswordPolicyResponse.
- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from interface PasswordPolicyResponse
OID -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of a PasswordPolicy response Control. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of possible attempts on the password before it's locked.Returns the password policy error.intReturns the time before expiration.voidsetGraceAuthNRemaining(int graceAuthNRemaining) Sets the number of remaining wrong authentication for this password.voidsetPasswordPolicyError(PasswordPolicyErrorEnum ppolicyError) Sets the PasswordPolicy error.voidsetTimeBeforeExpiration(int timeBeforeExpiration) Set a date of expiration for the password.toString()Methods inherited from class org.apache.directory.api.ldap.model.message.controls.AbstractControl
equals, getOid, hashCode, isCritical, setCriticalMethods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
-
Constructor Details
-
PasswordPolicyResponseImpl
public PasswordPolicyResponseImpl()Creates a new instance of a PasswordPolicy response Control.
-
-
Method Details
-
getTimeBeforeExpiration
public int getTimeBeforeExpiration()Returns the time before expiration. Will return -1 if this warning was not present in the response.- Specified by:
getTimeBeforeExpirationin interfacePasswordPolicyResponse- Returns:
- The time before expiration of the password, or -1 if not set
-
setTimeBeforeExpiration
public void setTimeBeforeExpiration(int timeBeforeExpiration) Set a date of expiration for the password.- Specified by:
setTimeBeforeExpirationin interfacePasswordPolicyResponse- Parameters:
timeBeforeExpiration- The time before the password will expire
-
getGraceAuthNRemaining
public int getGraceAuthNRemaining()Returns the number of possible attempts on the password before it's locked. Will return -1 if this warning was not present in the response.- Specified by:
getGraceAuthNRemainingin interfacePasswordPolicyResponse- Returns:
- The number of possible attempts on the password before it's locked
-
setGraceAuthNRemaining
public void setGraceAuthNRemaining(int graceAuthNRemaining) Sets the number of remaining wrong authentication for this password.- Specified by:
setGraceAuthNRemainingin interfacePasswordPolicyResponse- Parameters:
graceAuthNRemaining- The number of remaining attempts
-
getPasswordPolicyError
Returns the password policy error.- Specified by:
getPasswordPolicyErrorin interfacePasswordPolicyResponse- Returns:
- The PasswordPolicyErrorEnum representing the error
-
setPasswordPolicyError
Sets the PasswordPolicy error.- Specified by:
setPasswordPolicyErrorin interfacePasswordPolicyResponse- Parameters:
ppolicyError- The PasswordPolicyErrorEnum representing the error
-
toString
- Overrides:
toStringin classorg.apache.directory.api.ldap.model.message.controls.AbstractControl
-