edu.vt.middleware.password
Class NonAlphanumericCharacterRule

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

public class NonAlphanumericCharacterRule
extends AbstractCharacterRule

Rule for determining if a password contains the correct number of non-alphanumeric 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
NonAlphanumericCharacterRule()
          Default constructor.
NonAlphanumericCharacterRule(int num)
          Creates a new non alphanumeric 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

NonAlphanumericCharacterRule

public NonAlphanumericCharacterRule()
Default constructor.


NonAlphanumericCharacterRule

public NonAlphanumericCharacterRule(int num)
Creates a new non alphanumeric character rule.

Parameters:
num - number of non-alphanumeric 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.