To create a group, perform the following steps:
Include project files.
Create a DirectoryManagerService client.
Determine that the group does not exist.
Create the group.
Perform an action with the group.
Include project files
Include necessary files in your development
project. If you are creating a client application using Java, include
the necessary JAR files.
The following JAR files must be
added to your project’s classpath:
adobe-livecycle-client.jar
adobe-usermanager-client.jar
adobe-utilities.jar (Required if LiveCycle is deployed
on JBoss)
jbossall-client.jar (Required if LiveCycle is deployed
on JBoss)
For information about the location of
these JAR files, see Including LiveCycle Java library files.
Create a DirectoryManagerService client
Before you can programmatically
perform a Directory Manager service operation, create a Directory
Manager Service API client.
Determine whether the group exists
When you create a group, ensure
that the group does not exist in the same domain. That is, two groups
cannot have the same name within the same domain. To perform this
task, perform a search and filter the search results based on two
values. Set the principal type to com.adobe.idp.um.api.infomodel.Principal.PRINCIPALTYPE_GROUP to
ensure that only groups are returned. Also, sure that you specify
the domain name.
Create the group
After you determine that the group does not
exist in the domain, create the group and specify the following
attributes:
CommonName: The name of the group.
Domain: The domain in which the group is added.
Description: A description of the group.
Perform an action with the group
After you create a group, you
can perform an action using the group. For example, you can add
a user to the group. To add a user to a group, retrieve the unique
identifier value of both the user and the group. Pass these values
to the addPrincipalToLocalGroup method.