|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.passwordrules.LexicalRule | +--com.ibm.passwordrules.standard.RestrictedTo
This class implements built-in rule for restricting passwords to only contain a given set of characters.
Field Summary | |
---|---|
static java.lang.String |
INCOMPATIBLE_RESTRICTED_TO_RESTRICTIONS
Constant representing a message key in a property file |
static java.lang.String |
INCOMPATIBLE_STARTS_WITH_RESTRICTIONS
|
static java.lang.String |
INVALID_CHARACTERS_FOUND
Constant representing a message key in a property file |
static java.lang.String |
MayNotContain_INCOMPATIBLE_CHARACTER_RESTRICTIONS
|
static java.lang.String |
MustContain_INCOMPATIBLE_CHARACTER_RESTRICTIONS
|
Fields inherited from class com.ibm.passwordrules.LexicalRule |
---|
DEFAULT_MAX_SEQUENTIAL_CHARACTERS, LOWER_CASE_ONLY, UPPER_CASE_ONLY |
Constructor Summary | |
---|---|
RestrictedTo(char[] chars)
Constructor accepting character array parameter containing the list of allowed characters. |
|
RestrictedTo(java.lang.String chars)
Constructor accepting String parameter containing the list of allowed characters. |
Method Summary | |
---|---|
void |
constrain(PasswordGenerator generator)
Constrain the password generator to the allowed values. |
char[] |
getCharList()
Return a list of required characters. |
boolean |
join(Rule rule)
Try to join the specified rule with this one. |
void |
setCharList(char[] chars)
Set a list of required characters. |
boolean |
validate(java.lang.String password,
ValidationInfo validationInfo)
Validate the given password using the given validation info. |
Methods inherited from class com.ibm.passwordrules.LexicalRule |
---|
getParameter, setParameter, validateSafe |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String INCOMPATIBLE_RESTRICTED_TO_RESTRICTIONS
public static final java.lang.String MustContain_INCOMPATIBLE_CHARACTER_RESTRICTIONS
public static final java.lang.String MayNotContain_INCOMPATIBLE_CHARACTER_RESTRICTIONS
public static final java.lang.String INCOMPATIBLE_STARTS_WITH_RESTRICTIONS
public static final java.lang.String INVALID_CHARACTERS_FOUND
Constructor Detail |
public RestrictedTo(char[] chars)
chars
- character array representing the list of allowed characters.public RestrictedTo(java.lang.String chars)
chars
- String containing the list of allowed characters.Method Detail |
public void constrain(PasswordGenerator generator)
constrain
in interface Rule
constrain
in class LexicalRule
generator
- including a character template to be constrained.public boolean validate(java.lang.String password, ValidationInfo validationInfo) throws InvalidPasswordException
validationInfo
- contains contextual information about the password being validated.password
- Password to validate.
InvalidPasswordException
- thrown when password is invalid.public char[] getCharList()
public void setCharList(char[] chars)
chars
- character array representing the list of allowed characters.public boolean join(Rule rule) throws IncompatibleRulesException
rule
- The rule to be joined with this one.
IncompatibleRulesException
- Thrown when given rule cannot be joined because it is not compatible.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |