Programmatically Synchronizing Users

You can programmatically synchronize users by using the User Management API. When you synchronize users, you are updating LiveCycle with user data that is located in your user repository. For example, assume that you add new users to your user repository. After you perform a synchronization operation, the new users become LiveCycle users. As well, users no longer in your user respository are removed from LiveCycle.

The following diagram shows LiveCycle synchronizing with a user respository.

The following table describes the steps in this diagram

Step

Description

1

A client application requests that LiveCycle performs a synchronization operation.

2

LiveCycle performs a synchronization operation.

3

User information is updated.

4

A user is able to view the updated user information.

Summary of steps

To programmatically synchronize users, perform the following steps:

  1. Include project files.

  2. Create a UserManagerUtilServiceClient client.

  3. Specify the enterprise domain.

  4. Invoke the authentication operation.

  5. Determine if the synchronization operation is complete

Include project files

Include necessary files in your development project. If you are creating a client application using Java, then include the necessary JAR files. If you are using web services, then make sure that you include the proxy files.

Create a UserManagerUtilServiceClientclient

Before you can programmatically synchronize users, you must create a UserManagerUtilServiceClient object.

Specify the enterprise domain

Before you perform a synchronization operation by using the User Management API, you specify the enterprise domain to which users belong. You can specify one or many enterprise domains. Before you can programmatically perform a synchronization operation, you have to setup an enterprise domain using Administration Console. (See LiveCycle Administration Help.)

Invoke the synchronization operation

After you specify one or more enterprise domains, you can perform the synchronization operation. The time it takes to perform this operation depends upon the number of user records that are located in the user repository.

Determine if the synchronization operation is complete

After you programmatically perform a synchronization operation, you can detemine if the operation is complete.

Programmatically synchronizing users using the Java API

Synchronize users by using the User Management API (Java):

  1. Include project files.

    Include client JAR files, such as adobe-usermanager-client.jar and adobe-usermanager-util-client.jar, in your Java project’s class path.

  2. Create a UserManagerUtilServiceClient client.

    Create a UserManagerUtilServiceClient object by using its constructor and passing a ServiceClientFactory object that contains connection properties.

  3. Specify the enterprise domain.

    • Invoke the UserManagerUtilServiceClient object’s scheduleSynchronization method to start the user synchronization operation.

    • Create a java.util.Set instance by using a HashSet constructor. Ensure that you specify String as the data type. This Java.util.Set instance stores the domain names to which the synchronization operation applies.

    • For each domain name to add, invoke the java.util.Set object’s add method and pass the domain name.

  4. Invoke the synchronization operation.

    Invoke the ServiceClientFactory object’s getContext method, which will return a Context object.

    Then invoke the Context object’s initPrincipal method and pass the AuthResult.