org.opends.server.core
Class PasswordPolicyConfig

java.lang.Object
  extended by org.opends.server.core.PasswordPolicyConfig
All Implemented Interfaces:
ConfigurationChangeListener<PasswordPolicyCfg>

public class PasswordPolicyConfig
extends java.lang.Object
implements ConfigurationChangeListener<PasswordPolicyCfg>

This class is the interface between the password policy configurable component and a password policy state object. When a password policy entry is added to the configuration, an instance of this class is created and registered to manage subsequent modification to that configuration entry, including valiadating any proposed modification and applying an accepted modification.


Constructor Summary
PasswordPolicyConfig(PasswordPolicy policy)
          Creates a new password policy configurable component to manage the provided password policy object.
 
Method Summary
 ConfigChangeResult applyConfigurationChange(PasswordPolicyCfg configuration)
          Applies the configuration changes to this change listener.
 PasswordPolicy getPolicy()
          Retrieves the PasswordPolicy object representing the configuration entry managed by this object.
 boolean isConfigurationChangeAcceptable(PasswordPolicyCfg configuration, java.util.List<Message> unacceptableReasons)
          Indicates whether the proposed change to the configuration is acceptable to this change listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordPolicyConfig

public PasswordPolicyConfig(PasswordPolicy policy)
Creates a new password policy configurable component to manage the provided password policy object.

Parameters:
policy - The password policy object this object will manage.
Method Detail

isConfigurationChangeAcceptable

public boolean isConfigurationChangeAcceptable(PasswordPolicyCfg configuration,
                                               java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener.

Specified by:
isConfigurationChangeAcceptable in interface ConfigurationChangeListener<PasswordPolicyCfg>
Parameters:
configuration - The new configuration containing the changes.
unacceptableReasons - A list that can be used to hold messages about why the provided configuration is not acceptable.
Returns:
Returns true if the proposed change is acceptable, or false if it is not.

applyConfigurationChange

public ConfigChangeResult applyConfigurationChange(PasswordPolicyCfg configuration)
Applies the configuration changes to this change listener.

Specified by:
applyConfigurationChange in interface ConfigurationChangeListener<PasswordPolicyCfg>
Parameters:
configuration - The new configuration containing the changes.
Returns:
Returns information about the result of changing the configuration.

getPolicy

public PasswordPolicy getPolicy()
Retrieves the PasswordPolicy object representing the configuration entry managed by this object.

Returns:
The PasswordPolicy object.