|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.password.AbstractDictionaryRule
public abstract class AbstractDictionaryRule
Provides common implementation for password dictionary rules.
| Field Summary | |
|---|---|
protected edu.vt.middleware.dictionary.Dictionary |
dictionary
Dictionary of words. |
static java.lang.String |
ERROR_CODE
Error code for matching dictionary word. |
static java.lang.String |
ERROR_CODE_REVERSED
Error code for matching reversed dictionary word. |
protected boolean |
matchBackwards
Whether to search for dictionary words backwards. |
| Constructor Summary | |
|---|---|
AbstractDictionaryRule()
|
|
| Method Summary | |
|---|---|
protected java.util.Map<java.lang.String,?> |
createRuleResultDetailParameters(java.lang.String word)
Creates the parameter data for the rule result detail. |
protected abstract java.lang.String |
doWordSearch(java.lang.String text)
Searches the dictionary with the supplied text. |
edu.vt.middleware.dictionary.Dictionary |
getDictionary()
Returns the dictionary used to search for passwords. |
boolean |
isMatchBackwards()
Returns true if the verify method will search the password for dictionary words spelled backwards as well as forwards. |
void |
setDictionary(edu.vt.middleware.dictionary.Dictionary dict)
Sets the dictionary used to search for passwords. |
void |
setMatchBackwards(boolean b)
This causes the verify method to search the password for dictionary words spelled backwards as well as forwards. |
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 |
| Field Detail |
|---|
public static final java.lang.String ERROR_CODE
public static final java.lang.String ERROR_CODE_REVERSED
protected edu.vt.middleware.dictionary.Dictionary dictionary
protected boolean matchBackwards
| Constructor Detail |
|---|
public AbstractDictionaryRule()
| Method Detail |
|---|
public void setDictionary(edu.vt.middleware.dictionary.Dictionary dict)
dict - to use for searchingpublic edu.vt.middleware.dictionary.Dictionary getDictionary()
public void setMatchBackwards(boolean b)
b - whether to match dictionary words backwardspublic boolean isMatchBackwards()
public RuleResult validate(PasswordData passwordData)
validate in interface RulepasswordData - to verify (not null).
protected java.util.Map<java.lang.String,?> createRuleResultDetailParameters(java.lang.String word)
word - matching word
protected abstract java.lang.String doWordSearch(java.lang.String text)
text - to search dictionary with
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 | ||||||||