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


public interface PolicyEntry

The PolicyEntry interface defines the set of permissions to provide a specified principal. Policy entries are added to policies to define how principals can use policy-protected documents.

Policy entries must specify a principal and 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 policy using the Java API quick start in Programming with Adobe Experience Manager Forms.

See Also:
com.adobe.livecycle.rightsmanagement.client.infomodel.Policy#Policy

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

Method Detail

getPermissions

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

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

getPrincipal

Principal getPrincipal()
Retrieves the principal for which the policy entry defines permissions.

Returns:
The Principal object for this entry or null if no principal is defined.
See Also:
PolicyEntry.setPrincipal(com.adobe.idp.um.api.infomodel.Principal)

getValidityPeriod

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

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

addPermission

void addPermission(Permission perm)
                   throws PDRLException
Adds the specified permission to the PolicyEntry 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 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 PolicyEntry 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 PolicyEntry object.


setPrincipal

void setPrincipal(Principal principal)
                  throws PDRLException
Sets the principal for which this PolicyEntry object defines permissions. If a policy includes policy permissions for an anonymous principal, any person can open the policy-secured documents without being authenticated. Also, the permissions assigned to the anonymous principal override the permissions that are assigned to other principals of the policy. To see this method used in a code example, see the Creating a new policy using the Java API quick start in Programming with Adobe Experience Manager Forms.

Parameters:
principal - A Principal object that represents the principal.
Throws:
PDRLException - If an error occurs during this operation.

clearPrincipal

void clearPrincipal()
Removes the principal from this PolicyEntry object.


setValidityPeriod

void setValidityPeriod(ValidityPeriod pdrlValidityPeriod)
                       throws PDRLException
Sets the validity period for this PolicyEntry 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 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 PolicyEntry object.