Package org.opends.server.core
Class SubentryManager
- java.lang.Object
-
- org.opends.server.api.plugin.DirectoryServerPlugin<PluginCfg>
-
- org.opends.server.api.plugin.InternalDirectoryServerPlugin
-
- org.opends.server.core.SubentryManager
-
- All Implemented Interfaces:
LocalBackendInitializationListener
public class SubentryManager extends InternalDirectoryServerPlugin implements LocalBackendInitializationListener
This class provides a mechanism for interacting with subentries defined in the Directory Server. It will handle all necessary processing at server startup to identify and load subentries within the server.
FIXME: At the present time, it assumes that all of the necessary information about subentries defined in the server can be held in memory. If it is determined that this approach is not workable in all cases, then we will need an alternate strategy.
-
-
Constructor Summary
Constructors Constructor Description SubentryManager()Creates a new instance of this subentry manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegisterChangeListener(SubentryChangeListener changeListener)Deregisters the provided change notification listener with this manager so that it will no longer be notified of any add, delete, modify, or modify DN operations that are performed.PluginResult.PostOperationdoPostOperation(PostOperationAddOperation addOperation)Performs any necessary processing that should be done after the Directory Server has completed the core processing for an add operation but before the response has been sent to the client.PluginResult.PostOperationdoPostOperation(PostOperationDeleteOperation deleteOperation)Performs any necessary processing that should be done after the Directory Server has completed the core processing for a delete operation but before the response has been sent to the client.PluginResult.PostOperationdoPostOperation(PostOperationModifyDNOperation modifyDNOperation)Performs any necessary processing that should be done after the Directory Server has completed the core processing for a modify DN operation but before the response has been sent to the client.PluginResult.PostOperationdoPostOperation(PostOperationModifyOperation modifyOperation)Performs any necessary processing that should be done after the Directory Server has completed the core processing for a modify operation but before the response has been sent to the client.voiddoPostSynchronization(PostSynchronizationAddOperation addOperation)Performs any necessary processing that should be done after the Directory Server has completed processing for an add operation performed via synchronization.voiddoPostSynchronization(PostSynchronizationDeleteOperation deleteOperation)Performs any necessary processing that should be done after the Directory Server has completed processing for a delete operation performed via synchronization.voiddoPostSynchronization(PostSynchronizationModifyDNOperation modifyDNOperation)Performs any necessary processing that should be done after the Directory Server has completed processing for a modify DN operation performed via synchronization.voiddoPostSynchronization(PostSynchronizationModifyOperation modifyOperation)Performs any necessary processing that should be done after the Directory Server has completed processing for a modify operation performed via synchronization.PluginResult.PreOperationdoPreOperation(PreOperationAddOperation addOperation)Performs any necessary processing that should be done just before the Directory Server performs the core processing for an add operation.PluginResult.PreOperationdoPreOperation(PreOperationDeleteOperation deleteOperation)Performs any necessary processing that should be done just before the Directory Server performs the core processing for a delete operation.PluginResult.PreOperationdoPreOperation(PreOperationModifyDNOperation modifyDNOperation)Performs any necessary processing that should be done just before the Directory Server performs the core processing for a modify DN operation.PluginResult.PreOperationdoPreOperation(PreOperationModifyOperation modifyOperation)Performs any necessary processing that should be done just before the Directory Server performs the core processing for a modify operation.voidfinalizeSubentryManager()Perform any required finalization tasks for Subentry Manager.List<SubEntry>getCollectiveSubentries(DN dn)Return collective subentries applicable to specific DN.List<SubEntry>getCollectiveSubentries(Entry entry)Return collective subentries applicable to specific entry.List<SubEntry>getSubentries()Return all subentries for this manager.List<SubEntry>getSubentries(DN dn)Return subentries applicable to specific DN.List<SubEntry>getSubentries(Entry entry)Return subentries applicable to specific entry.voidperformBackendPostFinalizationProcessing(LocalBackend<?> backend)Performs any processing that may be required whenever a backend is finalized.voidperformBackendPostInitializationProcessing(LocalBackend<?> backend)Performs any processing that may be required after the Initialisation cycle has been completed, that is all listeners have received the initialisation event, and the backend has been put into service,.voidperformBackendPreFinalizationProcessing(LocalBackend<?> backend)Performs any processing that may be required before starting the finalisation cycle, that is invoked before any listener receive the Finalization event.voidperformBackendPreInitializationProcessing(LocalBackend<?> backend)Performs any processing that may be required whenever a backend is initialized for use in the Directory Server.voidregisterChangeListener(SubentryChangeListener changeListener)Registers the provided change notification listener with this manager so that it will be notified of any add, delete, modify, or modify DN operations that are performed.-
Methods inherited from class org.opends.server.api.plugin.InternalDirectoryServerPlugin
initializePlugin, isConfigurationAcceptable
-
Methods inherited from class org.opends.server.api.plugin.DirectoryServerPlugin
doLDIFExport, doLDIFImport, doLDIFImportBegin, doLDIFImportEnd, doPostConnect, doPostDisconnect, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPreOperation, doPreOperation, doPreOperation, doPreOperation, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doPreParse, doShutdown, doStartup, finalizePlugin, getPluginEntryDN, getPluginTypes, getServerContext, initializeInternal, invokeForInternalOperations, processIntermediateResponse, processSearchEntry, processSearchReference, processSubordinateDelete, processSubordinateModifyDN, setInvokeForInternalOperations
-
-
-
-
Constructor Detail
-
SubentryManager
public SubentryManager() throws DirectoryExceptionCreates a new instance of this subentry manager.- Throws:
DirectoryException- If a problem occurs while creating an instance of the subentry manager.
-
-
Method Detail
-
finalizeSubentryManager
public void finalizeSubentryManager()
Perform any required finalization tasks for Subentry Manager. This should only be called at Directory Server shutdown.
-
registerChangeListener
public void registerChangeListener(SubentryChangeListener changeListener)
Registers the provided change notification listener with this manager so that it will be notified of any add, delete, modify, or modify DN operations that are performed.- Parameters:
changeListener- The change notification listener to register with this manager.
-
deregisterChangeListener
public void deregisterChangeListener(SubentryChangeListener changeListener)
Deregisters the provided change notification listener with this manager so that it will no longer be notified of any add, delete, modify, or modify DN operations that are performed.- Parameters:
changeListener- The change notification listener to deregister with this manager.
-
performBackendPreInitializationProcessing
public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
Performs any processing that may be required whenever a backend is initialized for use in the Directory Server. This method will be invoked after the backend has been initialized but before it has been put into service. In this case, the server will search the backend to find all subentries that it may contain and register them with this manager.- Specified by:
performBackendPreInitializationProcessingin interfaceLocalBackendInitializationListener- Parameters:
backend- The backend that has been initialized and is about to be put into service.
-
getSubentries
public List<SubEntry> getSubentries()
Return all subentries for this manager. Note that this getter will skip any collective subentries, returning only applicable regular subentries.- Returns:
- all subentries for this manager.
-
getSubentries
public List<SubEntry> getSubentries(DN dn)
Return subentries applicable to specific DN. Note that this getter will skip any collective subentries, returning only applicable regular subentries.- Parameters:
dn- for which to retrieve applicable subentries.- Returns:
- applicable subentries.
-
getSubentries
public List<SubEntry> getSubentries(Entry entry)
Return subentries applicable to specific entry. Note that this getter will skip any collective subentries, returning only applicable regular subentries.- Parameters:
entry- for which to retrieve applicable subentries.- Returns:
- applicable subentries.
-
getCollectiveSubentries
public List<SubEntry> getCollectiveSubentries(DN dn)
Return collective subentries applicable to specific DN. Note that this getter will skip any regular subentries, returning only applicable collective subentries.- Parameters:
dn- for which to retrieve applicable subentries.- Returns:
- applicable subentries.
-
getCollectiveSubentries
public List<SubEntry> getCollectiveSubentries(Entry entry)
Return collective subentries applicable to specific entry. Note that this getter will skip any regular subentries, returning only applicable collective subentries.- Parameters:
entry- for which to retrieve applicable subentries.- Returns:
- applicable subentries.
-
performBackendPostFinalizationProcessing
public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
Performs any processing that may be required whenever a backend is finalized. This method will be invoked after the backend has been taken out of service but before it has been finalized. In this case, the server will de-register all subentries associated with the provided backend.- Specified by:
performBackendPostFinalizationProcessingin interfaceLocalBackendInitializationListener- Parameters:
backend- The backend that has been taken out of service and is about to be finalized.
-
performBackendPostInitializationProcessing
public void performBackendPostInitializationProcessing(LocalBackend<?> backend)
Description copied from interface:LocalBackendInitializationListenerPerforms any processing that may be required after the Initialisation cycle has been completed, that is all listeners have received the initialisation event, and the backend has been put into service,.- Specified by:
performBackendPostInitializationProcessingin interfaceLocalBackendInitializationListener- Parameters:
backend- The backend that has been initialized and has been put into service.
-
performBackendPreFinalizationProcessing
public void performBackendPreFinalizationProcessing(LocalBackend<?> backend)
Description copied from interface:LocalBackendInitializationListenerPerforms any processing that may be required before starting the finalisation cycle, that is invoked before any listener receive the Finalization event.- Specified by:
performBackendPreFinalizationProcessingin interfaceLocalBackendInitializationListener- Parameters:
backend- The backend that is about to be finalized.
-
doPreOperation
public PluginResult.PreOperation doPreOperation(PreOperationAddOperation addOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done just before the Directory Server performs the core processing for an add operation. This method is not called when processing synchronization operations.- Overrides:
doPreOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
addOperation- The add operation to be processed.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PluginResult.PreOperation doPreOperation(PreOperationDeleteOperation deleteOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done just before the Directory Server performs the core processing for a delete operation. This method is not called when processing synchronization operations.- Overrides:
doPreOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
deleteOperation- The delete operation to be processed.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PluginResult.PreOperation doPreOperation(PreOperationModifyOperation modifyOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done just before the Directory Server performs the core processing for a modify operation. This method is not called when processing synchronization operations.- Overrides:
doPreOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyOperation- The modify operation to be processed.- Returns:
- Information about the result of the plugin processing.
-
doPreOperation
public PluginResult.PreOperation doPreOperation(PreOperationModifyDNOperation modifyDNOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done just before the Directory Server performs the core processing for a modify DN operation. This method is not called when processing synchronization operations.- Overrides:
doPreOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyDNOperation- The modify DN operation to be processed.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PluginResult.PostOperation doPostOperation(PostOperationAddOperation addOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed the core processing for an add operation but before the response has been sent to the client.- Overrides:
doPostOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
addOperation- The add operation for which processing has completed but no response has yet been sent.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PluginResult.PostOperation doPostOperation(PostOperationDeleteOperation deleteOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed the core processing for a delete operation but before the response has been sent to the client.- Overrides:
doPostOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
deleteOperation- The delete operation for which processing has completed but no response has yet been sent.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PluginResult.PostOperation doPostOperation(PostOperationModifyOperation modifyOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed the core processing for a modify operation but before the response has been sent to the client.- Overrides:
doPostOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyOperation- The modify operation for which processing has completed but no response has yet been sent.- Returns:
- Information about the result of the plugin processing.
-
doPostOperation
public PluginResult.PostOperation doPostOperation(PostOperationModifyDNOperation modifyDNOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed the core processing for a modify DN operation but before the response has been sent to the client.- Overrides:
doPostOperationin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyDNOperation- The modify DN operation for which processing has completed but no response has yet been sent.- Returns:
- Information about the result of the plugin processing.
-
doPostSynchronization
public void doPostSynchronization(PostSynchronizationAddOperation addOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed processing for an add operation performed via synchronization.- Overrides:
doPostSynchronizationin classDirectoryServerPlugin<PluginCfg>- Parameters:
addOperation- The synchronized add operation for which processing has been completed.
-
doPostSynchronization
public void doPostSynchronization(PostSynchronizationDeleteOperation deleteOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed processing for a delete operation performed via synchronization.- Overrides:
doPostSynchronizationin classDirectoryServerPlugin<PluginCfg>- Parameters:
deleteOperation- The synchronized delete operation for which processing has been completed.
-
doPostSynchronization
public void doPostSynchronization(PostSynchronizationModifyOperation modifyOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed processing for a modify operation performed via synchronization.- Overrides:
doPostSynchronizationin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyOperation- The synchronized modify operation for which processing has been completed.
-
doPostSynchronization
public void doPostSynchronization(PostSynchronizationModifyDNOperation modifyDNOperation)
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has completed processing for a modify DN operation performed via synchronization.- Overrides:
doPostSynchronizationin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyDNOperation- The synchronized modify DN operation for which processing has been completed.
-
-