com.ibm.passwordrules.standard
Class PasswordRulesInfo

java.lang.Object
  |
  +--com.ibm.passwordrules.standard.PasswordRulesInfo
All Implemented Interfaces:
java.io.Serializable

public class PasswordRulesInfo
extends java.lang.Object
implements java.io.Serializable

Class is a value object containing information about password rules.

See Also:
Serialized Form

Constructor Summary
PasswordRulesInfo()
          Default constructor
 
Method Summary
 void addCustomRule(java.lang.String name, java.lang.String value)
          Method to add custom rule definition
 boolean getAllowInDictionary()
          Getter for standard password rule AllowInDictionary
 boolean getAllowUserID()
          Getter for standard password rule AllowUserID
 boolean getAllowUserIDCaseInsensitive()
          Getter for standard password rule AllowUserIDCaseInsensitive
 boolean getAllowUserName()
          Getter for standard password rule AllowUserName
 boolean getAllowUserNameCaseInsensitive()
          Getter for standard password rule AllowUserNameCaseInsensitive
 java.util.Map getCustomRules()
          Getter of all custom rules
 java.lang.String getInvalidChars()
          Getter for standard password rule InvalidChars
 int getMaxLength()
          Getter for standard password rule MaxLength
 int getMaxSequentialCharacters()
          Getter for standard password rule MaxSequentialCharacters
 long getMaxValidityPeriod()
          Getter for standard password rule MaxValidityPeriod
 int getMinAlphabeticCharacters()
          Getter for standard password rule MinAlphabeticCharacters
 int getMinDigitCharacters()
          Getter for standard password rule MinDigitCharacters
 int getMinDistinctCharacters()
          Getter for standard password rule MinDistinctCharacters
 int getMinLength()
          Getter for standard password rule MinLength
 long getMinValidityPeriod()
          Getter for standard password rule MinValidityPeriod
 int getRepeatedHistoryLength()
          Getter for standard password rule RepeatedHistoryLength
 java.lang.String getRequiredChars()
          Getter for standard password rule RequiredChars
 java.lang.String getRestrictedToChars()
          Getter for standard password rule RestrictedToChars
 int getReversedHistoryLength()
          Getter for standard password rule ReversedHistoryLength
 java.lang.String getStartsWithChars()
          Getter for standard password rule StartsWithChars
static boolean isRuleTypeTextBox(java.lang.String rule)
           
 void setAllowInDictionary(boolean allowInDictionary)
          Setter for standard password rule AllowInDictionary
 void setAllowUserID(boolean allowUserID)
          Setter for standard password rule AllowUserID
 void setAllowUserIDCaseInsensitive(boolean allowUserIDCaseInsensitive)
          Getter for standard password rule AllowUserIDCaseInsensitive
 void setAllowUserName(boolean allowUserName)
          Setter for standard password rule AllowUserName
 void setAllowUserNameCaseInsensitive(boolean allowUserNameCaseInsensitive)
          Setter for standard password rule AllowUserNameCaseInsensitive
 void setCustomRules(java.util.Map customRules)
          Setter of all custom rules
 void setInvalidChars(java.lang.String invalidChars)
          Setter for standard password rule InvalidChars
 void setMaxLength(int maxLength)
          Setter for standard password rule MaxLength
 void setMaxSequentialCharacters(int maxSequentialCharacters)
          Setter for standard password rule MaxSequentialCharacters
 void setMaxValidityPeriod(long maxValidityPeriod)
          Setter for standard password rule MaxValidityPeriod
 void setMinAlphabeticCharacters(int minAlphabeticChars)
          Setter for standard password rule MinAlphabeticCharacters
 void setMinDigitCharacters(int minDigitChars)
          Setter for standard password rule MinDigitCharacters
 void setMinDistinctCharacters(int minDistinctChars)
          Setter for standard password rule MinDistinctCharacters
 void setMinLength(int minLength)
          Setter for standard password rule MinLength
 void setMinValidityPeriod(long minValidityPeriod)
          Setter for standard password rule MinValidityPeriod
 void setRepeatedHistoryLength(int repeatedHistoryLength)
          Setter for standard password rule RepeatedHistoryLength
 void setRequiredChars(java.lang.String requiredChars)
          Setter for standard password rule RequiredChars
 void setRestrictedToChars(java.lang.String restrictedToChars)
          Getter for standard password rule RestrictedToChars
 void setReversedHistoryLength(int reversedHistoryLength)
          Setter for standard password rule RepeatedHistoryLength
 void setStartsWithChars(java.lang.String startsWithChars)
          Getter for standard password rule StartsWithChars
 java.lang.String toString()
          Returns string representation of all password rules
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PasswordRulesInfo

