com.adobe.livecycle.rightsmanagement.client
Interface AbstractPolicyManager


public interface AbstractPolicyManager

The AbstractPolicyManager interface defines a mechanism to register abstract policies with the Rights Management service and to search and modify abstract policies that are already registered.Administrator accounts can register, search, and modify all abstract policies.

Registered abstract policies reside in the Adobe Experience Manager Forms database. To modify a registered abstract policy, you must first retrieve the abstract policy. For information, see the Modifying an abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms .


Method Summary
 java.lang.String createPolicyFromAbstractPolicy(java.lang.String policySetNameOfNewPolicy, java.lang.String newPolicyName, java.lang.String policySetNameOfExistingPolicy, java.lang.String abstractPolicyName, java.util.List principals)
          Create a policy from an existing abstract policy
 void deleteAbstractPolicy(java.lang.String policySetName, java.lang.String abstractPolicyName)
          Deletes the specified abstract policy.
 AbstractPolicy[] getAbstractPolicies(AbstractPolicySearchFilter filter, int maxResults)
          Returns AbstractPolicy objects based on the specified search criteria.
 AbstractPolicy getAbstractPolicy(java.lang.String abstractPolicyId)
          Retrieves the specified abstract policy from the database.
 AbstractPolicy getAbstractPolicy(java.lang.String policySetName, java.lang.String policyName)
          Retrieves the specified abstract policy from the database.
 java.lang.String registerAbstractPolicy(AbstractPolicy abstractPolicy, java.lang.String policySetName)
          Registers the provided abstract policy with the Rights Management service.
 void updateAbstractPolicy(AbstractPolicy updatedPolicy)
          Updates an existing abstract policy with the properties defined in a new abstract policy definition.
 

Method Detail

registerAbstractPolicy

java.lang.String registerAbstractPolicy(AbstractPolicy abstractPolicy,
                                        java.lang.String policySetName)
                                        throws SDKException
Registers the provided abstract policy with the Rights Management service. You can register the abstract policy in the specified policy set. Policy Set name must be specified.

To see this method used in a code example, see the Creating a policy using the Java API quick start in Programming with Adobe Experience Manager Forms .

Parameters:
abstractPolicy - A new abstract policy to register with the Rights Management service.
policySetName - The name of the policy set that stores the abstract policy.
Throws:
SDKException - if any of the following conditions occur:
  • The abstract policy name is already registered.
  • The abstract policy you provided is not valid.
  • The policySetName is not valid or does not exist.
  • The operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

deleteAbstractPolicy

void deleteAbstractPolicy(java.lang.String policySetName,
                          java.lang.String abstractPolicyName)
                          throws SDKException
Deletes the specified abstract policy. Deleted abstract policies can no longer be used to create policies.

To see this method used within a code example, see the Deleting an abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms .

Parameters:
policySetName - The name of the policy set that contains the abstract policy. The policy set name cannot be null.
abstractPolicyName - The name of the abstract policy to delete.
Throws:
SDKException - If any of the following conditions occur:
  • The abstract policy is already deleted.
  • The abstract policy identification is not valid.
  • The operation was not permitted.
  • An error occurred while communicating with the Rights Management service.
See Also:
AbstractPolicy

updateAbstractPolicy

void updateAbstractPolicy(AbstractPolicy updatedPolicy)
                          throws SDKException
Updates an existing abstract policy with the properties defined in a new abstract policy definition. To update an abstract policy, you must first retrieve the abstract policy from the Rights Management service.

To see this method used within a code example, see the Modifying an abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms.

Parameters:
updatedAbstractPolicy - An AbstractPolicy object that represents the abstract policy to update. The abstract policy was previously retrieved and modified as required.
Throws:
SDKException - if any of the following conditions occur:
  • The abstract policy you provided is not valid.
  • The operation is not permitted.
  • An error occurred while communicating with the Rights Management service.
See Also:
AbstractPolicyManager.getAbstractPolicy(String, String), AbstractPolicyManager.getAbstractPolicies(com.adobe.livecycle.rightsmanagement.client.infomodel.AbstractPolicySearchFilter, int)

getAbstractPolicy

AbstractPolicy getAbstractPolicy(java.lang.String policySetName,
                                 java.lang.String policyName)
                                 throws SDKException
Retrieves the specified abstract policy from the database.

To see this method used within a code example, see the Modifying an abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms .

Parameters:
policySetName - The name of the policy set that contains the abstract policy.
policyName - The name of the abstract policy to retrieve.
Returns:
The AbstractPolicy object that corresponds to the specified abstract policy name and policy set name.
Throws:
SDKException - if any of the following conditions occur:
  • The abstract policy identification is not valid.
  • The abstract policy was not found.
  • The operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

getAbstractPolicy

AbstractPolicy getAbstractPolicy(java.lang.String abstractPolicyId)
                                 throws SDKException
Retrieves the specified abstract policy from the database.

Parameters:
abstractPolicyId - The unique identifier of the abstract policy.
Returns:
The AbstractPolicy object that corresponds to the specified abstract policy identifier.
Throws:
SDKException - if any of the following conditions occur:
  • The abstract policy identifier is not valid.
  • The abstract policy was not found.
  • The operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

getAbstractPolicies

AbstractPolicy[] getAbstractPolicies(AbstractPolicySearchFilter filter,
                                     int maxResults)
                                     throws SDKException
Returns AbstractPolicy objects based on the specified search criteria. You can specify the maximum number of abstract policy objects to return.For example, if the value 5 is specified, then this method returns up to 5 abstract policies.

If the maxResults value is an extremely large number, an exception may occur. Different databases have different limitations. For example, 50000000 is a limitation for the MySQL database.

Parameters:
filter - A AbstractPolicySearchFilter object that defines the search criteria.
maxResults - An integer that specifies the maximum number of objects to return.
Returns:
An array of AbstractPolicy objects that match the search criteria. If there are no abstract policies that match the search criteria, then this method returns only one element which is null.
Throws:
SDKException - if any of the following conditions occur:
  • A parameter you provided is not valid.
  • The operation was not permitted.
  • An error occurred while communicating with the Rights Management service.
See Also:
PolicySearchFilter

createPolicyFromAbstractPolicy

java.lang.String createPolicyFromAbstractPolicy(java.lang.String policySetNameOfNewPolicy,
                                                java.lang.String newPolicyName,
                                                java.lang.String policySetNameOfExistingPolicy,
                                                java.lang.String abstractPolicyName,
                                                java.util.List principals)
                                                throws SDKException
Create a policy from an existing abstract policy

Parameters:
policySetNameOfNewPolicy - The name of the new policy set that contains the policy
newPolicyName - The name of the new policy
policySetNameOfExistingPolicy - The name of the policy set that contains the abstract policy
abstractPolicyName - The name of the abstract policy
principals - The users and/or groups for the policy
Returns:
policy id of the newly created policy.
Throws:
SDKException - if an error occurred while communicating with the Rights Management service