You can use the Directory Manager Service API (Java and
web service) to programmatically delete users from LiveCycle.
After you delete a user, the user can no longer be used to perform
a service operation that requires a user. For example, you cannot
assign a task to a deleted user. (See Assigning Tasks.)
Summary of stepsTo delete a user, perform the following steps:
Include project files.
Create a DirectoryManagerService client.
Specify the user to delete.
Delete the user from LiveCycle.
Include project filesInclude necessary files in your development
project. If you are creating a client application by using Java,
include the necessary JAR files. If you are using web services,
include the proxy files.
Create a DirectoryManagerService clientBefore you can programmatically
perform a Directory Manager Service API operation, create a Directory
Manager service client.
Specify the user to deleteYou can specify a user to delete by
using the user’s identifier value.
Delete the user from LiveCycleTo delete a user, invoke
the DirectoryManagerServiceClient object’s deleteLocalUser method.
Delete users using the Java APIDelete users by using the Directory Manager Service API
(Java):
Include project files.
Include client JAR files,
such as adobe-usermanager-client.jar, in your Java project’s class
path.
Create a DirectoryManagerService client.
Create a DirectoryManagerServiceClient object
by using its constructor and passing a ServiceClientFactory object
that contains connection properties.
Specify the user to delete.
Create a PrincipalSearchFilter object
by using its constructor.
Set the user identifier value by invoking the PrincipalSearchFilter object’s setUserId method.
Pass a string value that represents the user identifier value.
Invoke the DirectoryManagerServiceClient object’s findPrincipals method
and pass the PrincipalSearchFilter object. This
method returns a java.util.List instance, where
each element is a User object. Iterate through
the java.util.List instance to locate the user
to delete.
Delete the user from LiveCycle.
Invoke the DirectoryManagerServiceClient object’s deleteLocalUser method
and pass the value of the User object’s oid field.
Invoke the User object’s getOid method.
Use the User object retrieved from the java.util.List instance.
Delete users using the web service APIDelete users by using the Directory Manager Service API
(web service):
Include project files.
Include client JAR files,
such as adobe-usermanager-client.jar, in your Java project’s class
path.
Create a DirectoryManagerService client.
Create
a DirectoryManagerServiceClient object by using
its default constructor.
Create a DirectoryManagerServiceClient.Endpoint.Address object
by using the System.ServiceModel.EndpointAddress constructor.
Pass a string value that specifies the WSDL to the LiveCycle service (for example, http://localhost:8080/soap/services/DirectoryManagerService?blob=mtom).
You do not need to use the lc_version attribute.
This attribute is used when you create a service reference. Ensure
that you specify blob=mtom.
Create a System.ServiceModel.BasicHttpBinding object
by getting the value of the DirectoryManagerServiceClient.Endpoint.Binding field.
Cast the return value to BasicHttpBinding.
Set the System.ServiceModel.BasicHttpBinding object’s MessageEncoding field
to WSMessageEncoding.Mtom. This value ensures that
MTOM is used.
Enable basic HTTP authentication by performing the following tasks:
Assign the LiveCycle user name to the field DirectoryManagerServiceClient.ClientCredentials.UserName.UserName.
Assign the corresponding password value to the field DirectoryManagerServiceClient.ClientCredentials.UserName.Password.
Assign the constant value HttpClientCredentialType.Basic to
the field BasicHttpBindingSecurity.Transport.ClientCredentialType.
Assign the constant value BasicHttpSecurityMode.TransportCredentialOnly to
the field BasicHttpBindingSecurity.Security.Mode.
Specify the user to delete.
Create a PrincipalSearchFilter object
by using its constructor.
Set the user identifier value by assigning a string value
to the PrincipalSearchFilter object’s userId field.
Invoke the DirectoryManagerServiceClient object’s findPrincipals method
and pass the PrincipalSearchFilter object. This
method returns a MyArrayOfUser collection object,
where each element is a User object. Iterate through
the MyArrayOfUser collection to locate the user.
The User object retrieved from the MyArrayOfUser collection
object is used to delete the user.
Delete the user from LiveCycle.
Delete the
user by passing the User object’s oid field
value to the DirectoryManagerServiceClient object’s deleteLocalUser method.
|
|
|