Interface PasswordRule
-
- All Known Implementing Classes:
AbstractPasswordRule
,AtLeastXDigitPasswordRule
,AtLeastXLowercasePasswordRule
,AtLeastXSpecialCharPasswordRule
,AtLeastXUppercasePasswordRule
,BlankForbiddenPasswordRule
,MaxLengthPasswordRule
,MinLengthPasswordRule
,SequentialForbiddenPasswordRule
public interface PasswordRule
Interface that defines methods of a password rule. User: Yohann Chastagnier Date: 07/01/13
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
check(String password)
Checks the given password.String
getDescription(String language)
Gets the description of the rule according to a language.PasswordRuleType
getType()
Gets the type password rule.<T> T
getValue()
Gets the value of the parameter defined in settings for the rule.boolean
isCombined()
Indicates if the rule is combined one.boolean
isRequired()
Indicates if the rule is required.String
random()
Generates a random password part according to the nature of the rule.
-
-
-
Method Detail
-
getType
PasswordRuleType getType()
Gets the type password rule.- Returns:
-
isRequired
boolean isRequired()
Indicates if the rule is required.- Returns:
-
isCombined
boolean isCombined()
Indicates if the rule is combined one.- Returns:
-
getValue
<T> T getValue()
Gets the value of the parameter defined in settings for the rule.- Type Parameters:
T
-- Returns:
-
random
String random()
Generates a random password part according to the nature of the rule.- Returns:
- the random part of a password
-
check
boolean check(String password)
Checks the given password.- Returns:
-
-