You can delete an existing policy using the Rights Management
Java API or web service API. After a policy is deleted, it can no
longer be used to protect documents. However, existing policy-protected
documents that are using the policy are still protected. You can
delete a policy when a newer one becomes available.
Summary of steps
To delete an existing policy, perform
the following steps:
-
Include project files
-
Create a Rights Management Client API object.
-
Delete the policy.
Include project files
Include necessary files into 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 Rights Management Client API object
Before you can programmatically
perform a Rights Management service operation, you must create a
Rights Management service client object. If you are using the Java
API, create a
RightsManagementClient
object. If
you are using the Rights Management web service API, create a
RightsManagementServiceService
object.
Delete the policy
To delete a policy, you specify the policy
to delete and the policy set to which the policy belongs. The user
whose settings are used to invoke LiveCycle must have permission
to delete the policy; otherwise an exception occurs. Likewise, if
you attempt to delete a policy that does not exist, an exception occurs.
Delete policies using the Java API
Delete a policy by using the Rights Management API (Java):
-
Include project files.
Include client JAR files,
such as adobe-rightsmanagement-client.jar, in your Java project’s
class path.
-
Create a Rights Management Client API object.
-
Delete the policy.
-
Create a
PolicyManager
object
by invoking the
RightsManagementClient
object’s
getPolicyManager
method.
-
Delete the policy by invoking the
PolicyManager
object’s
deletePolicy
method
and passing the following values:
-
A string value that
specifies the policy set name to which the policy belongs. You can
specify
null
that results in the
MyPolicies
policy set
being used.
-
A string value that specifies the name of the policy to delete.
Delete policies using the web service API
Delete a policy by using the Rights Management API (web
service):
-
Include project files.
Create a Microsoft .NET
project that uses MTOM. Ensure that you use the following WSDL definition:
http://localhost:8080/soap/services/RightsManagementService?WSDL&lc_version=9.0.1
.
Note:
Replace
localhost
with the IP
address of the server hosting LiveCycle.
-
Create a Rights Management Client API object.
-
Create a
RightsManagementServiceClient
object
by using its default constructor.
-
Create a
RightsManagementServiceClient.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/RightsManagementService?WSDL
.)
You do not need to use the
lc_version
attribute. This
attribute is used when you create a service reference.)
-
Create a
System.ServiceModel.BasicHttpBinding
object
by getting the value of the
RightsManagementServiceClient.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 AEM forms user name to the
field
RightsManagementServiceClient.ClientCredentials.UserName.UserName
.
-
Assign the corresponding password value to the field
RightsManagementServiceClient.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
.
-
Delete the policy.
Delete a policy by invoking the
RightsManagementServiceClient
object’s
deletePolicy
method
and passing the following values:
-
A string value that
specifies the policy set name to which the policy belongs. You can
specify
null
that results in the
MyPolicies
policy
set being used.
-
A string value that specifies the name of the policy to delete.
|
|
|