Class GroupManager

    • Constructor Detail

      • GroupManager

        public GroupManager​(ServerContext serverContext)
                     throws DirectoryException
        Creates a new instance of this group manager.
        Parameters:
        serverContext - The server context.
        Throws:
        DirectoryException - If a problem occurs while creating an instance of the group manager.
    • Method Detail

      • initializeGroupImplementations

        public void initializeGroupImplementations()
                                            throws ConfigException,
                                                   InitializationException
        Initializes all group implementations currently defined in the Directory Server configuration. This should only be called at Directory Server startup.
        Throws:
        ConfigException - If a configuration problem causes the group implementation initialization process to fail.
        InitializationException - If a problem occurs while initializing the group implementations that is not related to the server configuration.
      • isConfigurationAddAcceptable

        public boolean isConfigurationAddAcceptable​(GroupImplementationCfg configuration,
                                                    List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationAddListener
        Indicates whether the proposed addition of a new configuration is acceptable to this add listener.
        Specified by:
        isConfigurationAddAcceptable in interface ConfigurationAddListener<GroupImplementationCfg>
        Parameters:
        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.
        Returns:
        Returns true if the proposed addition is acceptable, or false if it is not.
      • isConfigurationDeleteAcceptable

        public boolean isConfigurationDeleteAcceptable​(GroupImplementationCfg configuration,
                                                       List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationDeleteListener
        Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.
        Specified by:
        isConfigurationDeleteAcceptable in interface ConfigurationDeleteListener<GroupImplementationCfg>
        Parameters:
        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.
        Returns:
        Returns true if the proposed deletion is acceptable, or false if it is not.
      • isConfigurationChangeAcceptable

        public boolean isConfigurationChangeAcceptable​(GroupImplementationCfg configuration,
                                                       List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationChangeListener
        Indicates whether the proposed change to the configuration is acceptable to this change listener.
        Specified by:
        isConfigurationChangeAcceptable in interface ConfigurationChangeListener<GroupImplementationCfg>
        Parameters:
        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.
        Returns:
        Returns true if the proposed change is acceptable, or false if it is not.
      • finalizeGroupManager

        public void finalizeGroupManager()
        Performs any cleanup work that may be needed when the server is shutting down.
      • getGroupImplementations

        public Iterable<Group<?>> getGroupImplementations()
        Retrieves an Iterable object that may be used to cursor across the group implementations defined in the server.
        Returns:
        An Iterable object that may be used to cursor across the group implementations defined in the server.
      • getGroupInstances

        public Iterable<Group<?>> getGroupInstances()
        Retrieves an Iterable object that may be used to cursor across the group instances defined in the server.
        Returns:
        An Iterable object that may be used to cursor across the group instances defined in the server.
      • getGroupInstance

        public Group<?> getGroupInstance​(DN entryDN)
        Retrieves the group instance defined in the entry with the specified DN.
        Parameters:
        entryDN - The DN of the entry containing the definition of the group instance to retrieve.
        Returns:
        The group instance defined in the entry with the specified DN, or null if no such group is currently defined.
      • 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 group instances that it may contain and register them with this group manager.
        Specified by:
        performBackendPreInitializationProcessing in interface LocalBackendInitializationListener
        Parameters:
        backend - The backend that has been initialized and is about to be put into service.
      • 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 group instances associated with entries in the provided backend.
        Specified by:
        performBackendPostFinalizationProcessing in interface LocalBackendInitializationListener
        Parameters:
        backend - The backend that has been taken out of service and is about to be finalized.
      • doPostOperation

        public PluginResult.PostOperation doPostOperation​(PostOperationAddOperation addOperation)
        Description copied from class: DirectoryServerPlugin
        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.
        Overrides:
        doPostOperation in class DirectoryServerPlugin<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: DirectoryServerPlugin
        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.
        Overrides:
        doPostOperation in class DirectoryServerPlugin<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: DirectoryServerPlugin
        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.
        Overrides:
        doPostOperation in class DirectoryServerPlugin<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: DirectoryServerPlugin
        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.
        Overrides:
        doPostOperation in class DirectoryServerPlugin<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.
      • hasInstancesChanged

        public boolean hasInstancesChanged​(long token)
        Compare the specified token against the current group manager token value. Can be used to reload cached group instances if there has been a group instance change.
        Parameters:
        token - The current token that the group class holds.
        Returns:
        true if the group class should reload its nested groups, or false if it shouldn't.
      • refreshToken

        public long refreshToken()
        Return the current refresh token value. Can be used to reload cached group instances if there has been a group instance change.
        Returns:
        The current token value.