ConnectorLib Java 24.3

# SynchronizeGroups

As described in Groups, it is sometimes necessary for a connector to provide group membership information to a group server.

OmniGroupServer might be configured to store group information from a repository with the following settings:

    [MyRepository]
    GroupServerJobType=Connector
    ConnectorHost=localhost
    ConnectorPort=1234
    ConnectorTask=MyFetchTask

When OmniGroupServer needs to get the latest group membership information for the “MyRepository” repository, it sends a `SynchronizeGroups` fetch action to the connector listening at `localhost:1234`.

To implement the `SynchronizeGroups` fetch action, a connector implementation must override the `s` `ynchronizeGroups` method in `ConnectorBase`, as illustrated in this sample code:

           public void synchronizeGroups(SynchronizeGroupsTask task) throws Exception
           {
               task.getGroupServer().addMemberUser("Editors", "Samantha");
               task.getGroupServer().addMemberUser("Editors", "George");
               task.getGroupServer().addMemberUser("Viewers", "Samantha");
               task.getGroupServer().addMemberUser("Viewers", "Henry");
               task.getGroupServer().finish();
           }

The `SynchronizeGroupsTask` passed in to the `s` `ynchronizeGroups` method has a `GroupServer` member - accessed through `getGroupServer() -` that allows you to send membership information to the Group Server. In this example the user “Samantha” is a member of the “Editors” group and the “Viewers” group, “George” is a member of the “Editors” group only, and “Henry” is a member of the “Viewers” group only. This information completely replaces any information previously present in the group server `[MyRepository]` repository.

When the connector has updated the group server with all of the group membership information from the repository, the `SynchronizeGroups` task is complete.

Copyright 2024 Open Text
Version 24.3 | Last updated June 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL ConnectorLib Java 24.3

Topic Title: SynchronizeGroups