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 final 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.
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
ConstructorsConstructorDescriptionSubentryManager(ServerContext serverContext) Creates a new instance of this subentry manager. -
Method Summary
Modifier and TypeMethodDescriptionvoidderegisterChangeListener(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.voiddoPostCommit(PostCommitAddOperation addOperation) Performs any necessary processing that should be done after the Directory Server has committed an add operation.voiddoPostCommit(PostCommitDeleteOperation deleteOperation) Performs any necessary processing that should be done after the Directory Server has committed a delete operation.voiddoPostCommit(PostCommitModifyDNOperation modifyDNOperation) Performs any necessary processing that should be done after the Directory Server has committed a modify DN operation.voiddoPostCommit(PostCommitModifyOperation modifyOperation) Performs any necessary processing that should be done after the Directory Server has committed a modify operation.voiddoPreOperation(PreOperationAddOperation addOperation) Performs any necessary processing that should be done just before the Directory Server performs the core processing for an add operation.voiddoPreOperation(PreOperationDeleteOperation deleteOperation) Performs any necessary processing that should be done just before the Directory Server performs the core processing for a delete operation.voiddoPreOperation(PreOperationModifyDNOperation modifyDNOperation) Performs any necessary processing that should be done just before the Directory Server performs the core processing for a modify DN operation.voiddoPreOperation(PreOperationModifyOperation modifyOperation) Performs any necessary processing that should be done just before the Directory Server performs the core processing for a modify operation.voidPerforms any required finalization tasks for Subentry Manager.<T> List<T>getClosestPwPolicySubentries(Entry entry, Function<SubEntry, T> mappingFunction) Returns the closest password policy subentries applicable to provided entry.Returns collective subentries applicable to specific DN.getCollectiveSubentries(Entry entry) Returns collective subentries applicable to specific entry.Returns all subentries for this manager.getSubentries(Dn dn) Returns subentries applicable to specific DN.voidperformBackendPostFinalizationProcessing(String backendId, Predicate<Dn> handlesEntry) Performs any processing that may be required whenever a backend is finalized.voidPerforms 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, isConfigurationAcceptableMethods inherited from class org.opends.server.api.plugin.DirectoryServerPlugin
doLDIFImport, doLDIFImportBegin, doLDIFImportEnd, doPostConnect, doPostDisconnect, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostSynchronization, doPostSynchronization, doPostSynchronization, doPostSynchronization, 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, setInvokeForInternalOperationsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opends.server.api.LocalBackendInitializationListener
performBackendPostInitializationProcessing, performBackendPreFinalizationProcessing
-
Constructor Details
-
SubentryManager
Creates a new instance of this subentry manager.- Parameters:
serverContext- the server context
-
-
Method Details
-
finalizeSubentryManager
public void finalizeSubentryManager()Performs any required finalization tasks for Subentry Manager. This should only be called at Directory Server shutdown. -
registerChangeListener
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
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
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
Returns 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
Returns 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.
-
getCollectiveSubentries
Returns collective subentries applicable to specific DN. Note that this getter will skip any regular subentries, returning only applicable collective subentries.- Parameters:
dn- The DN for which to retrieve applicable subentries.- Returns:
- applicable subentries.
-
getCollectiveSubentries
Returns collective subentries applicable to specific entry. Note that this getter will skip any regular subentries, returning only applicable collective subentries.- Parameters:
entry- The entry for which to retrieve applicable subentries.- Returns:
- The applicable collective subentries.
-
getClosestPwPolicySubentries
Returns the closest password policy subentries applicable to provided entry. Once an applicable policy is found, only it and the ones at the same level (i.e. the "closest") are returned.- Type Parameters:
T- The type of entry to return.- Parameters:
entry- The entry for which to retrieve the closest applicable subentries.mappingFunction- The function that maps a subEntry to T.- Returns:
- The closest applicable password policy subentries, mapped as T.
-
performBackendPostFinalizationProcessing
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 and after it has been finalized.In this case, the server will de-register all subentries associated with the provided backend.
- Specified by:
performBackendPostFinalizationProcessingin interfaceLocalBackendInitializationListener- Parameters:
backendId- The backend ID of the backend that has been taken out of service.handlesEntry- A predicate which can be used for determining whether the finalized backend contained an entry.
-
doPreOperation
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.- Throws:
LdapException- if this pre operation failed.
-
doPreOperation
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.- Throws:
LdapException- if this pre operation failed.
-
doPreOperation
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.- Throws:
LdapException- if this pre operation failed.
-
doPreOperation
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.- Throws:
LdapException- if this pre operation failed.
-
doPostCommit
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has committed an add operation.- Overrides:
doPostCommitin classDirectoryServerPlugin<PluginCfg>- Parameters:
addOperation- The add operation that has just been committed.
-
doPostCommit
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has committed a delete operation.- Overrides:
doPostCommitin classDirectoryServerPlugin<PluginCfg>- Parameters:
deleteOperation- The delete operation that has just been committed.
-
doPostCommit
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has committed a modify operation.- Overrides:
doPostCommitin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyOperation- The modify operation that has just been committed.
-
doPostCommit
Description copied from class:DirectoryServerPluginPerforms any necessary processing that should be done after the Directory Server has committed a modify DN operation.- Overrides:
doPostCommitin classDirectoryServerPlugin<PluginCfg>- Parameters:
modifyDNOperation- The modify DN operation that has just been committed.
-