public PasswordRulesInfo()
Default constructor
Method Detail

getMinLength

public int getMinLength()
Getter for standard password rule MinLength
Returns:
value of password's minimum length.

setMinLength

public void setMinLength(int minLength)
Setter for standard password rule MinLength
Parameters:
minLength - value of password's minimum length.

getMaxLength

public int getMaxLength()
Getter for standard password rule MaxLength
Returns:
value of password's maximum length.

setMaxLength

public void setMaxLength(int maxLength)
Setter for standard password rule MaxLength
Parameters:
maxLength - value of password's maximum length.

getMaxSequentialCharacters

public int getMaxSequentialCharacters()
Getter for standard password rule MaxSequentialCharacters
Returns:
value of password's number of maximum sequential characters.

setMaxSequentialCharacters

public void setMaxSequentialCharacters(int maxSequentialCharacters)
Setter for standard password rule MaxSequentialCharacters
Parameters:
maxSequentialCharacters - value of password's number of maximum sequential characters.

getMinDistinctCharacters

public int getMinDistinctCharacters()
Getter for standard password rule MinDistinctCharacters
Returns:
value of password's number of minimum distinct characters.

setMinDistinctCharacters

public void setMinDistinctCharacters(int minDistinctChars)
Setter for standard password rule MinDistinctCharacters
Parameters:
minDistinctChars - value of password's number of minimum distinct characters.

getMinAlphabeticCharacters

public int getMinAlphabeticCharacters()
Getter for standard password rule MinAlphabeticCharacters
Returns:
value of password's number of minimum alphabetic characters.

setMinAlphabeticCharacters

public void setMinAlphabeticCharacters(int minAlphabeticChars)
Setter for standard password rule MinAlphabeticCharacters
Parameters:
minAlphabeticChars - value of password's number of minimum alphabetic characters.

getMinDigitCharacters

public int getMinDigitCharacters()
Getter for standard password rule MinDigitCharacters
Returns:
value of password's number of minimum digit characters.

setMinDigitCharacters

public void setMinDigitCharacters(int minDigitChars)
Setter for standard password rule MinDigitCharacters
Parameters:
minDigitChars - value of password's number of minimum digit characters.

getInvalidChars

public java.lang.String getInvalidChars()
Getter for standard password rule InvalidChars
Returns:
value of password's set of invalid characters.

setInvalidChars

public void setInvalidChars(java.lang.String invalidChars)
Setter for standard password rule InvalidChars
Parameters:
invalidChars - value of password's set of invalid characters.

getRequiredChars

public java.lang.String getRequiredChars()
Getter for standard password rule RequiredChars
Returns:
value of password's set of required characters.

setRequiredChars

public void setRequiredChars(java.lang.String requiredChars)
Setter for standard password rule RequiredChars
Parameters:
requiredChars - value of password's set of required characters.

getRestrictedToChars

public java.lang.String getRestrictedToChars()
Getter for standard password rule RestrictedToChars
Returns:
value of password's set of allowed characters.

setRestrictedToChars

public void setRestrictedToChars(java.lang.String restrictedToChars)
Getter for standard password rule RestrictedToChars
Parameters:
restrictedToChars - value of password's set of allowed characters.

getStartsWithChars

public java.lang.String getStartsWithChars()
Getter for standard password rule StartsWithChars
Returns:
value of password's set of characters to begin the password with.

setStartsWithChars

public void setStartsWithChars(java.lang.String startsWithChars)
Getter for standard password rule StartsWithChars
Parameters:
startsWithChars - value of password's set of characters to begin the password with.

getRepeatedHistoryLength

public int getRepeatedHistoryLength()
Getter for standard password rule RepeatedHistoryLength
Returns:
number representing length of password history used to check for repeating passwords

setRepeatedHistoryLength

public void setRepeatedHistoryLength(int repeatedHistoryLength)
Setter for standard password rule RepeatedHistoryLength
Parameters:
repeatedHistoryLength - number representing length of password history used to check for repeating passwords.

getReversedHistoryLength

