|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.password.rule.AbstractPasswordRule
public abstract class AbstractPasswordRule
User: Yohann Chastagnier Date: 07/01/13
Field Summary | |
---|---|
protected static int |
DEFAULT_LENGTH
|
protected static ResourceLocator |
settings
|
Constructor Summary | |
---|---|
protected |
AbstractPasswordRule(PasswordRuleType passwordRuleType)
|
Method Summary | |
---|---|
protected int |
countRegexOccur(String text,
String regex)
Counting regexpr occurences in a String |
String |
getDescription(String language)
Gets the description of the rule according to a language. |
protected Integer |
getIntegerFromSettings(String key,
Integer defaultValue)
Gets an integer from settings |
protected String |
getString(String key,
String language,
String... params)
Gets a string message according to the given language. |
PasswordRuleType |
getType()
Gets the type password rule. |
boolean |
isCombined()
Indicates if the rule is combined one. |
boolean |
isRequired()
Indicates if the rule is required. |
protected int |
random(int maxValue)
Returns a random integer value included between 0 and (given maxValue - 1). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.silverpeas.password.rule.PasswordRule |
---|
check, getValue, random |
Field Detail |
---|
protected static final int DEFAULT_LENGTH
protected static ResourceLocator settings
Constructor Detail |
---|
protected AbstractPasswordRule(PasswordRuleType passwordRuleType)
Method Detail |
---|
public PasswordRuleType getType()
PasswordRule
getType
in interface PasswordRule
public String getDescription(String language)
PasswordRule
getDescription
in interface PasswordRule
public boolean isRequired()
PasswordRule
isRequired
in interface PasswordRule
public boolean isCombined()
PasswordRule
isCombined
in interface PasswordRule
protected int random(int maxValue)
protected String getString(String key, String language, String... params)
key
- language
- params
-
protected Integer getIntegerFromSettings(String key, Integer defaultValue)
key
- defaultValue
-
protected int countRegexOccur(String text, String regex)
text
- regex
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |