|
|||||||||
| 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
LengthRule contains methods 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.
| Constructor Summary | |
|---|---|
LengthRule()
This will create a new LengthRule with lengths unset. |
|
LengthRule(int length)
This will create a new LengthRule with the supplied length. |
|
LengthRule(int minLength,
int maxLength)
This will create a new LengthRule with the supplied lengths. |
|
| Method Summary | |
|---|---|
int |
getMaximumLength()
Get the maximum password length. |
int |
getMinimumLength()
Get the minimum password length. |
void |
setMaximumLength(int maxLength)
Set the maximum password length. |
void |
setMinimumLength(int minLength)
Set the minimum password length. |
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 |
|---|
public LengthRule()
LengthRule with lengths unset. The
defaults are 0 and Integer.MAX_VALUE respectively.
public LengthRule(int length)
LengthRule with the supplied length.
Both the minimum and the maximum length will be set to this value.
length - int length of password
public LengthRule(int minLength,
int maxLength)
LengthRule with the supplied lengths.
minLength - int minimum length of a passwordmaxLength - int maximum length of a password| Method Detail |
|---|
public void setMinimumLength(int minLength)
minLength - int minimum length of a passwordpublic int getMinimumLength()
intpublic void setMaximumLength(int maxLength)
maxLength - int maximum length of a passwordpublic int getMaximumLength()
intpublic RuleResult validate(PasswordData passwordData)
validate in interface RulepasswordData - PasswordData to verify (not null).
RuleResult - details on password verificationpublic java.lang.String toString()
toString in class java.lang.ObjectString
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||