|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.password.AbstractCharacterRule
public abstract class AbstractCharacterRule
Provides common implementation for password character rules.
| Field Summary | |
|---|---|
static java.lang.String |
ERROR_CODE
Error code for insufficient number of characters of particular class. |
protected int |
numCharacters
Number of characters to require. |
| Constructor Summary | |
|---|---|
AbstractCharacterRule()
|
|
| Method Summary | |
|---|---|
protected java.util.Map<java.lang.String,?> |
createRuleResultDetailParameters(Password p)
Creates the parameter data for the rule result detail. |
protected abstract java.lang.String |
getCharacterType()
Returns the type of character managed by this rule. |
int |
getNumberOfCharacters()
Returns the number of characters which must exist in order for a password to meet the requirements of this rule. |
protected abstract int |
getNumberOfCharacterType(Password password)
Returns the number of the type of characters in the supplied password for the implementing class. |
void |
setNumberOfCharacters(int n)
Sets the number of characters to require in a password. |
java.lang.String |
toString()
Returns a string representation of this object. |
RuleResult |
validate(PasswordData passwordData)
Validates the supplied password data per the requirements of this rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.vt.middleware.password.CharacterRule |
|---|
getValidCharacters |
| Field Detail |
|---|
public static final java.lang.String ERROR_CODE
protected int numCharacters
| Constructor Detail |
|---|
public AbstractCharacterRule()
| Method Detail |
|---|
public void setNumberOfCharacters(int n)
setNumberOfCharacters in interface CharacterRulen - number of characters to require where n > 0public int getNumberOfCharacters()
getNumberOfCharacters in interface CharacterRuleprotected abstract int getNumberOfCharacterType(Password password)
password - to get character count from
protected abstract java.lang.String getCharacterType()
public RuleResult validate(PasswordData passwordData)
validate in interface RulepasswordData - to verify (not null).
protected java.util.Map<java.lang.String,?> createRuleResultDetailParameters(Password p)
p - password
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||