@NotThreadSafe public class PasswordConstraintList extends Object implements IPasswordConstraintList
IPasswordConstraintList.| Constructor and Description |
|---|
PasswordConstraintList() |
PasswordConstraintList(IPasswordConstraint... aPasswordConstraints) |
PasswordConstraintList(IPasswordConstraintList aOther) |
PasswordConstraintList(Iterable<? extends IPasswordConstraint> aPasswordConstraints) |
| Modifier and Type | Method and Description |
|---|---|
PasswordConstraintList |
addConstraint(IPasswordConstraint aPasswordConstraint)
Added a password constraint.
|
boolean |
equals(Object o) |
List<String> |
getAllPasswordConstraintDescriptions(Locale aContentLocale)
Get a list of all password constraint descriptions in the specified locale
(e.g. for hinting a user)
|
List<IPasswordConstraint> |
getAllPasswordConstraints() |
PasswordConstraintList |
getClone() |
int |
getConstraintCount() |
List<String> |
getInvalidPasswordDescriptions(String sPlainTextPassword,
Locale aContentLocale)
Check if the passed password is valid.
|
boolean |
hasConstraints() |
int |
hashCode() |
boolean |
isPasswordValid(String sPlainTextPassword)
Check if the passed plaintext password is valid.
|
com.helger.commons.state.EChange |
removeConstraint(IPasswordConstraint aPasswordConstraint)
Remove the passed constraint.
|
String |
toString() |
public PasswordConstraintList()
public PasswordConstraintList(@Nonnull IPasswordConstraintList aOther)
public PasswordConstraintList(@Nullable IPasswordConstraint... aPasswordConstraints)
public PasswordConstraintList(@Nullable Iterable<? extends IPasswordConstraint> aPasswordConstraints)
public boolean hasConstraints()
hasConstraints in interface IPasswordConstraintListtrue if at least one constraint is present@Nonnegative public int getConstraintCount()
getConstraintCount in interface IPasswordConstraintList@Nonnull @ReturnsMutableCopy public List<IPasswordConstraint> getAllPasswordConstraints()
getAllPasswordConstraints in interface IPasswordConstraintListnull.@Nonnull public PasswordConstraintList addConstraint(@Nonnull IPasswordConstraint aPasswordConstraint)
aPasswordConstraint - The constraint to be added. May not be null.@Nonnull public com.helger.commons.state.EChange removeConstraint(@Nullable IPasswordConstraint aPasswordConstraint)
aPasswordConstraint - The constraint to be removed. May be null.EChange.public boolean isPasswordValid(@Nullable String sPlainTextPassword)
IPasswordConstraintListisPasswordValid in interface IPasswordConstraintListsPlainTextPassword - The password to check. May be null.true if no constraint was unfulfilled (meaning that if
no constrained is defined, every password is valid).@Nonnull @ReturnsMutableCopy public List<String> getInvalidPasswordDescriptions(@Nullable String sPlainTextPassword, @Nonnull Locale aContentLocale)
IPasswordConstraintListgetInvalidPasswordDescriptions in interface IPasswordConstraintListsPlainTextPassword - The password to check. May be null.aContentLocale - The content locale to be used to determine the descriptions.null but empty list if no constraint was
unfulfilled (meaning that if no constrained is defined, every
password is valid). If the returned list is not empty than the
password is invalid.@Nonnull @ReturnsMutableCopy public List<String> getAllPasswordConstraintDescriptions(@Nonnull Locale aContentLocale)
IPasswordConstraintListgetAllPasswordConstraintDescriptions in interface IPasswordConstraintListaContentLocale - The locale to be used for text resolving.null list with all constraint descriptions. If
the returned list is empty, it means that no constraint is defined.@Nonnull public PasswordConstraintList getClone()
getClone in interface com.helger.commons.ICloneable<IPasswordConstraintList>Copyright © 2014–2015 Philip Helger. All rights reserved.