Class Plugin
- java.lang.Object
-
- com.unboundid.directory.sdk.ds.api.Plugin
-
- All Implemented Interfaces:
Configurable
,ExampleUsageProvider
,Reconfigurable<PluginConfig>
,UnboundIDExtension
@Extensible @DirectoryServerExtension @DirectoryProxyServerExtension(appliesToLocalContent=true, appliesToRemoteContent=true, notes="Some plugin types will not be invoked for proxied operations, including pre-operation, post-operation, search result entry, search result reference, intermediate response, and subordinate modify DN. A proxy transformation may be used to achieve the same result in many cases.") @SynchronizationServerExtension(appliesToLocalContent=true, appliesToSynchronizedContent=false, notes="This extension type is primarily useful within the Data Sync Server to have custom code run at server startup or shutdown using the \'startup\' and \'shutdown\' plugin types.") @MetricsEngineExtension(notes="This extension type is primarily useful within the Data Metrics Server to have custom code run at server startup or shutdown using the \'startup\' and \'shutdown\' plugin types.") @BrokerExtension(notes="This extension type is primarily useful within the PingAuthorize Server to have custom code run at server startup or shutdown using the \'startup\' and \'shutdown\' plugin types.") @ThreadSafety(level=INTERFACE_THREADSAFE) public abstract class Plugin extends java.lang.Object implements UnboundIDExtension, Reconfigurable<PluginConfig>, ExampleUsageProvider
This class defines an API that must be implemented by extensions which act as server plugins. There are several different kinds of plugins which may be invoked for different purposes, including:- startup -- Startup plugins may be used to perform custom processing when the server is in the process of staring up. By default, the processing will be performed near the end of the startup phase just before the server begins to accept connections from external clients, but if one or more startup dependencies are defined, then the plugin may be invoked earlier in the startup process as soon as all declared dependencies have been satisfied.
- shutdown -- Shutdown plugins may be used to perform custom processing when the server is in the process of shutting down. This will occur near the beginning of the shutdown process, just after the server stops accepting new client connections and terminates existing connections but before shutting down any other components. Note that shutdown plugins may not always be invoked in some unusual shutdown scenarios (e.g., if the server process is forcefully killed, or in the event of a hardware, OS, or JVM failure).
- LDIF import -- LDIF import plugins are invoked for each entry read from an LDIF file to be imported into a backend. It is possible to alter the contents of the entry or to cause the entry to be excluded from the import.
- LDIF export -- LDIF export plugins are invoked for each entry exported from a backend to be written to an LDIF file. It is possible to alter the contents of the entry or to cause the entry to be excluded from the export.
- post-connect -- Post-connect plugins are invoked during the course of accepting a new client connection. They may access information about the client and may optionally terminate the client connection if it is deemed appropriate.
- post-disconnect -- Post-disconnect plugins are invoked after a client connection has been closed, regardless of whether the closure was initiated by the client (e.g., because of an unbind request or simply closing the socket) or by the server (e.g., because the connection had been idle for too long or because the client violated some server-side constraint.
- pre-parse -- Pre-parse plugins are invoked just after the server has received an abandon, add, bind, compare, delete, extended, modify, modify DN, search, or unbind request. They may be used to obtain information about the requests, alter the contents of the request or prevent the server from processing the request.
- pre-operation -- Pre-operation plugins are invoked for add, bind, compare, delete, extended, modify, modify DN, and search operations after some level of validation has been performed but just before the core processing for the operation. They may not be used to alter the request, but they may still be used to obtain information about the request or to prevent the operation from being processed.
- post-operation -- Post-operation plugins are invoked for add, bind, compare, delete, extended, modify, modify DN, and search operations after most processing has completed for the operation but before the result has been returned to the client. They may be used to obtain information about the result or to alter the contents of the result to be returned.
- post-response -- Post-response plugins are invoked for add, bind, compare, delete, extended, modify, modify DN, and search operations after the response has already been sent to the client. They may be used to perform processing for operations without delaying the response to the client.
- post-replication -- Post-replication plugins are invoked for add, delete, modify, and modify DN operations that have been received and processed via replication. They may be used to obtain information or perform processing for replicated changes, but may not alter those changes.
- search result entry -- Search result entry plugins are invoked for each entry to be returned to the client during the course of processing a search operation. They may obtain information about the entry to be returned, alter the entry contents, or prevent the entry from being returned.
- search result reference -- Search result reference plugins are invoked for each reference to be returned to the client during the course of processing a search operation. They may obtain information about the reference to be returned, alter the referral URLs to be returned, or prevent the reference from being returned.
- subordinate modify DN -- Subordinate modify DN plugins are invoked for each entry below the target entry being renamed in the course of a modify DN operation. They may be used to obtain information about the subordinate entry to be renamed and optionally to alter the contents of that entry.
- intermediate response -- Intermediate response plugins are invoked for each intermediate response to be returned to the client. They may be used to obtain information about the response or to prevent it from being returned to the client.
A single plugin instance may be configured to act in any combination of these contexts. For example, a plugin may be configured to operate during both LDIF import and pre-parse add contexts so that it can transform the contents of entries whether regardless of the way they are inserted into the backend.
Configuring Plugins
In order to configure a plugin created using this API, use a command like:dsconfig create-plugin \ --plugin-name "{plugin-name}" \ --type third-party \ --set enabled:true \ --set plugin-type:{plugin-type} \ --set "extension-class:{class-name}" \ --set "extension-argument:{name=value}"
where "{plugin-name}" is the name to use for the plugin instance, "{plugin-type}" is the name of a plugin type for which the plugin should be invoked, "{class-name}" is the fully-qualified name of the Java class that extendscom.unboundid.directory.sdk.ds.api.Plugin
, and "{name=value}" represents name-value pairs for any arguments to provide to the plugin. If the plugin should be invoked for multiple plugin types, then the "--set plugin-type:{plugin-type}
" option should be provided multiple times. Similarly, if multiple arguments should be provided to the plugin, then the "--set extension-argument:{name=value}
" option should be provided multiple times.- See Also:
ScriptedPlugin
-
-
Constructor Summary
Constructors Constructor Description Plugin()
Creates a new instance of this plugin.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ResultCode
applyConfiguration(PluginConfig config, ArgumentParser parser, java.util.List<java.lang.String> adminActionsRequired, java.util.List<java.lang.String> messages)
Attempts to apply the configuration from the provided argument parser to this extension.void
defineConfigArguments(ArgumentParser parser)
Updates the provided argument parser to define any configuration arguments which may be used by this extension.IntermediateResponsePluginResult
doIntermediateResponse(ActiveOperationContext operationContext, UpdatableGenericResult result, IntermediateResponse intermediateResponse)
Performs any processing which may be necessary before the server sends an intermediate response to the client.LDIFPluginResult
doLDIFExport(UpdatableEntry entry)
Performs any processing which may be necessary for the provided entry to be exported from the server.LDIFPluginResult
doLDIFImport(UpdatableEntry entry)
Performs any processing which may be necessary for the provided entry to be imported into the server.PostConnectPluginResult
doPostConnect(ClientContext clientContext)
Performs any processing which may be necessary when the server has accepted a new client connection.PostDisconnectPluginResult
doPostDisconnect(ClientContext clientContext, DisconnectReason disconnectReason, java.lang.String message)
Performs any processing which may be necessary when the server has terminated a client connection.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, AddRequest request, UpdatableAddResult result)
Performs any processing which may be necessary before the server sends a response for an add operation.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, CompareRequest request, UpdatableCompareResult result, Entry entry)
Performs any processing which may be necessary before the server sends a response for a compare operation.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, DeleteRequest request, UpdatableDeleteResult result, Entry entry)
Performs any processing which may be necessary before the server sends a response for a delete operation.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, ExtendedRequest request, UpdatableExtendedResult result)
Performs any processing which may be necessary before the server sends a response for an extended operation.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, ModifyDNRequest request, UpdatableModifyDNResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server sends a response for a modify DN operation.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, ModifyRequest request, UpdatableModifyResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server sends a response for a modify operation.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, SASLBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server sends a response for a SASL bind operation.PostOperationPluginResult
doPostOperation(ActiveOperationContext operationContext, SimpleBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server sends a response for a simple bind operation.PostOperationPluginResult
doPostOperation(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result)
Performs any processing which may be necessary before the server sends a response for a search operation.void
doPostReplication(CompletedOperationContext operationContext, AddRequest request, AddResult result)
Performs any processing which may be necessary after all other processing has been completed for an add operation which has been received from another server via replication.void
doPostReplication(CompletedOperationContext operationContext, DeleteRequest request, DeleteResult result)
Performs any processing which may be necessary after all other processing has been completed for a delete operation which has been received from another server via replication.void
doPostReplication(CompletedOperationContext operationContext, ModifyDNRequest request, ModifyDNResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify DN operation which has been received from another server via replication.void
doPostReplication(CompletedOperationContext operationContext, ModifyRequest request, ModifyResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify operation which has been received from another server via replication.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, AddRequest request, AddResult result)
Performs any processing which may be necessary after all other processing has been completed for an add operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, CompareRequest request, CompareResult result)
Performs any processing which may be necessary after all other processing has been completed for a compare operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, DeleteRequest request, DeleteResult result)
Performs any processing which may be necessary after all other processing has been completed for a delete operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, ExtendedRequest request, ExtendedResult result)
Performs any processing which may be necessary after all other processing has been completed for an extended operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, ModifyDNRequest request, ModifyDNResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify DN operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, ModifyRequest request, ModifyResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, SASLBindRequest request, BindResult result)
Performs any processing which may be necessary after all other processing has been completed for a SASL bind operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedOperationContext operationContext, SimpleBindRequest request, BindResult result)
Performs any processing which may be necessary after all other processing has been completed for a simple bind operation and the response has been sent to the client.PostResponsePluginResult
doPostResponse(CompletedSearchOperationContext operationContext, SearchRequest request, SearchResult result)
Performs any processing which may be necessary after all other processing has been completed for a search operation and the response has been sent to the client.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, AddRequest request, UpdatableAddResult result)
Performs any processing which may be necessary before the server actually attempts to add an entry to the appropriate backend.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, CompareRequest request, UpdatableCompareResult result, Entry entry)
Performs any processing which may be necessary before the server actually attempts to perform the core processing for the compare.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, DeleteRequest request, UpdatableDeleteResult result, Entry entry)
Performs any processing which may be necessary before the server actually attempts to remove the entry from the server.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, ExtendedRequest request, UpdatableExtendedResult result)
Performs any processing which may be necessary before the server actually attempts to perform the core processing for the extended operation.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, ModifyDNRequest request, UpdatableModifyDNResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server actually attempts to update the entry in the backend.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, ModifyRequest request, UpdatableModifyResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server actually attempts to update the entry in the backend.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, SASLBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server actually attempts to perform the authentication for a SASL bind request.PreOperationPluginResult
doPreOperation(ActiveOperationContext operationContext, SimpleBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server actually attempts to perform the authentication for a simple bind request.PreOperationPluginResult
doPreOperation(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result)
Performs any processing which may be necessary before the server actually attempts to process the search in the backend.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableAbandonRequest request)
Performs any processing which may be necessary before the server starts processing for an abandon request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableAddRequest request, UpdatableAddResult result)
Performs any processing which may be necessary before the server starts processing for an add request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableCompareRequest request, UpdatableCompareResult result)
Performs any processing which may be necessary before the server starts processing for a compare request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableDeleteRequest request, UpdatableDeleteResult result)
Performs any processing which may be necessary before the server starts processing for a delete request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableExtendedRequest request, UpdatableExtendedResult result)
Performs any processing which may be necessary before the server starts processing for an extended request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableModifyDNRequest request, UpdatableModifyDNResult result)
Performs any processing which may be necessary before the server starts processing for a modify DN request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableModifyRequest request, UpdatableModifyResult result)
Performs any processing which may be necessary before the server starts processing for a modify request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableSASLBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server starts processing for a SASL bind request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableSimpleBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server starts processing for a simple bind request.PreParsePluginResult
doPreParse(ActiveOperationContext operationContext, UpdatableUnbindRequest request)
Performs any processing which may be necessary before the server starts processing for an unbind request.PreParsePluginResult
doPreParse(ActiveSearchOperationContext operationContext, UpdatableSearchRequest request, UpdatableSearchResult result)
Performs any processing which may be necessary before the server starts processing for a search request.SearchEntryPluginResult
doSearchEntry(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result, UpdatableEntry entry, java.util.List<Control> controls)
Performs any processing which may be necessary before the server sends a search result entry to the client.SearchReferencePluginResult
doSearchReference(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result, java.util.List<java.lang.String> referralURLs, java.util.List<Control> controls)
Performs any processing which may be necessary before the server sends a search result reference to the client.void
doShutdown(java.lang.String shutdownReason)
Performs any processing which may be necessary when the server is shutting down.StartupPluginResult
doStartup()
Performs any processing which may be necessary when the server is starting.SubordinateModifyDNPluginResult
doSubordinateModifyDN(ActiveOperationContext operationContext, ModifyDNRequest request, UpdatableModifyDNResult result, Entry oldSubordinateEntry, Entry newSubordinateEntry, java.util.List<Modification> additionalModifications)
Performs any processing which may be necessary during the course of renaming an entry which is subordinate to an entry targeted by a modify DN operation.void
finalizePlugin()
Performs any cleanup which may be necessary when this plugin is to be taken out of service.java.util.Map<java.util.List<java.lang.String>,java.lang.String>
getExamplesArgumentSets()
Retrieves a map containing examples of configurations that may be used for this extension.abstract java.lang.String[]
getExtensionDescription()
Retrieves a human-readable description for this extension.abstract java.lang.String
getExtensionName()
Retrieves a human-readable name for this extension.java.util.Set<StartupDependency>
getStartupDependencies()
Retrieves the set of startup dependencies which must be resolved in order for this plugin to be invoked at server startup.void
initializePlugin(DirectoryServerContext serverContext, PluginConfig config, ArgumentParser parser)
Initializes this plugin.boolean
isConfigurationAcceptable(PluginConfig config, ArgumentParser parser, java.util.List<java.lang.String> unacceptableReasons)
Indicates whether the configuration represented by the provided argument parser is acceptable for use by this extension.
-
-
-
Constructor Detail
-
Plugin
public Plugin()
Creates a new instance of this plugin. All plugin implementations must include a default constructor, but any initialization should generally be done in theinitializePlugin
method.
-
-
Method Detail
-
getExtensionName
public abstract java.lang.String getExtensionName()
Retrieves a human-readable name for this extension.- Specified by:
getExtensionName
in interfaceUnboundIDExtension
- Returns:
- A human-readable name for this extension.
-
getExtensionDescription
public abstract java.lang.String[] getExtensionDescription()
Retrieves a human-readable description for this extension. Each element of the array that is returned will be considered a separate paragraph in generated documentation.- Specified by:
getExtensionDescription
in interfaceUnboundIDExtension
- Returns:
- A human-readable description for this extension, or
null
or an empty array if no description should be available.
-
defineConfigArguments
public void defineConfigArguments(ArgumentParser parser) throws ArgumentException
Updates the provided argument parser to define any configuration arguments which may be used by this extension. The argument parser may also be updated to define relationships between arguments (e.g., to specify required, exclusive, or dependent argument sets).- Specified by:
defineConfigArguments
in interfaceConfigurable
- Parameters:
parser
- The argument parser to be updated with the configuration arguments which may be used by this extension.- Throws:
ArgumentException
- If a problem is encountered while updating the provided argument parser.
-
initializePlugin
public void initializePlugin(DirectoryServerContext serverContext, PluginConfig config, ArgumentParser parser) throws LDAPException
Initializes this plugin.- Parameters:
serverContext
- A handle to the server context for the server in which this extension is running.config
- The general configuration for this plugin.parser
- The argument parser which has been initialized from the configuration for this plugin.- Throws:
LDAPException
- If a problem occurs while initializing this plugin.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(PluginConfig config, ArgumentParser parser, java.util.List<java.lang.String> unacceptableReasons)
Indicates whether the configuration represented by the provided argument parser is acceptable for use by this extension. The parser will have been used to parse any configuration available for this extension, and any automatic validation will have been performed. This method may be used to perform any more complex validation which cannot be performed automatically by the argument parser.- Specified by:
isConfigurationAcceptable
in interfaceReconfigurable<PluginConfig>
- Parameters:
config
- The general configuration for this extension.parser
- The argument parser that has been used to parse the proposed configuration for this extension.unacceptableReasons
- A list to which messages may be added to provide additional information about why the provided configuration is not acceptable.- Returns:
true
if the configuration in the provided argument parser appears to be acceptable, orfalse
if not.
-
applyConfiguration
public ResultCode applyConfiguration(PluginConfig config, ArgumentParser parser, java.util.List<java.lang.String> adminActionsRequired, java.util.List<java.lang.String> messages)
Attempts to apply the configuration from the provided argument parser to this extension.- Specified by:
applyConfiguration
in interfaceReconfigurable<PluginConfig>
- Parameters:
config
- The general configuration for this extension.parser
- The argument parser that has been used to parse the new configuration for this extension.adminActionsRequired
- A list to which messages may be added to provide additional information about any additional administrative actions that may be required to apply some of the configuration changes.messages
- A list to which messages may be added to provide additional information about the processing performed by this method.- Returns:
- A result code providing information about the result of applying
the configuration change. A result of
SUCCESS
should be used to indicate that all processing completed successfully. Any other result will indicate that a problem occurred during processing.
-
finalizePlugin
public void finalizePlugin()
Performs any cleanup which may be necessary when this plugin is to be taken out of service.
-
getStartupDependencies
public java.util.Set<StartupDependency> getStartupDependencies()
Retrieves the set of startup dependencies which must be resolved in order for this plugin to be invoked at server startup. This is only applicable for startup plugins, in which case it may be possible to have the plugin startup processing invoked as early as possible. If it returnsnull
then startup processing for this plugin will be performed at the default time during startup.- Returns:
- The set of startup dependencies for this plugin, or
null
if it is not a startup plugin, or if startup processing should be invoked at the default time during server startup.
-
doStartup
public StartupPluginResult doStartup()
Performs any processing which may be necessary when the server is starting.- Returns:
- Information about the result of the plugin processing.
-
doShutdown
public void doShutdown(java.lang.String shutdownReason)
Performs any processing which may be necessary when the server is shutting down.- Parameters:
shutdownReason
- A message which may provide information about the reason the server is shutting down.
-
doLDIFImport
public LDIFPluginResult doLDIFImport(UpdatableEntry entry)
Performs any processing which may be necessary for the provided entry to be imported into the server.- Parameters:
entry
- The entry to be imported. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doLDIFExport
public LDIFPluginResult doLDIFExport(UpdatableEntry entry)
Performs any processing which may be necessary for the provided entry to be exported from the server.- Parameters:
entry
- The entry to be exported. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostConnect
public PostConnectPluginResult doPostConnect(ClientContext clientContext)
Performs any processing which may be necessary when the server has accepted a new client connection.- Parameters:
clientContext
- Information about the client connection that has been established.- Returns:
- Information about the result of the plugin processing.
-
doPostDisconnect
public PostDisconnectPluginResult doPostDisconnect(ClientContext clientContext, DisconnectReason disconnectReason, java.lang.String message)
Performs any processing which may be necessary when the server has terminated a client connection.- Parameters:
clientContext
- Information about the client connection that has been established.disconnectReason
- A general reason for the disconnect.message
- A message which may provide additional information about the disconnect. It may benull
if none is available.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableAbandonRequest request)
Performs any processing which may be necessary before the server starts processing for an abandon request.- Parameters:
operationContext
- The context for the abandon operation.request
- The abandon request to be processed. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableAddRequest request, UpdatableAddResult result)
Performs any processing which may be necessary before the server starts processing for an add request. This will be invoked only for add operations requested directly by clients, but not for add operations received from another server via replication.- Parameters:
operationContext
- The context for the add operation.request
- The add request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, AddRequest request, UpdatableAddResult result)
Performs any processing which may be necessary before the server actually attempts to add an entry to the appropriate backend. This will be invoked only for add operations requested directly by clients, but not for add operations received from another server via replication.- Parameters:
operationContext
- The context for the add operation.request
- The add request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, AddRequest request, UpdatableAddResult result)
Performs any processing which may be necessary before the server sends a response for an add operation. This will be invoked only for add operations requested directly by clients, but not for add operations received from another server via replication.- Parameters:
operationContext
- The context for the add operation.request
- The add request that was processed.result
- The result to be returned to the client. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, AddRequest request, AddResult result)
Performs any processing which may be necessary after all other processing has been completed for an add operation and the response has been sent to the client. This will be invoked only for add operations requested directly by clients, but not for add operations received from another server via replication.- Parameters:
operationContext
- The context for the add operation.request
- The add request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPostReplication
public void doPostReplication(CompletedOperationContext operationContext, AddRequest request, AddResult result)
Performs any processing which may be necessary after all other processing has been completed for an add operation which has been received from another server via replication.- Parameters:
operationContext
- The context for the add operation.request
- The add request that was processed.result
- The result that was returned to the client.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableSimpleBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server starts processing for a simple bind request.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, SimpleBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server actually attempts to perform the authentication for a simple bind request.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, SimpleBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server sends a response for a simple bind operation.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request that was processed.result
- The result to be returned to the client. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, SimpleBindRequest request, BindResult result)
Performs any processing which may be necessary after all other processing has been completed for a simple bind operation and the response has been sent to the client.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableSASLBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server starts processing for a SASL bind request.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, SASLBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server actually attempts to perform the authentication for a SASL bind request.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, SASLBindRequest request, UpdatableBindResult result)
Performs any processing which may be necessary before the server sends a response for a SASL bind operation.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request that was processed.result
- The result to be returned to the client. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, SASLBindRequest request, BindResult result)
Performs any processing which may be necessary after all other processing has been completed for a SASL bind operation and the response has been sent to the client.- Parameters:
operationContext
- The context for the bind operation.request
- The bind request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableCompareRequest request, UpdatableCompareResult result)
Performs any processing which may be necessary before the server starts processing for a compare request.- Parameters:
operationContext
- The context for the compare operation.request
- The compare request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, CompareRequest request, UpdatableCompareResult result, Entry entry)
Performs any processing which may be necessary before the server actually attempts to perform the core processing for the compare.- Parameters:
operationContext
- The context for the compare operation.request
- The compare request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.entry
- The entry targeted by the compare operation.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, CompareRequest request, UpdatableCompareResult result, Entry entry)
Performs any processing which may be necessary before the server sends a response for a compare operation.- Parameters:
operationContext
- The context for the compare operation.request
- The compare request that was processed.result
- The result to be returned to the client. It may be altered if desired.entry
- The entry targeted by the compare operation, if it exists.- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, CompareRequest request, CompareResult result)
Performs any processing which may be necessary after all other processing has been completed for a compare operation and the response has been sent to the client.- Parameters:
operationContext
- The context for the compare operation.request
- The compare request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableDeleteRequest request, UpdatableDeleteResult result)
Performs any processing which may be necessary before the server starts processing for a delete request. This will be invoked only for delete operations requested directly by clients, but not for delete operations received from another server via replication.- Parameters:
operationContext
- The context for the delete operation.request
- The delete request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, DeleteRequest request, UpdatableDeleteResult result, Entry entry)
Performs any processing which may be necessary before the server actually attempts to remove the entry from the server. This will be invoked only for delete operations requested directly by clients, but not for delete operations received from another server via replication.- Parameters:
operationContext
- The context for the delete operation.request
- The delete request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.entry
- The entry targeted by the delete operation.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, DeleteRequest request, UpdatableDeleteResult result, Entry entry)
Performs any processing which may be necessary before the server sends a response for a delete operation. This will be invoked only for delete operations requested directly by clients, but not for delete operations received from another server via replication.- Parameters:
operationContext
- The context for the delete operation.request
- The delete request that was processed.result
- The result to be returned to the client. It may be altered if desired.entry
- The entry targeted by the delete operation, if it exists.- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, DeleteRequest request, DeleteResult result)
Performs any processing which may be necessary after all other processing has been completed for a delete operation and the response has been sent to the client. This will be invoked only for delete operations requested directly by clients, but not for delete operations received from another server via replication.- Parameters:
operationContext
- The context for the delete operation.request
- The delete request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPostReplication
public void doPostReplication(CompletedOperationContext operationContext, DeleteRequest request, DeleteResult result)
Performs any processing which may be necessary after all other processing has been completed for a delete operation which has been received from another server via replication.- Parameters:
operationContext
- The context for the delete operation.request
- The delete request that was processed.result
- The result that was returned to the client.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableExtendedRequest request, UpdatableExtendedResult result)
Performs any processing which may be necessary before the server starts processing for an extended request.- Parameters:
operationContext
- The context for the extended operation.request
- The extended request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, ExtendedRequest request, UpdatableExtendedResult result)
Performs any processing which may be necessary before the server actually attempts to perform the core processing for the extended operation.- Parameters:
operationContext
- The context for the extended operation.request
- The extended request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, ExtendedRequest request, UpdatableExtendedResult result)
Performs any processing which may be necessary before the server sends a response for an extended operation.- Parameters:
operationContext
- The context for the extended operation.request
- The extended request that was processed.result
- The result to be returned to the client. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, ExtendedRequest request, ExtendedResult result)
Performs any processing which may be necessary after all other processing has been completed for an extended operation and the response has been sent to the client.- Parameters:
operationContext
- The context for the extended operation.request
- The extended request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableModifyRequest request, UpdatableModifyResult result)
Performs any processing which may be necessary before the server starts processing for a modify request. This will be invoked only for modify operations requested directly by clients, but not for modify operations received from another server via replication.- Parameters:
operationContext
- The context for the modify operation.request
- The modify request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, ModifyRequest request, UpdatableModifyResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server actually attempts to update the entry in the backend. This will be invoked only for modify operations requested directly by clients, but not for modify operations received from another server via replication.- Parameters:
operationContext
- The context for the modify operation.request
- The modify request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.oldEntry
- The entry as it appeared before the modifications were applied.newEntry
- The updated entry as it will appear after the modifications have been applied.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, ModifyRequest request, UpdatableModifyResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server sends a response for a modify operation. This will be invoked only for modify operations requested directly by clients, but not for modify operations received from another server via replication.- Parameters:
operationContext
- The context for the modify operation.request
- The modify request that was processed.result
- The result to be returned to the client. It may be altered if desired.oldEntry
- The entry as it appeared before the modifications were applied, if it exists. .newEntry
- The entry as it appears after the modifications have been applied, if it exists. .- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, ModifyRequest request, ModifyResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify operation and the response has been sent to the client. This will be invoked only for modify operations requested directly by clients, but not for modify operations received from another server via replication.- Parameters:
operationContext
- The context for the modify operation.request
- The modify request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPostReplication
public void doPostReplication(CompletedOperationContext operationContext, ModifyRequest request, ModifyResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify operation which has been received from another server via replication.- Parameters:
operationContext
- The context for the modify operation.request
- The modify request that was processed.result
- The result that was returned to the client.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableModifyDNRequest request, UpdatableModifyDNResult result)
Performs any processing which may be necessary before the server starts processing for a modify DN request. This will be invoked only for modify DN operations requested directly by clients, but not for modify DN operations received from another server via replication.- Parameters:
operationContext
- The context for the modify DN operation.request
- The modify DN request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveOperationContext operationContext, ModifyDNRequest request, UpdatableModifyDNResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server actually attempts to update the entry in the backend. This will be invoked only for modify DN operations requested directly by clients, but not for modify DN operations received from another server via replication.- Parameters:
operationContext
- The context for the modify DN operation.request
- The modify DN request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.oldEntry
- The entry as it appeared before being renamed.newEntry
- The updated entry as it will appear after it has been renamed.- Returns:
- Information about the result of the plugin processing.
-
doSubordinateModifyDN
public SubordinateModifyDNPluginResult doSubordinateModifyDN(ActiveOperationContext operationContext, ModifyDNRequest request, UpdatableModifyDNResult result, Entry oldSubordinateEntry, Entry newSubordinateEntry, java.util.List<Modification> additionalModifications)
Performs any processing which may be necessary during the course of renaming an entry which is subordinate to an entry targeted by a modify DN operation. This will be invoked only for both modify DN operations requested by clients and for modify DN operations received from another server via replication.- Parameters:
operationContext
- The context for the modify DN operation.request
- The modify DN request being processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.oldSubordinateEntry
- The subordinate entry as it appeared before being renamed.newSubordinateEntry
- The subordinate entry as it will appear after being renamed.additionalModifications
- A list of additional modifications that should be applied to the entry as it is renamed. This list may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveOperationContext operationContext, ModifyDNRequest request, UpdatableModifyDNResult result, Entry oldEntry, Entry newEntry)
Performs any processing which may be necessary before the server sends a response for a modify DN operation. This will be invoked only for modify DN operations requested directly by clients, but not for modify DN operations received from another server via replication.- Parameters:
operationContext
- The context for the modify DN operation.request
- The modify DN request that was processed.result
- The result to be returned to the client. It may be altered if desired.oldEntry
- The entry as it appeared before it was renamed, if it exists.newEntry
- The entry as it appears after it was renamed, if it exists. .- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedOperationContext operationContext, ModifyDNRequest request, ModifyDNResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify DN operation and the response has been sent to the client. This will be invoked only for modify DN operations requested directly by clients, but not for modify DN operations received from another server via replication.- Parameters:
operationContext
- The context for the modify DN operation.request
- The modify DN request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPostReplication
public void doPostReplication(CompletedOperationContext operationContext, ModifyDNRequest request, ModifyDNResult result)
Performs any processing which may be necessary after all other processing has been completed for a modify DN operation which has been received from another server via replication.- Parameters:
operationContext
- The context for the modify DN operation.request
- The modify DN request that was processed.result
- The result that was returned to the client.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveSearchOperationContext operationContext, UpdatableSearchRequest request, UpdatableSearchResult result)
Performs any processing which may be necessary before the server starts processing for a search request.- Parameters:
operationContext
- The context for the search operation.request
- The search request to be processed. It may be altered if desired.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PreOperationPluginResult doPreOperation(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result)
Performs any processing which may be necessary before the server actually attempts to process the search in the backend.- Parameters:
operationContext
- The context for the search operation.request
- The search request to be processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doSearchEntry
public SearchEntryPluginResult doSearchEntry(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result, UpdatableEntry entry, java.util.List<Control> controls)
Performs any processing which may be necessary before the server sends a search result entry to the client.- Parameters:
operationContext
- The context for the search operation.request
- The search request being processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.entry
- The entry to be returned to the client. It may be altered if desired.controls
- The set of controls to be included with the entry. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doSearchReference
public SearchReferencePluginResult doSearchReference(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result, java.util.List<java.lang.String> referralURLs, java.util.List<Control> controls)
Performs any processing which may be necessary before the server sends a search result reference to the client.- Parameters:
operationContext
- The context for the search operation.request
- The search request being processed.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.referralURLs
- The set of referral URLs to be returned to the client. It may be altered if desired.controls
- The set of controls to be included with the reference. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PostOperationPluginResult doPostOperation(ActiveSearchOperationContext operationContext, SearchRequest request, UpdatableSearchResult result)
Performs any processing which may be necessary before the server sends a response for a search operation.- Parameters:
operationContext
- The context for the search operation.request
- The search request that was processed.result
- The result to be returned to the client. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doPostResponse
public PostResponsePluginResult doPostResponse(CompletedSearchOperationContext operationContext, SearchRequest request, SearchResult result)
Performs any processing which may be necessary after all other processing has been completed for a search operation and the response has been sent to the client.- Parameters:
operationContext
- The context for the search operation.request
- The search request that was processed.result
- The result that was returned to the client.- Returns:
- Information about the result of the plugin processing.
-
doPreParse
public PreParsePluginResult doPreParse(ActiveOperationContext operationContext, UpdatableUnbindRequest request)
Performs any processing which may be necessary before the server starts processing for an unbind request.- Parameters:
operationContext
- The context for the unbind operation.request
- The unbind request to be processed. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
doIntermediateResponse
public IntermediateResponsePluginResult doIntermediateResponse(ActiveOperationContext operationContext, UpdatableGenericResult result, IntermediateResponse intermediateResponse)
Performs any processing which may be necessary before the server sends an intermediate response to the client.- Parameters:
operationContext
- The context for the associated operation.result
- The result that will be returned to the client if the plugin result indicates that processing on the operation should be interrupted. It may be altered if desired.intermediateResponse
- The intermediate response to be returned to the client. It may be altered if desired.- Returns:
- Information about the result of the plugin processing.
-
getExamplesArgumentSets
public java.util.Map<java.util.List<java.lang.String>,java.lang.String> getExamplesArgumentSets()
Retrieves a map containing examples of configurations that may be used for this extension. The map key should be a list of sample arguments, and the corresponding value should be a description of the behavior that will be exhibited by the extension when used with that configuration.- Specified by:
getExamplesArgumentSets
in interfaceExampleUsageProvider
- Returns:
- A map containing examples of configurations that may be used for
this extension. It may be
null
or empty if there should not be any example argument sets.
-
-