|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AbstractPolicy
The Abstract Policies can also have one or more of the following optional properties defined: The changes made to For information about creating new abstract policies 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.
AbstractPolicy
interface provides methods for creating and manipulating abstract policies.
AbstractPolicy
contains all the information that a Policy
contains
but the actual principals are not specified in the AbstracPolicy. These objects are used to create the actual
Policy
objects.
While creating the actual policies from the AbstractPolicy, one needs to specify the actual principals
whom one wants to give the permission to.
AbstractPolicies must have the following properties defined:
Abstract policy entries
name
that uniquely identifies the Abstract policy
description
validity period
watermark
tracked flag
offline lease period
encrypt attachments only
flagplaintext metadata
flagalternate identification
for the policyAbstractPolicy
objects do not
affect the actual policies that are generated from the Abstract Policies.
To implement new AbstractPolicy
objects that you create, you use AbstractPolicyManager to register the abstract policies.
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
addAbstractPolicyEntry(AbstractPolicyEntry abstractPolicyEntry)
Adds an abstract policy entry that defines the set of permissions to the abstract policy.
void
clearAbstractPolicyEntries()
Removes all abstract policy entries from the abstract policy.
void
clearValidityPeriod()
Removes the validity period from an abstract policy.
java.util.List
getAbstractPolicyEntries()
Retrieves the abstract policy entries for the abstract policy.
java.util.Map
getAbstractPolicyProperties()
Retrieves all the properties defined in the abstract policy.
java.lang.String
getAccessDeniedErrorMessage()
Retrieves access denied error message defined in the abstract policy.
java.lang.String
getAlternateId()
Retrieves the alternate identification of the abstract policy.
java.util.Date
getCreationTime()
Retrieves the date that the abstract policy was first registered with the Rights Management service.
java.lang.String
getDescription()
Retrieves the description of the abstract policy.
java.lang.String
getEncryptionAlgorithmAndKeySize()
Retrieves encrpytion algorithm and key size defined in the abstract policy.
java.lang.String
getId()
Retrieves the identification value of the abstract policy.
int
getInstanceVersion()
Retrieves the instance version of the abstract policy.
java.util.Date
getLastModifiedTime()
Retrieves the date that the abstract policy was last modified.
java.lang.String
getName()
Retrieves the name of the abstract policy.
int
getOfflineLeasePeriod()
Retrieves the offline lease period.
User
getOwner()
Retrieves the owner of the policy.
java.lang.String
getPolicySetName()
Retrieves the name of the policy set that contains this abstract policy.
java.lang.String
getSchemaVersion()
Retrieves the version of the PDRL schema used to define the abstract policy.
java.lang.String
getType()
Retrieves the type of the policy.
ValidityPeriod
getValidityPeriod()
Retrieves the validity period of the abstract policy.
java.lang.String
getWatermarkId()
Retrieves the identification of the watermark used with this abstract policy.
boolean
isCertificateAuthenticationAllowed()
Retrieves the boolean which specifies if certificate authentication is allowed for the abstract policy.
boolean
isDeleted()
Retrieves whether the abstract 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 abstract policy.
boolean
isKerberosAuthenticationAllowed()
Retrieves the boolean which specifies if kerberos based authentication is allowed for the abstract policy.
boolean
isOverrideAuthenticationSettings()
Retrieves the authentication settings override flag for the abstract policy.
boolean
isPlaintextMetadata()
Retrieves whether the metadata of documents that are protected with the policy created from this abstract policy is encrypted.
boolean
isThirdPartyAuthenticationAllowed()
Retrieves the boolean which specifies if third party authentication is allowed for the abstract policy.
boolean
isTracked()
Retrieves whether the Rights Management service logs events that involve this abstract policy.
boolean
isUsernamePwdAuthenticationAllowed()
Retrieves the boolean which specifies if username password authentication is allowed for the abstract policy.
void
removeAbstractPolicyEntry(AbstractPolicyEntry abstractPolicyEntry)
Removes an abstract policy entry from the abstract policy.
void
setAbstractPolicyProperties(java.util.Map newProps)
Set the new properties for the abstract policy.
void
setAccessDeniedErrorMessage(java.lang.String accessDeniedErrorMessage)
Set the new access denied error message for the abstract policy.
void
setAlternateId(java.lang.String alternateId)
Sets the unique alternate identification for the abstract policy.
void
setCertificateAuthenticationAllowed(boolean certificateAuthenticationAllowed)
Set the certificate flag for the abstract policy.
void
setDescription(java.lang.String abstractPolicyDescription)
Sets the description of the abstract 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 abstract policy.
void
setExtendedUsageTrackingEnabled(boolean extendedUsageTrackingEnabled)
Set the extended usage tracking flag for the abstract policy.
void
setKerberosAuthenticationAllowed(boolean kerberosAuthenticationAllowed)
Set the kerberos flag for the abstract policy.
void
setName(java.lang.String name)
Sets the unique name for the abstract policy.
void
setOfflineLeasePeriod(int days)
Sets the length of time after which users synchronize with the Rights Management service
that documents protected with the policy created from this abstract policy can be opened offline.
void
setOverrideAuthenticationSettings(boolean b)
Sets the authentication settings override flag for the abstract 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 the policy created from this abstract policy.
void
setPolicySetName(java.lang.String policySetName)
Sets the name of the policy set that contains this abstract policy.
void
setThirdPartyAuthenticationAllowed(boolean thirdPartyAuthenticationAllowed)
Set the third party authentication flag for the abstract policy.
void
setTracked(boolean tracked)
Specifies whether to log events regarding user actions on documents protected with policy created from this abstract policy.
void
setUsernamePwdAuthenticationAllowed(boolean usernamePwdAuthenticationAllowed)
Set the username password authentication flag for the abstract policy.
void
setValidityPeriod(ValidityPeriod validityPeriod)
Sets the validity period of the abstract policy.
void
setWatermarkId(java.lang.String id)
Sets the watermark to use with the abstract policy.
byte[]
toXml()
Retrieves an XML representation of the abstract policy.
Field Detail
USER_POLICY
static final java.lang.String USER_POLICY
ORGANIZATIONAL_POLICY
static final java.lang.String ORGANIZATIONAL_POLICY
ENCRYPTION_TYPE_AES256
static final java.lang.String ENCRYPTION_TYPE_AES256
ENCRYPTION_TYPE_AES128
static final java.lang.String ENCRYPTION_TYPE_AES128
ENCRYPTION_TYPE_NONE
static final java.lang.String ENCRYPTION_TYPE_NONE
Method Detail
setName
void setName(java.lang.String name)
throws PDRLException
name
- A java.lang.String
that holds the name for the abstract 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 abstract 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 abstract 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 abstract policy.void setDescription(java.lang.String abstractPolicyDescription) throws PDRLException
abstractPolicyDescription
- A java.lang.String
that holds the description of the abstract 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 abstract policy and
null if no description is set.java.lang.String getType()
java.lang.String
that holds the abstract policy type. The policy type for an abstract policy can be only ORGANIZATIONAL.
AbstractPolicy.ORGANIZATIONAL_POLICY
AbstractPolicy.ORGANIZATIONAL_POLICY
ValidityPeriod getValidityPeriod()
ValidityPeriod
object that represents the validity period of the abstract 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 abstract policy using the Java API quick start in Programming with Adobe Experience Manager Forms.
validityPeriod
- A ValidityPeriod
object for the abstract 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.
java.util.List getAbstractPolicyEntries()
java.util.List
object that contains
AbstractPolicyEntry
objects that represent the abstract policy entries associated with the abstract policy.AbstractPolicyEntry
void addAbstractPolicyEntry(AbstractPolicyEntry abstractPolicyEntry) throws PDRLException
abstractPolicyEntry
- A AbstractPolicyEntry
object to add to the policy.
PDRLException
- If an error occurs during this operation.AbstractPolicyEntry
void removeAbstractPolicyEntry(AbstractPolicyEntry abstractPolicyEntry) throws PDRLException
abstractPolicyEntry
- The AbstractPolicyEntry
object that represents the abstract policy entry to remove from the abstract policy.
PDRLException
- If an error occurs during this operation.AbstractPolicyEntry
void clearAbstractPolicyEntries()
AbstractPolicyEntry
boolean isTracked()
true
if events are logged and false
if events are not logged.AbstractPolicy.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 abstract 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 abstract 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.AbstractPolicy.setPlaintextMetadata(boolean)
boolean isEncryptAttachmentsOnly()
true
if only attachments are encrypted and false
if both the
document content and the attachments are encrypted.AbstractPolicy.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 an abstract policy is initially registered
with the Rights Management service. You cannot change this setting for abstract 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 abstract policy is set to encrypt
only document attachments.
PDRLException
- if plaintextMetadata
is true
and the
abstract 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 an abstract 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 abstract policy must be set to encrypt
document metadata.
PDRLException
- if encryptAttachmentsOnly
is true and the
abstract policy is not set to encrypt document metadata.java.util.Date getCreationTime()
java.util.Date
object that contains the date the abstract policy was created.java.util.Date getLastModifiedTime()
java.util.Date
object that contains the date the abstract policy was last modified.java.lang.String getId()
java.lang.String
that specifies the identification value of the abstract policy and null
if this
abstract policy
object represents an
abstract 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
PDRLException
policy
int getInstanceVersion()
boolean isDeleted()
true
if the abstract policy is deleted and false
if the abstract policy is active.deleteAbstractPolicy
java.lang.String getAlternateId()
java.lang.String
that holds the alternate identification of the abstract policy and
null if no alternate
identification was set.AbstractPolicy.setAlternateId(String)
void setAlternateId(java.lang.String alternateId) throws PDRLException
alternateId
- A java.lang.String
that holds the alternate identification of the abstract 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.PolicyManager
java.util.Map getAbstractPolicyProperties()
java.util.Map
of name/value pairs.void setAbstractPolicyProperties(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.
PDRLException
java.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 abstract policyboolean isKerberosAuthenticationAllowed()
boolean
.void setKerberosAuthenticationAllowed(boolean kerberosAuthenticationAllowed)
kerberosAuthenticationAllowed
- boolean which specifies if we want to allow kerberos based authentication for the abstract policyboolean isCertificateAuthenticationAllowed()
boolean
.void setCertificateAuthenticationAllowed(boolean certificateAuthenticationAllowed)
certificateAuthenticationAllowed
- boolean which specifies if we want to allow certificate authentication for the abstract policyboolean isUsernamePwdAuthenticationAllowed()
boolean
.void setUsernamePwdAuthenticationAllowed(boolean usernamePwdAuthenticationAllowed)
usernamePwdAuthenticationAllowed
- boolean which specifies if we want to allow username password authentication for the abstract policyboolean isExtendedUsageTrackingEnabled()
boolean
.void setExtendedUsageTrackingEnabled(boolean extendedUsageTrackingEnabled)
extendedUsageTrackingEnabled
- boolean which specifies if we want to allow extended usage tracking for the abstract policy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |