com.ibm.passwordrules.standard
Class NotRepeated
java.lang.Object
|
+--com.ibm.passwordrules.BehavioralRule
|
+--com.ibm.passwordrules.standard.NotRepeated
- All Implemented Interfaces:
- java.lang.Cloneable, Rule, java.io.Serializable
- public class NotRepeated
- extends BehavioralRule
This class implements built-in rule for restricting passwords to be different
then previously used passwords present in a history list.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
REUSED
|
Constructor Summary |
NotRepeated()
Standard constructor. |
NotRepeated(int historyLength)
Constructor that specifies the length of the history to check. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REUSED
public static java.lang.String REUSED
NotRepeated
public NotRepeated()
- Standard constructor.
NotRepeated
public NotRepeated(int historyLength)
- Constructor that specifies the length of the history to check.
getHistoryLength
public int getHistoryLength()
setHistoryLength
public void setHistoryLength(int historyLength)
validate
public boolean validate(java.lang.String password,
ValidationInfo validationInfo)
throws InvalidPasswordException
- Validate the given password using the given validation info.
- Overrides:
validate
in class BehavioralRule
- Parameters:
validationInfo
- contains contextual information about the password being validated.password
- Password to validate.- Returns:
- true if password is valid
- Throws:
InvalidPasswordException
- thrown when password is invalid.
join
public boolean join(Rule rule)
throws IncompatibleRulesException
- Try to join the specified rule with this one. The more restrictive
rule takes precedence.
- Overrides:
join
in class BehavioralRule
- Parameters:
rule
- The rule to be joined with this one.- Returns:
- True if the rule was successfully joined.
- Throws:
IncompatibleRulesException
- Thrown when given rule cannot be joined because it is not compatible.