com.adobe.livecycle.rightsmanagement.client.infomodel
Interface AbstractPolicyEntry


public interface AbstractPolicyEntry

The AbstractPolicyEntry interface defines the set of permissions to provide in the Abstract policy. The actual principals are specified while creating the real policies from the Abstract Policies. Abstract policy entries are added to policies to define how principals can use policy-protected documents.

Policy entries must specify at least one permission. You can also specify the validity period for the policy entry. For information about defining policy entries using the Document Security Java API, see the Creating a new abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms.

See Also:
AbstractPolicy, AbstractPolicyManager.createPolicyFromAbstractPolicy(String, String, String, String, java.util.List)

Method Summary
 void addPermission(Permission perm)
          Adds the specified permission to the AbstractPolicyEntry object.
 void clearPermissions()
          Removes all permissions from the AbstractPolicyEntry object.
 void clearValidityPeriod()
          Removes the validity period for this AbstractPolicyEntry object.
 java.util.List getPermissions()
          Retrieves the list of permissions that the abstract policy entry defines.
 ValidityPeriod getValidityPeriod()
          Retrieves the validity period set for the abstract policy entry.
 void removePermission(Permission perm)
          Removes the specified permission from the AbstractPolicyEntry object.
 void setValidityPeriod(ValidityPeriod pdrlValidityPeriod)
          Sets the validity period for this AbstractPolicyEntry object.
 

Method Detail

getPermissions

java.util.List getPermissions()
Retrieves the list of permissions that the abstract policy entry defines.

Returns:
A java.util.List object that contains Permission objects that represent the permissions of this abstract policy entry.

getValidityPeriod

ValidityPeriod getValidityPeriod()
Retrieves the validity period set for the abstract policy entry.

Returns:
A ValidityPeriod object that represents the validity period for this abstract policy entry or null if no validity period is set.
See Also:
AbstractPolicyEntry.setValidityPeriod(com.adobe.livecycle.rightsmanagement.client.infomodel.ValidityPeriod)

addPermission

void addPermission(Permission perm)
                   throws PDRLException
Adds the specified permission to the AbstractPolicyEntry object. You can use this method to add only one permission related to printing and one permission related to making changes to the document. You cannot add any other types of permissions. To see this method used in a code example, see the Creating a new abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms.

Parameters:
perm - A Permission object that represents the permission to add.
Throws:
PDRLException - If an error occurs during this operation.

removePermission

void removePermission(Permission perm)
                      throws PDRLException
Removes the specified permission from the AbstractPolicyEntry object.

Parameters:
perm - A Permission object that represents the permission to remove.
Throws:
PDRLException - If an error occurred during this operation.

clearPermissions

void clearPermissions()
Removes all permissions from the AbstractPolicyEntry object.


setValidityPeriod

void setValidityPeriod(ValidityPeriod pdrlValidityPeriod)
                       throws PDRLException
Sets the validity period for this AbstractPolicyEntry object. The validity period defines a period of time when the permissions that the permission entry defines are granted. The associated principal cannot open documents at a time that is outside the validity period. If no validity period is set, then the permissions are always valid. To see this method used in a code example, see the Creating a new abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms .

Parameters:
pdrlValidityPeriod - A ValidityPeriod object that represents the validity period or null if no validity period is set.
Throws:
PDRLException - If an error occurred during this operation.

clearValidityPeriod

void clearValidityPeriod()
Removes the validity period for this AbstractPolicyEntry object.