org.silverpeas.password.service
Class DefaultPasswordService

java.lang.Object
  extended by org.silverpeas.password.service.DefaultPasswordService
All Implemented Interfaces:
PasswordService

@Service
public class DefaultPasswordService
extends Object
implements PasswordService

User: Yohann Chastagnier Date: 07/01/13


Field Summary
protected static int nbMatchingCombinedRules
           
protected static ResourceLocator settings
           
 
Constructor Summary
DefaultPasswordService()
           
 
Method Summary
 PasswordCheck check(String password)
          Checks server required and combined password rule on the given password.
 String generate()
          Generates a random password from existing rules.
 Collection<PasswordRule> getCombinedRules()
          Gets server combined password rules.
 String getExtraRuleMessage(String language)
          Gets additional rule message.
 Collection<PasswordRule> getRequiredRules()
          Gets server required password rules.
 PasswordRule getRule(PasswordRuleType passwordRuleType)
          Gets a server password rule from its type.
 Collection<PasswordRule> getRules()
          Gets server password rules.
protected  void loadRules()
          Loading just after the server is started all activated server password rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

settings

protected static ResourceLocator settings

nbMatchingCombinedRules

protected static int nbMatchingCombinedRules
Constructor Detail

DefaultPasswordService

public DefaultPasswordService()
Method Detail

loadRules

@PostConstruct
protected void loadRules()
Loading just after the server is started all activated server password rules.


getRule

public PasswordRule getRule(PasswordRuleType passwordRuleType)
Description copied from interface: PasswordService
Gets a server password rule from its type.

Specified by:
getRule in interface PasswordService
Returns:

getRules

public Collection<PasswordRule> getRules()
Description copied from interface: PasswordService
Gets server password rules.

Specified by:
getRules in interface PasswordService
Returns:

getRequiredRules

public Collection<PasswordRule> getRequiredRules()
Description copied from interface: PasswordService
Gets server required password rules.

Specified by:
getRequiredRules in interface PasswordService
Returns:

getCombinedRules

public Collection<PasswordRule> getCombinedRules()
Description copied from interface: PasswordService
Gets server combined password rules.

Specified by:
getCombinedRules in interface PasswordService
Returns:

check

public PasswordCheck check(String password)
Description copied from interface: PasswordService
Checks server required and combined password rule on the given password.

Specified by:
check in interface PasswordService
Returns:
Password rules in error if any.

generate

public String generate()
Description copied from interface: PasswordService
Generates a random password from existing rules.

Specified by:
generate in interface PasswordService
Returns:

getExtraRuleMessage

public String getExtraRuleMessage(String language)
Description copied from interface: PasswordService
Gets additional rule message. All rules explicited in this message are not verifiable within Silverpeas services.

Specified by:
getExtraRuleMessage in interface PasswordService
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.