edu.vt.middleware.password
Class CharacterCharacteristicsRule

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

public class CharacterCharacteristicsRule
extends java.lang.Object
implements Rule

CharacterCharacteristicsRule contains methods for determining if a password contains the desired mix of character types. In order to meet the criteria of this rule, passwords must meet any number of supplied character rules.

Version:
$Revision: 1724 $ $Date: 2010-10-29 13:47:59 -0400 (Fri, 29 Oct 2010) $
Author:
Middleware Services

Constructor Summary
CharacterCharacteristicsRule()
           
 
Method Summary
 int getNumberOfCharacteristics()
          This returns the number of characteristics which currently must be satisfied in order for a password to meet the requirements of this rule.
 java.util.List<CharacterRule> getRules()
          This will return the rules being used by this CharacterCharacteristicsRule.
 void setNumberOfCharacteristics(int n)
          This sets the number of characteristics which must be satisfied in order for a password to meet the requirements of this rule.
 void setRules(java.util.List<CharacterRule> l)
          This will set the rules to be used by this CharacterCharacteristicsRule.
 java.lang.String toString()
          This returns a string representation of this object.
 RuleResult validate(PasswordData passwordData)
          This returns whether or not the supplied password data meets the requirements of this rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharacterCharacteristicsRule

public CharacterCharacteristicsRule()
Method Detail

getRules

public java.util.List<CharacterRule> getRules()
This will return the rules being used by this CharacterCharacteristicsRule.

Returns:
List of rules

setRules

public void setRules(java.util.List<CharacterRule> l)
This will set the rules to be used by this CharacterCharacteristicsRule.

Parameters:
l - List of rules

setNumberOfCharacteristics

public void setNumberOfCharacteristics(int n)
This sets the number of characteristics which must be satisfied in order for a password to meet the requirements of this rule. The default is one. i.e. you may wish to enforce any three of five supplied character rules.

Parameters:
n - int number of characteristics to enforce where n > 0

getNumberOfCharacteristics

public int getNumberOfCharacteristics()
This returns the number of characteristics which currently must be satisfied in order for a password to meet the requirements of this rule.

Returns:
int number of characteristics to enforce

validate

public RuleResult validate(PasswordData passwordData)
This returns whether or not the supplied password data meets the requirements of this rule.

Specified by:
validate in interface Rule
Parameters:
passwordData - PasswordData to verify (not null).
Returns:
RuleResult - details on password verification

toString

public java.lang.String toString()
This returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
String


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