|
|||||||||
| 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
AbstractCharacterRule provides common implementation for
password character rules.
| Field Summary | |
|---|---|
protected int |
numCharacters
number of characters to require. |
| Constructor Summary | |
|---|---|
AbstractCharacterRule()
|
|
| Method Summary | |
|---|---|
int |
getNumberOfCharacters()
This 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. |
protected abstract java.lang.String |
getRuleResultDetailMessage()
Returns the detail message for the implementing class should this rule fail validation. |
void |
setNumberOfCharacters(int n)
This sets the number of characters to require in a password. |
java.lang.String |
toString()
This returns a string representation of this object. |
RuleResult |
validate(PasswordData passwordData)
This returns whether or not the supplied password data meets 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 |
|---|
protected int numCharacters
| Constructor Detail |
|---|
public AbstractCharacterRule()
| Method Detail |
|---|
public void setNumberOfCharacters(int n)
setNumberOfCharacters in interface CharacterRulen - int number of characters to require where n > 0public int getNumberOfCharacters()
getNumberOfCharacters in interface CharacterRuleint number of characters to requireprotected abstract int getNumberOfCharacterType(Password password)
password - Password to get character count from
int number of charactersprotected abstract java.lang.String getRuleResultDetailMessage()
String detail messagepublic RuleResult validate(PasswordData passwordData)
validate in interface RulepasswordData - PasswordData to verify (not null).
RuleResult - details on password verificationpublic java.lang.String toString()
toString in class java.lang.ObjectString
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||