Modifier and Type | Field and Description |
---|---|
protected CharacterData |
characterData
Character data for this rule.
|
protected int |
numCharacters
Number of characters to require.
|
Constructor and Description |
---|
CharacterRule(CharacterData data)
Creates a new character rule.
|
CharacterRule(CharacterData data,
int num)
Creates a new character rule.
|
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
createRuleResultDetailParameters(String matchingChars)
Creates the parameter data for the rule result detail.
|
protected RuleResultMetadata |
createRuleResultMetadata(PasswordData password)
Creates the rule result metadata.
|
CharacterData |
getCharacterData()
Returns the character data for this rule.
|
int |
getNumberOfCharacters()
Returns the number of characters which must exist in order for a password to meet the requirements of this rule.
|
String |
getValidCharacters()
Returns the characters that are considered valid for this rule.
|
void |
setNumberOfCharacters(int n)
Sets the number of characters to require in a password.
|
String |
toString() |
RuleResult |
validate(PasswordData passwordData)
Validates the supplied password data per the requirements of this rule.
|
protected final CharacterData characterData
protected int numCharacters
public CharacterRule(CharacterData data)
data
- character data for this rulepublic CharacterRule(CharacterData data, int num)
data
- character data for this rulenum
- of characters to enforcepublic void setNumberOfCharacters(int n)
n
- number of characters to require where n > 0public int getNumberOfCharacters()
public CharacterData getCharacterData()
public String getValidCharacters()
public RuleResult validate(PasswordData passwordData)
Rule
protected Map<String,Object> createRuleResultDetailParameters(String matchingChars)
matchingChars
- characters found in the passwordprotected RuleResultMetadata createRuleResultMetadata(PasswordData password)
password
- data used for metadata creationCopyright © 2003-2024 Virginia Tech. All Rights Reserved.