edu.vt.middleware.password
Class DigitCharacterRule

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

public class DigitCharacterRule
extends AbstractCharacterRule

DigitCharacterRule contains methods for determining if a password contains the correct number of digit 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
DigitCharacterRule()
          Default constructor.
DigitCharacterRule(int num)
          This will create a new DigitCharacterRule with the supplied number of digit 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

DigitCharacterRule

public DigitCharacterRule()
Default constructor.


DigitCharacterRule

public DigitCharacterRule(int num)
This will create a new DigitCharacterRule with the supplied number of digit 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-2010 Virginia Tech. All Rights Reserved.