com.adobe.livecycle.encryption.client
Class PasswordEncryptionOptionSpec

java.lang.Object
  extended by com.adobe.livecycle.encryption.client.BasePasswordEncryptionSpec
      extended by com.adobe.livecycle.encryption.client.PasswordEncryptionOptionSpec
All Implemented Interfaces:
java.io.Serializable

public class PasswordEncryptionOptionSpec
extends BasePasswordEncryptionSpec
implements java.io.Serializable

Specifies encryption preferences for password protecting a PDF document using the Encryption service. Using this object, you can specify values such as the open password and the permission password. In addition, you can also set permission values, such as the ability to copy form data from a PDF document. An object of this type is passed to the EncryptionServiceClient object's encryptPDFUsingPassword() method.

To see an object of this type used in a code example, see the Encrypting a PDF document using the Java API quick start in Programming with Adobe Experience Manager forms.

See Also:
Serialized Form

Constructor Summary
PasswordEncryptionOptionSpec()
          The default constructor used to create a PasswordEncryptionSpec object.
PasswordEncryptionOptionSpec(PasswordEncryptionCompatability compat, PasswordEncryptionOption encryptOption, java.lang.String documentOpenPassword, java.lang.String permissionsPassword)
          Constructs a PasswordEncryptionSpec object that is used to encrypt a PDF document with a password.
 
Method Summary
 PasswordEncryptionCompatability getCompatability()
          Specifies the earliest version of Acrobat with which the encryption will be compatible.
 PasswordEncryptionOption getEncryptOption()
          Gets the PDF document resources to encrypt as a PasswordEncryptionOption enumeration value.
 void setCompatability(PasswordEncryptionCompatability compat)
          Sets the version compatibility to use when encrypting a PDF document with a password.
 void setEncryptOption(PasswordEncryptionOption options)
          Sets the PDF document resources to encrypt using a PasswordEncryptionOption enumeration value.
 
Methods inherited from class com.adobe.livecycle.encryption.client.BasePasswordEncryptionSpec
getDocumentOpenPassword, getPermissionPassword, getPermissionsRequested, setDocumentOpenPassword, setPermissionPassword, setPermissionsRequested
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordEncryptionOptionSpec

public PasswordEncryptionOptionSpec()
The default constructor used to create a PasswordEncryptionSpec object.


PasswordEncryptionOptionSpec

public PasswordEncryptionOptionSpec(PasswordEncryptionCompatability compat,
                                    PasswordEncryptionOption encryptOption,
                                    java.lang.String documentOpenPassword,
                                    java.lang.String permissionsPassword)
Constructs a PasswordEncryptionSpec object that is used to encrypt a PDF document with a password.

Parameters:
compat - Specifies the version compatibility as a PasswordEncryptionCompatability and must be one of the following values:
  • ACRO_3
  • ACRO_5
  • ACRO_6
  • ACRO_7
  • ACRO_9
The value ACRO_3 provides 40-bit encryption. The others provide 128-bit encryption. Also, ACRO_5 and higher provide a finer granularity of control over what operations are permitted. Specifying ACRO_7 or ACRO_9 encrypts the document using the Advanced Encryption Standard (AES). This parameter value can be set to null, in which case the Encryption service uses a default value of ACRO_7 as lowest version of Acrobat with which to open the encrypted document.
encryptOption - Specifies the PDF document resources to encrypt and must be one of the following values:
  • ALL
  • ALL_EXCEPT_METADATA
  • ATTACHMENTS_ONLY
The value ALL_EXCEPT_METADATA encrypts all PDF document resources except for its metadata. The value ATTACHMENTS_ONLY only encypts the PDF document attachments. If you encrypt only an attachment, then a user is prompted for a password when they attempt to open the file attachment.
documentOpenPassword - The password value that is required to open a password-encrypted PDF document.
permissionsPassword - The password value that is required to modify permissions on the document or remove encryption.
Method Detail

setCompatability

public void setCompatability(PasswordEncryptionCompatability compat)
Sets the version compatibility to use when encrypting a PDF document with a password. To see this method used in a code example, see the Encrypting a PDF document using the Java API quick start in Programming with Adobe Experience Manager forms.

Parameters:
compat - Specifies version compatibility as a PasswordEncryptionCompatability value:
  • ACRO_3
  • ACRO_5
  • ACRO_6
  • ACRO_7
  • ACRO_9
The value ACRO_3 provides 40-bit encryption. The others provide 128-bit encryption. Also, ACRO_5 and higher provide a finer granularity of control over what operations are permitted. Specifying ACRO_7 or ACRO_9 encrypts the document using the Advanced Encryption Standard (AES).

getCompatability

public PasswordEncryptionCompatability getCompatability()
Specifies the earliest version of Acrobat with which the encryption will be compatible.

Returns:
The version compatibility is a PasswordEncryptionCompatability value:
  • ACRO_3
  • ACRO_5
  • ACRO_6
  • ACRO_7
ACRO_3 provides 40-bit encryption. The others provide 128-bit encryption. Also, ACRO_5 and higher provide a finer granularity of control over what operations are permitted. Specifying ACRO_7 encrypts the document using the Advanced Encryption Standard (AES).

setEncryptOption

public void setEncryptOption(PasswordEncryptionOption options)
Sets the PDF document resources to encrypt using a PasswordEncryptionOption enumeration value. To see this method used in a code example, see the Encrypting a PDF document using the Java API quick start in Programming with Adobe Experience Manager forms.

Parameters:
options - One of the following values:
  • ALL
  • ALL_EXCEPT_METADATA
  • ATTACHMENTS_ONLY
The value ALL encrypts the entire PDF document, including its attachments and metadata. The value ALL_EXCEPT_METADATA encrypts all PDF document resources except for its metadata. The value ATTACHMENTS_ONLY only encypts the PDF document attachments. If you encrypt only an attachment, then a user is prompted for a password when they attempt to open the file attachment.

getEncryptOption

public PasswordEncryptionOption getEncryptOption()
Gets the PDF document resources to encrypt as a PasswordEncryptionOption enumeration value.

Returns:
One of the following values:
  • ALL
  • ALL_EXCEPT_METADATA
  • ATTACHMENTS_ONLY

The value ALL encrypts the entire PDF document, including its attachments and metadata. The value ALL_EXCEPT_METADATA encrypts all PDF document resources except for its metadata. The value ATTACHMENTS_ONLY only encypts the PDF document attachments. If you encrypt only an attachment, then a user is prompted for a password when they attempt to open the file attachment.