com.adobe.livecycle.rightsmanagement.client
Interface RightsManagementEncryptionService


public interface RightsManagementEncryptionService

RightsManagementEncryptionService interface provides methods to protect, unprotect, and inspect documents. Before using the interface, copy all jar files from AEM_SDK_Location\client-libs\thirdparty and following jar files from AEM_SDK_Location\client-libs\common folder to the library folder of the project: adobe-usermanager-client.jar, adobe-rightsmanagement- client.jar, adobe-livecycle-client.jar, aglj40.jar, pdfcore.jar, pdfencryption.jar, pdfservices.jar, pdfservices_extraction.jar, rideau.jar, xmpcore.jar, adobe-xfa-3.6.0.jar


Method Summary
 InspectDocResult inspectDocument(java.io.InputStream inDoc)
          Inspects the document on the client side and sets values of ServerUrl and isProtected under InspectDocResult Bean works for both pdf and office docs
 InspectDocResult inspectPDFDocument(java.io.InputStream inDoc)
          Inspects the pdf document on the client side and sets values of ServerUrl and isProtected under InspectDocResult Bean
 java.io.InputStream protectDocument(java.io.InputStream inDoc, PublishLicenseDTO license)
          Protects the document on the client side, works for both pdf and office docs
 java.io.InputStream protectDocumentWithCoverPage(java.io.InputStream inDoc, java.io.InputStream coverDocument, java.lang.String documentName, PublishLicenseDTO license)
          Creates a page 0 document.
 java.io.InputStream protectPDFDocument(java.io.InputStream inPDFDoc, PublishLicenseDTO license)
          Protects the pdf document on the client side.
 java.io.InputStream unprotectDocument(java.io.InputStream inDoc)
          Unprotects the document on the client side, works for both pdf and office docs
 java.io.InputStream unprotectPDFDocument(java.io.InputStream inPDFDoc)
          Unprotects the pdf document on the client side.
 

Method Detail

protectPDFDocument

java.io.InputStream protectPDFDocument(java.io.InputStream inPDFDoc,
                                       PublishLicenseDTO license)
                                       throws SDKException
Protects the pdf document on the client side.

Parameters:
inPDFDoc - InputStream of document that needs to be protected, closing this stream is caller's responsibility
license - a com.adobe.edc.common.dto.PublishLicenseDTO that contains license information required for protection
Returns:
an InputStream that contains the reference to the protected pdf, the InputStream current pointer will be reset, closing this stream is caller's responsibility
Throws:
SDKException

protectDocumentWithCoverPage

java.io.InputStream protectDocumentWithCoverPage(java.io.InputStream inDoc,
                                                 java.io.InputStream coverDocument,
                                                 java.lang.String documentName,
                                                 PublishLicenseDTO license)
                                                 throws SDKException
Creates a page 0 document. It protects the input document and uses the protected input document and cover document to create a page 0 document. Works for both pdf and office docs

Parameters:
inDoc - InputStream of document. The input document should not be encrypted, the InputStream current pointer will be reset, closing this stream is caller's responsibility
coverDocument - InputStream of Cover document. This document should not be encrypted, the InputStream current pointer will be reset, closing this stream is caller's responsibility
documentName - that contains the name of the document. This value can have a maximum length of 255 single-byte characters.
license - a com.adobe.edc.common.dto.PublishLicenseDTO that contains license information required for protection
Returns:
an InputStream that contains the reference to the page0 document, closing this stream is caller's responsibility
Throws:
SDKException

unprotectPDFDocument

java.io.InputStream unprotectPDFDocument(java.io.InputStream inPDFDoc)
                                         throws SDKException
Unprotects the pdf document on the client side.

Parameters:
inPDFDoc - InputStream of document that needs to be unprotected, closing this stream is caller's responsibility
Returns:
an InputStream that contains the reference to the unProtected pdf, the InputStream current pointer will be reset, closing this stream is caller's responsibility
Throws:
SDKException

inspectPDFDocument

InspectDocResult inspectPDFDocument(java.io.InputStream inDoc)
                                    throws SDKException
Inspects the pdf document on the client side and sets values of ServerUrl and isProtected under InspectDocResult Bean

Parameters:
inDoc - InputStream of document that needs to be inspected, the InputStream current pointer will be reset, closing this stream is caller's responsibility
Returns:
an InspectDocResult containing isProtected is set to true if file file is protected else false serverUrl is set to APS server which was used to protect this file, null in case its not an APS protected file
Throws:
SDKException

protectDocument

java.io.InputStream protectDocument(java.io.InputStream inDoc,
                                    PublishLicenseDTO license)
                                    throws SDKException
Protects the document on the client side, works for both pdf and office docs

Parameters:
inDoc - InputStream of document that needs to be protected, closing this stream is caller's responsibility
license - a com.adobe.edc.common.dto.PublishLicenseDTO that contains license information required for protection
Returns:
an InputStream that contains the reference to the protected document, the InputStream current pointer will be reset, closing this stream is caller's responsibility
Throws:
SDKException

unprotectDocument

java.io.InputStream unprotectDocument(java.io.InputStream inDoc)
                                      throws SDKException
Unprotects the document on the client side, works for both pdf and office docs

Parameters:
inDoc - InputStream of document that needs to be unprotected, closing this stream is caller's responsibility
Returns:
an InputStream that contains the reference to the unprotected document, the InputStream current pointer will be reset, closing this stream is caller's responsibility
Throws:
SDKException

inspectDocument

InspectDocResult inspectDocument(java.io.InputStream inDoc)
                                 throws SDKException
Inspects the document on the client side and sets values of ServerUrl and isProtected under InspectDocResult Bean works for both pdf and office docs

Parameters:
inDoc - InputStream of document that needs to be inspected, the InputStream current pointer will be reset, closing this stream is caller's responsibility
Returns:
an InspectDocResult containing isProtected is set to true if file file is protected else false serverUrl is set to server which was used to protect this file, null in case its not a protected file
Throws:
SDKException