|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Policy
The Policy interface provides methods for creating and manipulating policies.
Policy objects are
implemented as XML documents according to the XML schema that the PDRL defines.
Policies must have the following properties defined:
policy entriesname that uniquely identifies the policyPolicies can also have one or more of the following optional properties defined:
descriptionvalidity periodwatermarktracked flagoffline lease periodencrypt attachments only flagplaintext metadata flagalternate identification for the policyThe changes made to Policy objects do not
immediately affect the actual policies that they
represent. To implement the changes, you must use PolicyManager to update the policies. To implement
new Policy objects that you create, you use PolicyManager to register the policies.
The policy creator will often want to add a policy entry for the Publisher principal. Adding this principal provides permissions for the user that secures documents with this policy.
For information about creating new policies 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.
| Field Summary | |
|---|---|
static java.lang.String |
ENCRYPTION_TYPE_AES128
Represents the AES encryption algorithm with a 128-bit key. |
static java.lang.String |
ENCRYPTION_TYPE_AES256
Represents the AES encryption algorithm with a 256-bit key. |
static java.lang.String |
ENCRYPTION_TYPE_NONE
Represents no encryption. |
static java.lang.String |
ORGANIZATIONAL_POLICY
Represents the Organizational policy type. |
static java.lang.String |
USER_POLICY
The constant that represents the User policy type. |
| Method Summary | |
|---|---|
void |
addPolicyEntry(PolicyEntry policyEntry)
Adds a policy entry that defines the set of permissions to the policy. |
void |
clearPolicyEntries()
Removes all policy entries from the policy. |
void |
clearValidityPeriod()
Removes the validity period from a policy. |
java.lang.String |
getAccessDeniedErrorMessage()
Retrieves access denied error message defined in the policy. |
java.lang.String |
getAlternateId()
Retrieves the alternate identification of the policy. |
java.util.Date |
getCreationTime()
Retrieves the date that the policy was first registered with the Rights Management service. |
java.lang.String |
getDescription()
Retrieves the description of the policy. |
java.lang.String |
getEncryptionAlgorithmAndKeySize()
Retrieves encrpytion algorithm and key size defined in the policy. |
java.lang.String |
getId()
Retrieves the identification value of the policy. |
int |
getInstanceVersion()
Retrieves the instance version of the policy. |
java.util.Date |
getLastModifiedTime()
Retrieves the date that the policy was last modified. |
java.lang.String |
getName()
Retrieves the name of the policy. |
int |
getOfflineLeasePeriod()
Retrieves the offline lease period. |
User |
getOwner()
Retrieves the owner of the policy. |
java.util.List |
getPolicyEntries()
Retrieves the policy entries for the policy. |
java.util.Map |
getPolicyProperties()
Retrieves all the properties defined in the policy. |
java.lang.String |
getPolicySetName()
Retrieves the name of the policy set that contains this policy. |
java.lang.String |
getSchemaVersion()
Retrieves the version of the PDRL schema used to define the policy. |
java.lang.String |
getType()
Retrieves the type of the policy. |
ValidityPeriod |
getValidityPeriod()
Retrieves the validity period of the policy. |
java.lang.String |
getWatermarkId()
Retrieves the identification of the watermark used with this policy. |
boolean |
isCertificateAuthenticationAllowed()
Retrieves the boolean which specifies if certificate authentication is allowed for the policy. |
boolean |
isDeleted()
Retrieves whether the policy is active or deleted. |
boolean |
isEncryptAttachmentsOnly()
Retrieves whether only document attachments should be encrypted or both the document content and the attachment should be encrypted. |
boolean |
isExtendedUsageTrackingEnabled()
Retrieves the boolean which specifies if extended usage tracking is allowed for the policy. |
boolean |
isKerberosAuthenticationAllowed()
Retrieves the boolean which specifies if kerberos based authentication is allowed for the policy. |
boolean |
isOverrideAuthenticationSettings()
Retrieves the authentication settings override flag for the policy. |
boolean |
isPlaintextMetadata()
Retrieves whether the metadata of documents that are protected with this policy is encrypted. |
boolean |
isThirdPartyAuthenticationAllowed()
Retrieves the boolean which specifies if third party authentication is allowed for the policy. |
boolean |
isTracked()
Retrieves whether the Rights Management service logs events that involve this policy. |
boolean |
isUsernamePwdAuthenticationAllowed()
Retrieves the boolean which specifies if username password authentication is allowed for the policy. |
void |
removePolicyEntry(PolicyEntry policyEntry)
Removes a policy entry from the policy. |
void |
setAccessDeniedErrorMessage(java.lang.String accessDeniedErrorMessage)
Set the new access denied error message for the policy. |
void |
setAlternateId(java.lang.String alternateId)
Sets the unique alternate identification for the policy. |
void |
setCertificateAuthenticationAllowed(boolean certificateAuthenticationAllowed)
Set the certificate flag for the policy. |
void |
setDescription(java.lang.String policyDescription)
Sets the description of the policy. |
void |
setEncryptAttachmentsOnly(boolean encryptAttachmentsOnly)
Specifies whether only document attachments should be encrypted or both the document content and the attachment should be encrypted. |
void |
setEncryptionAlgorithmAndKeySize(java.lang.String encrpytionAlgorithm)
Set the new encrpytion algorithm and key size for the policy. |
void |
setExtendedUsageTrackingEnabled(boolean extendedUsageTrackingEnabled)
Set the extended usage tracking flag for the policy. |
void |
setKerberosAuthenticationAllowed(boolean kerberosAuthenticationAllowed)
Set the kerberos flag for the policy. |
void |
setName(java.lang.String name)
Sets the name of the policy. |
void |
setOfflineLeasePeriod(int days)
Sets the length of time after users synchronize with the Rights Management service that documents protected with this policy can be opened offline. |
void |
setOverrideAuthenticationSettings(boolean b)
Sets the authentication settings override flag for the policy, Setting this to true, will enable all authentication types. |
void |
setPlaintextMetadata(boolean plaintextMetadata)
Specifies whether document metadata is encrypted when the document is protected with this policy. |
void |
setPolicyProperties(java.util.Map newProps)
Set the new properties for the policy. |
void |
setPolicySetName(java.lang.String policySetName)
Sets the name of the policy set that contains this policy. |
void |
setThirdPartyAuthenticationAllowed(boolean thirdPartyAuthenticationAllowed)
Set the third party authentication flag for the policy. |
void |
setTracked(boolean tracked)
Specifies whether to log events regarding user actions on documents protected with this policy. |
void |
setUsernamePwdAuthenticationAllowed(boolean usernamePwdAuthenticationAllowed)
Set the username password flag for the policy. |
void |
setValidityPeriod(ValidityPeriod validityPeriod)
Sets the validity period of the policy. |
void |
setWatermarkId(java.lang.String id)
Sets the watermark to use with the policy. |
byte[] |
toXml()
Retrieves an XML representation of the policy. |
| Field Detail |
|---|
static final java.lang.String USER_POLICY
static final java.lang.String ORGANIZATIONAL_POLICY
static final java.lang.String ENCRYPTION_TYPE_AES256
static final java.lang.String ENCRYPTION_TYPE_AES128
static final java.lang.String ENCRYPTION_TYPE_NONE
| Method Detail |
|---|
void setName(java.lang.String name)
throws PDRLException
The current user is determined by the user name and password that was used to to log into the Rights Management service. 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.
name - A java.lang.String that holds the name to set for the policy.
The maximum length of the java.lang.String you can use is 50 characters or errors can occur.
PDRLException - if the specified name is longer than 50 characters.java.lang.String getName()
java.lang.String that holds the name of the policy.
void setPolicySetName(java.lang.String policySetName)
throws PDRLException
policySetName - A java.lang.String value that specifies
the name of the policy set to used by this policy.
The maximum length of the String value is 50 characters or errors occur.
PDRLException - If the specified name is longer than 50 characters.java.lang.String getPolicySetName()
java.lang.String that holds the name of the policy set that contains this policy.
void setDescription(java.lang.String policyDescription)
throws PDRLException
policyDescription - A java.lang.String that holds the description of the policy.
The maximum length of the java.lang.String you can use is 250 characters.
PDRLException - if the specified description is longer than 250 characters.java.lang.String getDescription()
java.lang.String that holds the description of the policy and
null if no description is set.java.lang.String getType()
java.lang.String that holds the policy type, which can be either
Policy.ORGANIZATIONAL_POLICY or Policy.USER_POLICY.Policy.ORGANIZATIONAL_POLICY,
Policy.USER_POLICYValidityPeriod getValidityPeriod()
ValidityPeriod object that represents the validity period of the policy.
void setValidityPeriod(ValidityPeriod validityPeriod)
throws PDRLException
The validity period is an optional property. 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.
validityPeriod - A ValidityPeriod object for the policy
and null to specify no validity period.
PDRLException - If an error occurred during this operation.void clearValidityPeriod()
setValidityPeriod(null) method to remove the validity period.
PolicyEntryjava.util.List getPolicyEntries()
java.util.List object that contains
PolicyEntry objects that represent the policy entries associated with the policy.PolicyEntry
void addPolicyEntry(PolicyEntry policyEntry)
throws PDRLException
policyEntry - A PolicyEntry object to add to the policy.
PDRLException - If an error occurs during this operation.PolicyEntry
void removePolicyEntry(PolicyEntry policyEntry)
throws PDRLException
policyEntry - The PolicyEntry object that represents the policy entry to remove from the policy.
PDRLException - If an error occurs during this operation.PolicyEntryvoid clearPolicyEntries()
PolicyEntryboolean isTracked()
true if events are logged and false if events are not logged.Policy.setTracked(boolean)int getOfflineLeasePeriod()
0 if this policy does not permit access to the document while offline.java.lang.String getWatermarkId()
java.lang.String that holds the unique identifier for the watermark and null if no watermark is used.void setTracked(boolean tracked)
tracked - The value true specifies that the user's
actions are logged and false means that a user's actions are not logged.
The default value is true.
void setOfflineLeasePeriod(int days)
throws PDRLException
The policy permissions must be configured to allow offline use of documents. 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.
days - An integer value for the length of the offline lease (in days).
days can be any value greater than zero and less than 10000, and null to use the
default offline lease period.
The default offline lease period is set using Adobe Experience Manager Forms administrator web pages.
PDRLException - If an error occurs during this operation.
void setWatermarkId(java.lang.String id)
throws PDRLException
id - A java.lang.String that contains the watermark identification
or null if no watermark is used.
PDRLException - If an error occurs during this operation.Watermark.getId()boolean isPlaintextMetadata()
true if metadata is not encrypted and false if the metadata is encyrpted.Policy.setPlaintextMetadata(boolean)boolean isEncryptAttachmentsOnly()
true if only attachments are encrypted and false if both the
document content and the attachments are encrypted.Policy.setEncryptAttachmentsOnly(boolean)
void setPlaintextMetadata(boolean plaintextMetadata)
throws PDRLException
NoEncryption for the encryption setting, then this method does not perform an action.
setPlaintextMetadata can be set only when a policy is initially registered
with the Rights Management service. You cannot change this setting for policies that are already registered.
plaintextMetadata - true if document metadata should not be encrypted and
false if metadata should be encrypted. plaintextMetadata is false by default.
plaintextMetadata must be false if the policy is set to encrypt
only document attachments.
PDRLException - if plaintextMetadata is true and the
policy is set to encrypt only document attachments.setEncryptAttachmentsOnly
void setEncryptAttachmentsOnly(boolean encryptAttachmentsOnly)
throws PDRLException
NoEncryption for the encryption setting, then this method does not perform an action.
setEncryptedAttachmentsOnly can be set only when a policy is initially registered
with the Rights Mangement service. You cannot change this setting for policies that are already registered.
encryptAttachmentsOnly - true to specify that only the attachment should be encrypted
and false if both the document and the attachment should be encrypted. The default value is false.
If encryptAttachmentsOnly is true, then the policy must be set to encrypt
document metadata.
PDRLException - if encryptAttachmentsOnly is true and the
policy is not set to encrypt document metadata.java.util.Date getCreationTime()
java.util.Date object that contains the date the policy was created.java.util.Date getLastModifiedTime()
java.util.Date object that contains the date the policy was last modified.java.lang.String getId()
java.lang.String that specifies the identification value of the policy and null if this
Policy object represents a
policy not yet registered with the Rights Management service.java.lang.String getSchemaVersion()
java.lang.String that holds the version of the PDRL schema.
byte[] toXml()
throws PDRLException
PDRLExceptionInfomodelObjectFactory.createPolicy()int getInstanceVersion()
boolean isDeleted()
true if the policy is deleted and false if the policy is active.deletePolicyjava.lang.String getAlternateId()
java.lang.String that holds the alternate identification of the policy and
null if no alternate
identification was set.Policy.setAlternateId(String)
void setAlternateId(java.lang.String alternateId)
throws PDRLException
alternateId - A java.lang.String that holds the alternate identification of the policy.
The maximum length of the java.lang.String you can use is 255 characters.
No two policies can use the same alternate identification.
PDRLException - if alternateId is longer than 255 characters.User getOwner()
null if a policy is contained in a policy set, and
returns a valid User object if the policy is contained in My Policies.PolicyManagerjava.util.Map getPolicyProperties()
java.util.Map of name/value pairs.void setPolicyProperties(java.util.Map newProps)
newProps - Each value in the java.util.Map must be either a string or an array of strings.java.lang.String getEncryptionAlgorithmAndKeySize()
java.lang.String.
void setEncryptionAlgorithmAndKeySize(java.lang.String encrpytionAlgorithm)
throws PDRLException
encrpytionAlgorithm - A string contains the new encrpytion algorithm and key size.
PDRLExceptionjava.lang.String getAccessDeniedErrorMessage()
java.lang.String.void setAccessDeniedErrorMessage(java.lang.String accessDeniedErrorMessage)
accessDeniedErrorMessage - A string contains the new access denied error message.void setOverrideAuthenticationSettings(boolean b)
b - boolean which specifies if we want to override the authentication settings in the policyboolean isOverrideAuthenticationSettings()
boolean.boolean isThirdPartyAuthenticationAllowed()
boolean.void setThirdPartyAuthenticationAllowed(boolean thirdPartyAuthenticationAllowed)
thirdPartyAuthenticationAllowed - boolean which specifies if we want to allow third party authentication for the policyboolean isKerberosAuthenticationAllowed()
boolean.void setKerberosAuthenticationAllowed(boolean kerberosAuthenticationAllowed)
kerberosAuthenticationAllowed - boolean which specifies if we want to allow kerberos based authentication for the policyboolean isCertificateAuthenticationAllowed()
boolean.void setCertificateAuthenticationAllowed(boolean certificateAuthenticationAllowed)
certificateAuthenticationAllowed - boolean which specifies if we want to allow certificate authentication for the policyboolean isUsernamePwdAuthenticationAllowed()
boolean.void setUsernamePwdAuthenticationAllowed(boolean usernamePwdAuthenticationAllowed)
usernamePwdAuthenticationAllowed - boolean which specifies if we want to allow username password authentication for the policyboolean isExtendedUsageTrackingEnabled()
boolean.void setExtendedUsageTrackingEnabled(boolean extendedUsageTrackingEnabled)
extendedUsageTrackingEnabled - boolean which specifies if we want to allow extended usage tracking for the policy
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||