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

NonAlphanumericCharacterRule contains methods 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
numCharacters
 
Constructor Summary
NonAlphanumericCharacterRule()
          Default constructor.
NonAlphanumericCharacterRule(int num)
          This will create a new NonAlphanumericCharacterRule with the supplied number of non-alphanumeric characters to enforce.
 
Method Summary
protected  int getNumberOfCharacterType(Password password)
          Returns the number of the type of characters in the supplied password for the implementing class.
protected  java.lang.String getRuleResultDetailMessage()
          Returns the detail message for the implementing class should this rule fail validation.
 java.lang.String getValidCharacters()
          Returns the characters that are considered valid for this rule.
 
Methods inherited from class edu.vt.middleware.password.AbstractCharacterRule
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)
This will create a new NonAlphanumericCharacterRule with the supplied number of non-alphanumeric characters to enforce.

Parameters:
num - int
Method Detail

getValidCharacters

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

Returns:
char[]

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 - Password to get character count from
Returns:
int number of characters

getRuleResultDetailMessage

protected java.lang.String getRuleResultDetailMessage()
Returns the detail message for the implementing class should this rule fail validation.

Specified by:
getRuleResultDetailMessage in class AbstractCharacterRule
Returns:
String detail message


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