edu.vt.middleware.password
Class AlphabeticalCharacterRule

java.lang.Object
  extended by edu.vt.middleware.password.AbstractCharacterRule
      extended by edu.vt.middleware.password.AlphabeticalCharacterRule
All Implemented Interfaces:
CharacterRule, Rule

public class AlphabeticalCharacterRule
extends AbstractCharacterRule

Rule for determining if a password contains the correct number of alphabetical characters.

Version:
$Revision: 1636 $ $Date: 2010-10-04 11:12:15 -0400 (Mon, 04 Oct 2010) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.password.AbstractCharacterRule
ERROR_CODE, numCharacters
 
Constructor Summary
AlphabeticalCharacterRule()
          Default constructor.
AlphabeticalCharacterRule(int num)
          Creates a new alphabetical character rule.
 
Method Summary
protected  String getCharacterType()
          Returns the type of character managed by this rule.
protected  int getNumberOfCharacterType(Password password)
          Returns the number of the type of characters in the supplied password for the implementing class.
 String getValidCharacters()
          Returns the characters that are considered valid for this rule.
 
Methods inherited from class edu.vt.middleware.password.AbstractCharacterRule
createRuleResultDetailParameters, getNumberOfCharacters, setNumberOfCharacters, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlphabeticalCharacterRule

public AlphabeticalCharacterRule()
Default constructor.


AlphabeticalCharacterRule

public AlphabeticalCharacterRule(int num)
Creates a new alphabetical character rule.

Parameters:
num - of alphabetical characters to enforce
Method Detail

getValidCharacters

public String getValidCharacters()
Returns the characters that are considered valid for this rule.

Returns:
valid characters

getNumberOfCharacterType

protected int getNumberOfCharacterType(Password password)
Returns the number of the type of characters in the supplied password for the implementing class.

Specified by:
getNumberOfCharacterType in class AbstractCharacterRule
Parameters:
password - to get character count from
Returns:
number of characters

getCharacterType

protected String getCharacterType()
Returns the type of character managed by this rule.

Specified by:
getCharacterType in class AbstractCharacterRule
Returns:
name of a character type, e.g. "digits."


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