edu.vt.middleware.password
Class DictionaryRule

java.lang.Object
  extended by edu.vt.middleware.password.AbstractDictionaryRule
      extended by edu.vt.middleware.password.DictionaryRule
All Implemented Interfaces:
Rule

public class DictionaryRule
extends AbstractDictionaryRule

Rule for determining if a password matches a dictionary word. This rule will optionally also check for reversed words.

Version:
$Revision: 1926 $ $Date: 2011-04-26 15:52:24 -0400 (Tue, 26 Apr 2011) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.password.AbstractDictionaryRule
dictionary, ERROR_CODE, ERROR_CODE_REVERSED, matchBackwards
 
Constructor Summary
DictionaryRule()
          Creates a new dictionary rule without supplying a dictionary.
DictionaryRule(edu.vt.middleware.dictionary.Dictionary dict)
          Creates a new dictionary rule.
 
Method Summary
protected  java.lang.String doWordSearch(java.lang.String text)
          Searches the dictionary with the supplied text.
 
Methods inherited from class edu.vt.middleware.password.AbstractDictionaryRule
createRuleResultDetailParameters, getDictionary, isMatchBackwards, setDictionary, setMatchBackwards, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DictionaryRule

public DictionaryRule()
Creates a new dictionary rule without supplying a dictionary. The dictionary should be set using AbstractDictionaryRule.setDictionary(Dictionary).


DictionaryRule

public DictionaryRule(edu.vt.middleware.dictionary.Dictionary dict)
Creates a new dictionary rule. The dictionary should be ready to use when passed to this constructor.

Parameters:
dict - to use for searching
Method Detail

doWordSearch

protected java.lang.String doWordSearch(java.lang.String text)
Searches the dictionary with the supplied text.

Specified by:
doWordSearch in class AbstractDictionaryRule
Parameters:
text - to search dictionary with
Returns:
matching word


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.