|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.password.LengthRule
public class LengthRule
Rule for determining if a password is within a desired length. The minimum and maximum lengths are used inclusively to determine if a password meets this rule.
| Field Summary | |
|---|---|
static String |
ERROR_CODE_MAX
Error code for password too long. |
static String |
ERROR_CODE_MIN
Error code for password too short. |
| Constructor Summary | |
|---|---|
LengthRule()
Creates a new length rule with lengths unset. |
|
LengthRule(int length)
Creates a new length rule with the supplied length. |
|
LengthRule(int minLength,
int maxLength)
Create a new length rule. |
|
| Method Summary | |
|---|---|
protected Map<String,?> |
createRuleResultDetailParameters()
Creates the parameter data for the rule result detail. |
int |
getMaximumLength()
Returns the maximum password length. |
int |
getMinimumLength()
Returns the minimum password length. |
void |
setMaximumLength(int maxLength)
Sets the maximum password length. |
void |
setMinimumLength(int minLength)
Sets the minimum password length. |
String |
toString()
Returns a string representation of this object. |
RuleResult |
validate(PasswordData passwordData)
Validates the supplied password data per the requirements of this rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ERROR_CODE_MIN
public static final String ERROR_CODE_MAX
| Constructor Detail |
|---|
public LengthRule()
public LengthRule(int length)
length - length of password
public LengthRule(int minLength,
int maxLength)
minLength - minimum length of a passwordmaxLength - maximum length of a password| Method Detail |
|---|
public void setMinimumLength(int minLength)
minLength - minimum length of a passwordpublic int getMinimumLength()
public void setMaximumLength(int maxLength)
maxLength - maximum length of a passwordpublic int getMaximumLength()
public RuleResult validate(PasswordData passwordData)
validate in interface RulepasswordData - to verify (not null).
protected Map<String,?> createRuleResultDetailParameters()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||