public class PasswordConstraintMinLength extends Object implements IPasswordConstraint
| Constructor and Description |
|---|
PasswordConstraintMinLength(int nMinLength)
Ctor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
void |
fillMicroElement(com.helger.commons.microdom.IMicroElement aElement)
This method is responsible for filling a micro element for serializing the
password constraints.
|
String |
getDescription(Locale aContentLocale)
Get a description of this constraint, so that it can be displayed to the
user
|
int |
getMinLength() |
int |
hashCode() |
boolean |
isPasswordValid(String sPlainTextPassword)
Check if the supplied password matches this constraint
|
String |
toString() |
public PasswordConstraintMinLength(@Nonnegative int nMinLength)
nMinLength - The minimum length to use. Must be > 0. If 0 should be allowed,
simply don't use the constraint!@Nonnegative public int getMinLength()
public boolean isPasswordValid(@Nullable String sPlainTextPassword)
IPasswordConstraintisPasswordValid in interface IPasswordConstraintsPlainTextPassword - The plain text password to check. May be null.true if it is valid, false if it is not@Nullable public String getDescription(@Nonnull Locale aContentLocale)
IPasswordConstraintgetDescription in interface IPasswordConstraintaContentLocale - The locale to get the description in. Never null.null if no text is present in the provided localepublic void fillMicroElement(@Nonnull com.helger.commons.microdom.IMicroElement aElement)
IPasswordConstraintfillMicroElement in interface IPasswordConstraintaElement - The element to be filled. Never null.Copyright © 2014–2015 Philip Helger. All rights reserved.