com.adobe.livecycle.readerextensions.client
Class ReaderExtensionsServiceClient

java.lang.Object
  extended by com.adobe.livecycle.readerextensions.client.ReaderExtensionsServiceClient

public class ReaderExtensionsServiceClient
extends java.lang.Object

Enables the creation of a Java object that invokes operations that belong to the Reader Extensions service. Using this object, you can perform tasks such as adding usage rights to PDF documents. Usage rights pertain to functionality that is available by default in Acrobat but not in Adobe Reader, such as the ability to add comments to a document or fill in forms and save the document. Documents that have usage rights added are called rights-enabled documents. A user who opens a rights-enabled PDF document in Adobe Reader can perform the operations that are enabled for that document.


Constructor Summary
ReaderExtensionsServiceClient(ServiceClientFactory factory)
          A constructor that creates a ReaderExtensionsClient object.
 
Method Summary
 Document applyUsageRights(Document inDocument, java.lang.String credentialAlias, java.lang.String credentialPassword, ReaderExtensionsOptionSpec options)
          Applies usage rights to a PDF document.
 GetUsageRightsResult getCredentialUsageRights(java.lang.String credentialAlias, java.lang.String credentialPassword)
          Returns information about the credential that is specified by credentialAlias.
 GetUsageRightsResult getDocumentUsageRights(Document inDocument)
          Returns information about the rights-enabled PDF document.
 Document removeUsageRights(Document inDocument)
          Removes usage rights from the specified PDF document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderExtensionsServiceClient

public ReaderExtensionsServiceClient(ServiceClientFactory factory)
A constructor that creates a ReaderExtensionsClient object.

Parameters:
factory - A ServiceClientFactory object that contains connection properties. For information, see Invoking Adobe Experience Manager forms Services.
Method Detail

applyUsageRights

public Document applyUsageRights(Document inDocument,
                                 java.lang.String credentialAlias,
                                 java.lang.String credentialPassword,
                                 ReaderExtensionsOptionSpec options)
                          throws com.adobe.idp.dsc.DSCException,
                                 ReaderExtensionsException
Applies usage rights to a PDF document.

Parameters:
inDocument - The PDF document to which usage rights are applied.
credentialAlias - The alias of the credential that grants usage rights.
credentialPassword - The password of the credential if the credential is encrypted. If the credential is not encrypted, the password may be specified with null.
options - Run-time options to use while applying usage rights to the PDF document.
Returns:
A com.adobe.idp.Document object that represents a rights-enabled PDF document.
Throws:
ReaderExtensionsException - If an error occurs while applying usage rights to the PDF document.
com.adobe.idp.dsc.DSCException

removeUsageRights

public Document removeUsageRights(Document inDocument)
                           throws com.adobe.idp.dsc.DSCException,
                                  ReaderExtensionsException
Removes usage rights from the specified PDF document.

Parameters:
inDocument - The PDF document from which usage rights are removed.
Returns:
A com.adobe.idp.Document object that represents the PDF document from which usage rights were removed.
Throws:
ReaderExtensionsException - If an error occurs while removing usage rights from the PDF document.
com.adobe.idp.dsc.DSCException

getDocumentUsageRights

public GetUsageRightsResult getDocumentUsageRights(Document inDocument)
                                            throws com.adobe.idp.dsc.DSCException,
                                                   ReaderExtensionsException
Returns information about the rights-enabled PDF document.

Parameters:
inDocument - A com.adobe.idp.Document object that represents the PDF document from which to retrieve information.
Returns:
A UsageRightsInfo object that contains information about the rights-enabled PDF document. Null is returned if rights have not been applied to the PDF document.
Throws:
ReaderExtensionsException - If an error occurs while getting information about the rights-enabled PDF document.
com.adobe.idp.dsc.DSCException

getCredentialUsageRights

public GetUsageRightsResult getCredentialUsageRights(java.lang.String credentialAlias,
                                                     java.lang.String credentialPassword)
                                              throws com.adobe.idp.dsc.DSCException,
                                                     ReaderExtensionsException
Returns information about the credential that is specified by credentialAlias.

Parameters:
credentialAlias - The alias of the credential that grants usage rights.
credentialPassword - The password of the credential if the credential is encrypted. If the credential is not encrypted, the password may be specified with null.
Returns:
A UsageRightsInfo object that contains information about the rights-enabled PDF document.
Throws:
ReaderExtensionsException - If an error occurs while getting information about the credential.
com.adobe.idp.dsc.DSCException