org.opends.server.extensions
Class PasswordModifyExtendedOperation

java.lang.Object
  extended by org.opends.server.api.ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
      extended by org.opends.server.extensions.PasswordModifyExtendedOperation
All Implemented Interfaces:
ConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>

public class PasswordModifyExtendedOperation
extends ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
implements ConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>

This class implements the password modify extended operation defined in RFC 3062. It includes support for requiring the user's current password as well as for generating a new password if none was provided.


Constructor Summary
PasswordModifyExtendedOperation()
          Create an instance of this password modify extended operation.
 
Method Summary
 ConfigChangeResult applyConfigurationChange(PasswordModifyExtendedOperationHandlerCfg config)
          Makes a best-effort attempt to apply the configuration contained in the provided entry.
 void finalizeExtendedOperationHandler()
          Performs any finalization that may be necessary for this extended operation handler.
 java.util.Set<java.lang.String> getSupportedControls()
          Retrieves the OIDs of the controls that may be supported by this extended operation handler.
 void initializeExtendedOperationHandler(PasswordModifyExtendedOperationHandlerCfg config)
          Initializes this extended operation handler based on the information in the provided configuration.
 boolean isConfigurationAcceptable(ExtendedOperationHandlerCfg configuration, java.util.List<Message> unacceptableReasons)
          Indicates whether the provided configuration is acceptable for this extended operation handler.
 boolean isConfigurationChangeAcceptable(PasswordModifyExtendedOperationHandlerCfg config, java.util.List<Message> unacceptableReasons)
          Indicates whether the provided configuration entry has an acceptable configuration for this component.
 void processExtendedOperation(ExtendedOperation operation)
          Processes the provided extended operation.
 
Methods inherited from class org.opends.server.api.ExtendedOperationHandler
deregisterControlsAndFeatures, getSupportedFeatures, registerControlsAndFeatures, supportsControl, supportsFeature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordModifyExtendedOperation

public PasswordModifyExtendedOperation()
Create an instance of this password modify extended operation. All initialization should be performed in the initializeExtendedOperationHandler method.

Method Detail

initializeExtendedOperationHandler

public void initializeExtendedOperationHandler(PasswordModifyExtendedOperationHandlerCfg config)
                                        throws ConfigException,
                                               InitializationException
Initializes this extended operation handler based on the information in the provided configuration. It should also register itself with the Directory Server for the particular kinds of extended operations that it will process.

Specified by:
initializeExtendedOperationHandler in class ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
Parameters:
config - The configuration that contains the information to use to initialize this extended operation handler.
Throws:
ConfigException - If an unrecoverable problem arises in the process of performing the initialization.
InitializationException - If a problem occurs during initialization that is not related to the server configuration.

finalizeExtendedOperationHandler

public void finalizeExtendedOperationHandler()
Performs any finalization that may be necessary for this extended operation handler. By default, no finalization is performed.

Overrides:
finalizeExtendedOperationHandler in class ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>

getSupportedControls

public java.util.Set<java.lang.String> getSupportedControls()
Retrieves the OIDs of the controls that may be supported by this extended operation handler. It should be overridden by any extended operation handler which provides special support for one or more controls.

Overrides:
getSupportedControls in class ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
Returns:
The OIDs of the controls that may be supported by this extended operation handler.

processExtendedOperation

public void processExtendedOperation(ExtendedOperation operation)
Processes the provided extended operation.

Specified by:
processExtendedOperation in class ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
Parameters:
operation - The extended operation to be processed.

isConfigurationAcceptable

public boolean isConfigurationAcceptable(ExtendedOperationHandlerCfg configuration,
                                         java.util.List<Message> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this extended operation handler. It should be possible to call this method on an uninitialized extended operation handler instance in order to determine whether the extended operation handler would be able to use the provided configuration.

Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.

Overrides:
isConfigurationAcceptable in class ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
Parameters:
configuration - The extended operation handler configuration for which to make the determination.
unacceptableReasons - A list that may be used to hold the reasons that the provided configuration is not acceptable.
Returns:
true if the provided configuration is acceptable for this extended operation handler, or false if not.

isConfigurationChangeAcceptable

public boolean isConfigurationChangeAcceptable(PasswordModifyExtendedOperationHandlerCfg config,
                                               java.util.List<Message> unacceptableReasons)
Indicates whether the provided configuration entry has an acceptable configuration for this component. If it does not, then detailed information about the problem(s) should be added to the provided list.

Specified by:
isConfigurationChangeAcceptable in interface ConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
Parameters:
config - The configuration entry for which to make the determination.
unacceptableReasons - A list that can be used to hold messages about why the provided entry does not have an acceptable configuration.
Returns:
true if the provided entry has an acceptable configuration for this component, or false if not.

applyConfigurationChange

public ConfigChangeResult applyConfigurationChange(PasswordModifyExtendedOperationHandlerCfg config)
Makes a best-effort attempt to apply the configuration contained in the provided entry. Information about the result of this processing should be added to the provided message list. Information should always be added to this list if a configuration change could not be applied. If detailed results are requested, then information about the changes applied successfully (and optionally about parameters that were not changed) should also be included.

Specified by:
applyConfigurationChange in interface ConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
Parameters:
config - The entry containing the new configuration to apply for this component.
Returns:
Information about the result of the configuration update.