public class GroupManager extends InternalDirectoryServerPlugin implements ConfigurationChangeListener<GroupImplementationCfg>, ConfigurationAddListener<GroupImplementationCfg>, ConfigurationDeleteListener<GroupImplementationCfg>, LocalBackendInitializationListener
Constructor and Description |
---|
GroupManager(ServerContext serverContext)
Creates a new instance of this group manager.
|
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationAdd(GroupImplementationCfg configuration)
Adds a new configuration to this add listener.
|
ConfigChangeResult |
applyConfigurationChange(GroupImplementationCfg configuration)
Applies the configuration changes to this change listener.
|
ConfigChangeResult |
applyConfigurationDelete(GroupImplementationCfg configuration)
Deletes an existing configuration from this delete listener.
|
PluginResult.PostOperation |
doPostOperation(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.PostOperation |
doPostOperation(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.PostOperation |
doPostOperation(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.PostOperation |
doPostOperation(PostOperationModifyOperation modifyOp)
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.
|
void |
doPostSynchronization(PostSynchronizationAddOperation addOperation)
Performs any necessary processing that should be done after the Directory Server has completed processing for an
add operation performed via synchronization.
|
void |
doPostSynchronization(PostSynchronizationDeleteOperation deleteOperation)
Performs any necessary processing that should be done after the Directory Server has completed processing for a
delete operation performed via synchronization.
|
void |
doPostSynchronization(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.
|
void |
doPostSynchronization(PostSynchronizationModifyOperation modifyOperation)
Performs any necessary processing that should be done after the Directory Server has completed processing for a
modify operation performed via synchronization.
|
<R,E extends Exception> |
doWithSharedLock(Function<Void,R,E> function)
Executes the provided function after acquiring this group manager's read lock.
|
void |
finalizeGroupManager()
Performs any cleanup work that may be needed when the server is shutting down.
|
Iterable<Group<?>> |
getGroupImplementations()
Retrieves an
Iterable object that may be used to cursor across the group implementations defined in the
server. |
Group<?> |
getGroupInstance(Dn entryDN)
Retrieves the group instance defined in the entry with the specified DN.
|
Iterable<Group<?>> |
getGroupInstances()
Retrieves an
Iterable object that may be used to cursor across the group instances defined in the server. |
boolean |
hasInstancesChanged(long token)
Compare the specified token against the current group manager token value.
|
void |
initializeGroupImplementations()
Initializes all group implementations currently defined in the Directory Server configuration.
|
boolean |
isConfigurationAddAcceptable(GroupImplementationCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed addition of a new configuration is
acceptable to this add listener.
|
boolean |
isConfigurationChangeAcceptable(GroupImplementationCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable
to this change listener.
|
boolean |
isConfigurationDeleteAcceptable(GroupImplementationCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed deletion of an existing configuration is
acceptable to this delete listener.
|
void |
performBackendPostFinalizationProcessing(LocalBackend<?> backend)
Performs any processing that may be required whenever a backend is finalized.
|
void |
performBackendPreInitializationProcessing(LocalBackend<?> backend)
Performs any processing that may be required whenever a backend is initialized for use in the Directory Server.
|
long |
refreshToken()
Return the current refresh token value.
|
initializePlugin, isConfigurationAcceptable
doLDIFExport, doLDIFImport, doLDIFImportBegin, doLDIFImportEnd, doPostConnect, doPostDisconnect, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostOperation, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPostResponse, doPreOperation, doPreOperation, doPreOperation, doPreOperation, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
performBackendPostInitializationProcessing, performBackendPreFinalizationProcessing
public GroupManager(ServerContext serverContext)
serverContext
- The server context.public void initializeGroupImplementations() throws ConfigException
ConfigException
- If a configuration problem causes the group implementation initialization process to fail.public ConfigChangeResult applyConfigurationAdd(GroupImplementationCfg configuration)
ConfigurationAddListener
applyConfigurationAdd
in interface ConfigurationAddListener<GroupImplementationCfg>
configuration
- The configuration that will be added.public boolean isConfigurationDeleteAcceptable(GroupImplementationCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConfigurationDeleteListener
isConfigurationDeleteAcceptable
in interface ConfigurationDeleteListener<GroupImplementationCfg>
configuration
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed deletion is acceptable,
or false
if it is not.public ConfigChangeResult applyConfigurationDelete(GroupImplementationCfg configuration)
ConfigurationDeleteListener
applyConfigurationDelete
in interface ConfigurationDeleteListener<GroupImplementationCfg>
configuration
- The existing configuration that will be deleted.public boolean isConfigurationAddAcceptable(GroupImplementationCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConfigurationAddListener
isConfigurationAddAcceptable
in interface ConfigurationAddListener<GroupImplementationCfg>
configuration
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed addition is acceptable,
or false
if it is not.public boolean isConfigurationChangeAcceptable(GroupImplementationCfg configuration, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<GroupImplementationCfg>
configuration
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed change is acceptable,
or false
if it is not.public ConfigChangeResult applyConfigurationChange(GroupImplementationCfg configuration)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<GroupImplementationCfg>
configuration
- The new configuration containing the changes.public void finalizeGroupManager()
public Iterable<Group<?>> getGroupImplementations()
Iterable
object that may be used to cursor across the group implementations defined in the
server.Iterable
object that may be used to cursor across the group implementations defined in the
server.public Iterable<Group<?>> getGroupInstances()
Iterable
object that may be used to cursor across the group instances defined in the server.Iterable
object that may be used to cursor across the group instances defined in the server.public Group<?> getGroupInstance(Dn entryDN)
entryDN
- The DN of the entry containing the definition of the group instance to retrieve.null
if no such group is
currently defined.public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
In this case, the server will search the backend to find all group instances that it may contain and register them with this group manager.
performBackendPreInitializationProcessing
in interface LocalBackendInitializationListener
backend
- The backend that has been initialized and is about to be put into service.public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
In this case, the server will de-register all group instances associated with entries in the provided backend.
performBackendPostFinalizationProcessing
in interface LocalBackendInitializationListener
backend
- The backend that has been taken out of service and is about to be finalized.public PluginResult.PostOperation doPostOperation(PostOperationAddOperation addOperation)
DirectoryServerPlugin
doPostOperation
in class DirectoryServerPlugin<PluginCfg>
addOperation
- The add operation for which processing has completed but no response has yet been sent.public PluginResult.PostOperation doPostOperation(PostOperationDeleteOperation deleteOperation)
DirectoryServerPlugin
doPostOperation
in class DirectoryServerPlugin<PluginCfg>
deleteOperation
- The delete operation for which processing has completed but no response has yet been sent.public PluginResult.PostOperation doPostOperation(PostOperationModifyOperation modifyOp)
DirectoryServerPlugin
doPostOperation
in class DirectoryServerPlugin<PluginCfg>
modifyOp
- The modify operation for which processing has completed but no response has yet been sent.public PluginResult.PostOperation doPostOperation(PostOperationModifyDNOperation modifyDNOperation)
DirectoryServerPlugin
doPostOperation
in class DirectoryServerPlugin<PluginCfg>
modifyDNOperation
- The modify DN operation for which processing has completed but no response has yet been sent.public void doPostSynchronization(PostSynchronizationAddOperation addOperation)
DirectoryServerPlugin
doPostSynchronization
in class DirectoryServerPlugin<PluginCfg>
addOperation
- The synchronized add operation for which processing has been completed.public void doPostSynchronization(PostSynchronizationDeleteOperation deleteOperation)
DirectoryServerPlugin
doPostSynchronization
in class DirectoryServerPlugin<PluginCfg>
deleteOperation
- The synchronized delete operation for which processing has been completed.public void doPostSynchronization(PostSynchronizationModifyOperation modifyOperation)
DirectoryServerPlugin
doPostSynchronization
in class DirectoryServerPlugin<PluginCfg>
modifyOperation
- The synchronized modify operation for which processing has been completed.public void doPostSynchronization(PostSynchronizationModifyDNOperation modifyDNOperation)
DirectoryServerPlugin
doPostSynchronization
in class DirectoryServerPlugin<PluginCfg>
modifyDNOperation
- The synchronized modify DN operation for which processing has been completed.public <R,E extends Exception> R doWithSharedLock(Function<Void,R,E> function) throws E extends Exception
R
- The return type of the functionE
- the exception that may be thrown by the functionfunction
- the function to executeE
- the exception thrown by the functionE extends Exception
public boolean hasInstancesChanged(long token)
token
- The current token that the group class holds.true
if the group class should reload its nested groups, or false
if it shouldn't.public long refreshToken()
Copyright 2010-2022 ForgeRock AS.