public int getReversedHistoryLength()
Getter for standard password rule ReversedHistoryLength
Returns:
number representing length of reversed password history used to check for repeating passwords

setReversedHistoryLength

public void setReversedHistoryLength(int reversedHistoryLength)
Setter for standard password rule RepeatedHistoryLength
Parameters:
reversedHistoryLength - number representing length of reversed password history used to check for repeating passwords.

getAllowUserName

public boolean getAllowUserName()
Getter for standard password rule AllowUserName
Returns:
true if any part of user name is allowed in the password, false if it isn't

setAllowUserName

public void setAllowUserName(boolean allowUserName)
Setter for standard password rule AllowUserName
Parameters:
allowUserName - true if any part of user name is allowed in the password, false if it isn't

getAllowUserNameCaseInsensitive

public boolean getAllowUserNameCaseInsensitive()
Getter for standard password rule AllowUserNameCaseInsensitive
Returns:
true if any part of case insensitive user name is allowed in the password, false if it isn't

setAllowUserNameCaseInsensitive

public void setAllowUserNameCaseInsensitive(boolean allowUserNameCaseInsensitive)
Setter for standard password rule AllowUserNameCaseInsensitive
Parameters:
allowUserNameCaseInsensitive - true if any part of case insensitive user name is allowed in the password, false if it isn't

getAllowUserID

public boolean getAllowUserID()
Getter for standard password rule AllowUserID
Returns:
true if user name is allowed in the password, false if it isn't

setAllowUserID

public void setAllowUserID(boolean allowUserID)
Setter for standard password rule AllowUserID
Parameters:
allowUserID - true if user name is allowed in the password, false if it isn't

getAllowUserIDCaseInsensitive

public boolean getAllowUserIDCaseInsensitive()
Getter for standard password rule AllowUserIDCaseInsensitive
Returns:
true if case insensitive user name is allowed in the password, false if it isn't

setAllowUserIDCaseInsensitive

public void setAllowUserIDCaseInsensitive(boolean allowUserIDCaseInsensitive)
Getter for standard password rule AllowUserIDCaseInsensitive
Parameters:
allowUserIDCaseInsensitive - true if case insensitive user name is allowed in the password, false if it isn't

getMinValidityPeriod

public long getMinValidityPeriod()
Getter for standard password rule MinValidityPeriod
Returns:
value representing minimum number of time units the password will be valid for

setMinValidityPeriod

public void setMinValidityPeriod(long minValidityPeriod)
Setter for standard password rule MinValidityPeriod
Parameters:
minValidityPeriod - value representing minimum number of time units the password will be valid for

getMaxValidityPeriod

public long getMaxValidityPeriod()
Getter for standard password rule MaxValidityPeriod
Returns:
value representing maximum number of time units the password will be valid for

setMaxValidityPeriod

public void setMaxValidityPeriod(long maxValidityPeriod)
Setter for standard password rule MaxValidityPeriod
Parameters:
maxValidityPeriod - value representing maximum number of time units the password will be valid for

getAllowInDictionary

public boolean getAllowInDictionary()
Getter for standard password rule AllowInDictionary
Returns:
true if password may exist in password dictionary of commonly used passwords false if it may not

setAllowInDictionary

public void setAllowInDictionary(boolean allowInDictionary)
Setter for standard password rule AllowInDictionary
Parameters:
allowInDictionary - true if password may exist in password dictionary of commonly used passwords false if it may not

toString

public java.lang.String toString()
Returns string representation of all password rules
Overrides:
toString in class java.lang.Object
Returns:
string representing the object

addCustomRule

public void addCustomRule(java.lang.String name,
                          java.lang.String value)
Method to add custom rule definition
Parameters:
name - fully qualified class name of a class implementing Rule interface.
value - optional value of a parameter used by the custom rule class.

getCustomRules

public java.util.Map getCustomRules()
Getter of all custom rules
Returns:
Properties object where key is fully qualified class name of a class implementing Rule interface and value is optional value of a parameter used by the custom rule class.

setCustomRules

public void setCustomRules(java.util.Map customRules)
Setter of all custom rules
Parameters:
props - Properties object where key is fully qualified class name of a class implementing Rule interface and value is optional value of a parameter used by the custom rule class.

isRuleTypeTextBox

public static boolean isRuleTypeTextBox(java.lang.String rule)
Parameters:
rule - Custom rule name
Returns:
boolean true if Custom rule type is of type TextBox and false if checkbox.