org.silverpeas.password.rule
Class AtLeastXSpecialCharPasswordRule

java.lang.Object
  extended by org.silverpeas.password.rule.AbstractPasswordRule
      extended by org.silverpeas.password.rule.AtLeastXSpecialCharPasswordRule
All Implemented Interfaces:
PasswordRule

public class AtLeastXSpecialCharPasswordRule
extends AbstractPasswordRule

At least X digit char in password. User: Yohann Chastagnier Date: 07/01/13


Field Summary
 
Fields inherited from class org.silverpeas.password.rule.AbstractPasswordRule
DEFAULT_LENGTH, settings
 
Constructor Summary
AtLeastXSpecialCharPasswordRule()
          Default constructor.
 
Method Summary
 boolean check(String password)
          Checks the given password.
 String getDescription(String language)
          Gets the description of the rule according to a language.
 String 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.
 
Methods inherited from class org.silverpeas.password.rule.AbstractPasswordRule
countRegexOccur, getIntegerFromSettings, getString, getType, random
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtLeastXSpecialCharPasswordRule

public AtLeastXSpecialCharPasswordRule()
Default constructor.

Method Detail

getDescription

public String getDescription(String language)
Description copied from interface: PasswordRule
Gets the description of the rule according to a language.

Specified by:
getDescription in interface PasswordRule
Overrides:
getDescription in class AbstractPasswordRule
Returns:

isRequired

public boolean isRequired()
Description copied from interface: PasswordRule
Indicates if the rule is required.

Specified by:
isRequired in interface PasswordRule
Overrides:
isRequired in class AbstractPasswordRule
Returns:

isCombined

public boolean isCombined()
Description copied from interface: PasswordRule
Indicates if the rule is combined one.

Specified by:
isCombined in interface PasswordRule
Overrides:
isCombined in class AbstractPasswordRule
Returns:

getValue

public String getValue()
Description copied from interface: PasswordRule
Gets the value of the parameter defined in settings for the rule.

Returns:

check

public boolean check(String password)
Description copied from interface: PasswordRule
Checks the given password.

Returns:

random

public String random()
Description copied from interface: PasswordRule
Generates a random password part according to the nature of the rule.

Returns:
the random part of a password


Copyright © 2016 Silverpeas. All Rights Reserved.