Class PasswordPolicyResponseImpl
- java.lang.Object
-
- org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyResponseImpl
-
- All Implemented Interfaces:
PasswordPolicyResponse
public class PasswordPolicyResponseImpl extends Object implements PasswordPolicyResponse
A PasswordPolicyResponse.- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description PasswordPolicyResponseImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getGraceAuthNRemaining()
Returns the number of possible attempts on the password before it's locked.PasswordPolicyErrorEnum
getPasswordPolicyError()
Returns the password policy error.int
getTimeBeforeExpiration()
Returns the time before expiration.void
setGraceAuthNRemaining(int graceAuthNRemaining)
Sets the number of remaining wrong authentication for this password.void
setPasswordPolicyError(PasswordPolicyErrorEnum ppolicyError)
Sets the PasswordPolicy error.void
setTimeBeforeExpiration(int timeBeforeExpiration)
Set a date of expiration for the password.String
toString()
-
-
-
Constructor Detail
-
PasswordPolicyResponseImpl
public PasswordPolicyResponseImpl()
-
-
Method Detail
-
getTimeBeforeExpiration
public int getTimeBeforeExpiration()
Returns the time before expiration. Will return -1 if this warning was not present in the response.- Specified by:
getTimeBeforeExpiration
in 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:
setTimeBeforeExpiration
in 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:
getGraceAuthNRemaining
in 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:
setGraceAuthNRemaining
in interfacePasswordPolicyResponse
- Parameters:
graceAuthNRemaining
- The number of remaining attempts
-
getPasswordPolicyError
public PasswordPolicyErrorEnum getPasswordPolicyError()
Returns the password policy error.- Specified by:
getPasswordPolicyError
in interfacePasswordPolicyResponse
- Returns:
- The PasswordPolicyErrorEnum representing the error
-
setPasswordPolicyError
public void setPasswordPolicyError(PasswordPolicyErrorEnum ppolicyError)
Sets the PasswordPolicy error.- Specified by:
setPasswordPolicyError
in interfacePasswordPolicyResponse
- Parameters:
ppolicyError
- The PasswordPolicyErrorEnum representing the error
-
-