| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_CODE_MAX
Error code for password too long.
|
static String |
ERROR_CODE_MIN
Error code for password too short.
|
| Constructor and Description |
|---|
LengthRule()
Creates a new length rule with lengths unset.
|
LengthRule(int length)
Creates a new length rule with the supplied length.
|
LengthRule(int minLength,
int maxLength)
Create a new length rule.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
createRuleResultDetailParameters()
Creates the parameter data for the rule result detail.
|
protected RuleResultMetadata |
createRuleResultMetadata(PasswordData password)
Creates the rule result metadata.
|
int |
getMaximumLength()
Returns the maximum password length.
|
int |
getMinimumLength()
Returns the minimum password length.
|
void |
setMaximumLength(int maxLength)
Sets the maximum password length.
|
void |
setMinimumLength(int minLength)
Sets the minimum password length.
|
String |
toString() |
RuleResult |
validate(PasswordData passwordData)
Validates the supplied password data per the requirements of this rule.
|
public static final String ERROR_CODE_MIN
public static final String ERROR_CODE_MAX
public LengthRule()
public LengthRule(int length)
length - length of passwordpublic LengthRule(int minLength,
int maxLength)
minLength - minimum length of a passwordmaxLength - maximum length of a passwordpublic void setMinimumLength(int minLength)
minLength - minimum length of a passwordpublic int getMinimumLength()
public void setMaximumLength(int maxLength)
maxLength - maximum length of a passwordpublic int getMaximumLength()
public RuleResult validate(PasswordData passwordData)
Ruleprotected Map<String,Object> createRuleResultDetailParameters()
protected RuleResultMetadata createRuleResultMetadata(PasswordData password)
password - data used for metadata creationCopyright © 2003-2024 Virginia Tech. All Rights Reserved.