public abstract class BehavioralRule extends java.lang.Object implements Rule, java.lang.Cloneable, java.io.Serializable
| Constructor and Description |
|---|
BehavioralRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
constrain(PasswordGenerator generator)
Some classes implementing Rule interface will not have a need to constrain the password generator.
|
java.lang.String |
getParameter()
This Rule interface method in is not valid in the context of standard rule classes.
|
boolean |
join(Rule rule)
Try to join the specified rule with this one.
|
void |
setParameter(java.lang.String parameter)
This Rule interface method in is not valid in the context of standard rule classes.
|
boolean |
validate(java.lang.String password,
ValidationInfo validationInfo)
Validate the given password using the given validation info.
|
boolean |
validateSafe(java.lang.String password,
ValidationInfo validationInfo)
Validate the given password using the given validation info.
|
public boolean validate(java.lang.String password,
ValidationInfo validationInfo)
throws InvalidPasswordException
validate in interface Rulepassword - Password to validate.validationInfo - contains contextual information about the password being validated.InvalidPasswordException - thrown when password is invalid.public boolean join(Rule rule) throws IncompatibleRulesException
join in interface Rulerule - The rule to be joined with this one.IncompatibleRulesException - Thrown when given rule cannot be joined because it is not compatible.public void constrain(PasswordGenerator generator)
public boolean validateSafe(java.lang.String password,
ValidationInfo validationInfo)
validateSafe in interface RulevalidationInfo - contains contextual information about the password being validated.password - Password to validate.public java.lang.String getParameter()
getParameter in interface Rulepublic void setParameter(java.lang.String parameter)
setParameter in interface Ruleparameter - String value of the parameter.