Package org.opends.server.extensions
Class PasswordModifyExtendedOperation
- java.lang.Object
-
- org.opends.server.api.ExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
-
- org.opends.server.extensions.PasswordModifyExtendedOperation
-
- All Implemented Interfaces:
ConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
public final 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.
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTHZ_DN_ATTACHMENT
The name of the attachment which will be used to store the fully resolved target entry.static String
CLEAR_PWD_ATTACHMENT
The clear text password, which may not be present if the provided password was pre-encoded.static String
ENCODED_PWD_ATTACHMENT
A list containing the encoded passwords: plugins can perform changes atomically via CAS.static String
PWD_ATTRIBUTE_ATTACHMENT
The name of the attachment which will be used to store the password attribute.
-
Constructor Summary
Constructors Constructor Description PasswordModifyExtendedOperation()
Create an instance of this password modify extended operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResult
applyConfigurationChange(PasswordModifyExtendedOperationHandlerCfg config)
Applies the configuration changes to this change listener.void
finalizeExtendedOperationHandler()
Performs any finalization that may be necessary for this extended operation handler.String
getExtendedOperationName()
Retrieves the name associated with this extended operation.String
getExtendedOperationOID()
Retrieves the object OID associated with this extended operation.void
initializeExtendedOperationHandler(PasswordModifyExtendedOperationHandlerCfg config)
Initializes this extended operation handler based on the information in the provided configuration entry.boolean
isConfigurationAcceptable(PasswordModifyExtendedOperationHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this extended operation handler.boolean
isConfigurationChangeAcceptable(PasswordModifyExtendedOperationHandlerCfg config, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener.void
processExtendedOperation(ExtendedOperation operation)
Processes the provided extended operation.-
Methods inherited from class org.opends.server.api.ExtendedOperationHandler
getServerContext, getSupportedControls, getSupportedFeatures, supportsControl
-
-
-
-
Field Detail
-
AUTHZ_DN_ATTACHMENT
public static final String AUTHZ_DN_ATTACHMENT
The name of the attachment which will be used to store the fully resolved target entry.
-
PWD_ATTRIBUTE_ATTACHMENT
public static final String PWD_ATTRIBUTE_ATTACHMENT
The name of the attachment which will be used to store the password attribute.
-
CLEAR_PWD_ATTACHMENT
public static final String CLEAR_PWD_ATTACHMENT
The clear text password, which may not be present if the provided password was pre-encoded.
-
ENCODED_PWD_ATTACHMENT
public static final String ENCODED_PWD_ATTACHMENT
A list containing the encoded passwords: plugins can perform changes atomically via CAS.
-
-
Method Detail
-
initializeExtendedOperationHandler
public void initializeExtendedOperationHandler(PasswordModifyExtendedOperationHandlerCfg config) throws ConfigException, InitializationException
Description copied from class:ExtendedOperationHandler
Initializes this extended operation handler based on the information in the provided configuration entry. It should also register itself with the Directory Server for the particular kinds of extended operations that it will process.- Overrides:
initializeExtendedOperationHandler
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
config
- The extended operation handler 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()
Description copied from class:ExtendedOperationHandler
Performs any finalization that may be necessary for this extended operation handler. By default, no finalization is performed.
-
processExtendedOperation
public void processExtendedOperation(ExtendedOperation operation)
Description copied from class:ExtendedOperationHandler
Processes the provided extended operation.- Specified by:
processExtendedOperation
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
operation
- The extended operation to be processed.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(PasswordModifyExtendedOperationHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from class:ExtendedOperationHandler
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.- Overrides:
isConfigurationAcceptable
in classExtendedOperationHandler<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, orfalse
if not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(PasswordModifyExtendedOperationHandlerCfg config, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
config
- 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, orfalse
if it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(PasswordModifyExtendedOperationHandlerCfg config)
Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<PasswordModifyExtendedOperationHandlerCfg>
- Parameters:
config
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
getExtendedOperationOID
public String getExtendedOperationOID()
Description copied from class:ExtendedOperationHandler
Retrieves the object OID associated with this extended operation.- Specified by:
getExtendedOperationOID
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Returns:
- the oid associated with this extended operation, if any, or
null
if there is none.
-
getExtendedOperationName
public String getExtendedOperationName()
Description copied from class:ExtendedOperationHandler
Retrieves the name associated with this extended operation.- Specified by:
getExtendedOperationName
in classExtendedOperationHandler<PasswordModifyExtendedOperationHandlerCfg>
- Returns:
- The name associated with this extended operation, if any, or
null
if there is none.
-
-