|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentManager
The DocumentManager
interface provides methods for manipulating the policy security of documents.
You can use DocumentManager
to secure documents with policies,
remove security from documents secured with policies,
and to obtain the licenses for policy-secured documents.
To see an instance of this type used in a code example, see the Applying a policy to a PDF document using the Java API quick start in Programming with Adobe Experience Manager Forms.
Method Summary | |
---|---|
Document |
applyPolicy(Document inPDFDoc,
java.lang.String documentName,
java.lang.String policySetName,
java.lang.String policyName,
java.lang.String pubDomain,
java.lang.String pubUsername)
Deprecated. use protectDocument |
void |
associateUserWithLicenseAndPolicy(java.lang.String domain,
java.lang.String userId,
java.lang.String licenseId,
java.lang.String policyId)
Associates the user specified with the domain and userid with the supplied licenseId and policyId |
PublishLicenseDTO |
createLicense(java.lang.String policyId,
java.lang.String documentName,
boolean logSecureDocEvent)
Creates a publish license for the given policy using a system/internal user but the said user wont be able to open the protected document. |
PublishLicenseDTO |
createLicense(java.lang.String policyId,
java.lang.String publishUserId,
java.lang.String publishUserDomain)
Creates a publish license for the specified user and policy combination |
PublishLicenseDTO |
createLicense(java.lang.String policyId,
java.lang.String publishUserName,
java.lang.String publishUserDomain,
java.lang.String documentName,
boolean logSecureDocEvent)
Creates a publish license for the specified user and policy combination. |
PublishLicenseDTO |
createLicense(java.lang.String policyId,
java.lang.String publishUserName,
java.lang.String publishUserDomain,
java.lang.String documentName,
boolean logSecureDocEvent,
java.lang.String issuingAuthorityBase)
Creates a publish license for the specified user and policy combination. |
Document |
extractProtectedDocument(Document inPDFDoc)
Extracts the protected document which is an attachment in the document with cover page. |
java.lang.String |
getLicenseId(Document inPDFDoc)
Retrieves the license identifier value for the specified secure document. |
PublishLicenseDTO |
getPublishLicenseForUser(java.lang.String domain,
java.lang.String userId)
Fetches the com.adobe.edc.common.dto.PublishLicenseDTO that contains the information
required for protecting a document |
RMInspectResult |
inspectDocument(Document inDoc)
Retrieves the license information and other details for the specified protected document. |
RMSecureDocumentResult |
protectDocument(Document inDoc,
PublishLicenseDTO publishLicense)
Secures a given PDF or Office document with the specified license. |
RMSecureDocumentResult |
protectDocument(Document inDoc,
java.lang.String documentName,
java.lang.String policySetName,
java.lang.String policyName,
RMLocale locale,
boolean bExactMatchForNames)
This API should be used in cases where we intend to secure a given PDF or Office document with a specified policy using a system/internal user but the said user wont be able to open the protected document Unlike other protectDocument API we don't provide Domain and Username parameters here. |
RMSecureDocumentResult |
protectDocument(Document inPDFDoc,
java.lang.String documentName,
java.lang.String policySetName,
java.lang.String policyName,
java.lang.String pubDomain,
java.lang.String pubUsername,
RMLocale locale)
Secures a given PDF or Office document with the specified policy. |
RMSecureDocumentResult |
protectDocument(Document inPDFDoc,
java.lang.String documentName,
java.lang.String policySetName,
java.lang.String policyName,
java.lang.String pubDomain,
java.lang.String pubUsername,
RMLocale locale,
boolean bExactMatchForNames)
Secures a given PDF or Office document with the specified policy. |
RMSecureDocumentResult |
protectDocumentWithCoverPage(Document inDoc,
java.lang.String documentName,
java.lang.String policySetName,
java.lang.String policyName,
Document coverDoc,
boolean bExactMatchForNames)
Secures a given PDF or Office Document with the specified policy, and returns a document with a cover page and the protected document as an attachment. |
RMSecureDocumentResult |
protectDocumentWithCoverPage(Document inDoc,
java.lang.String documentName,
java.lang.String policySetName,
java.lang.String policyName,
java.lang.String pubDomain,
java.lang.String pubUsername,
Document coverDoc,
boolean bExactMatchForNames)
Secures a given PDF or Office Document with the specified policy, and returns a document with a cover page and the protected document as an attachment. |
Document |
removeSecurity(Document inPDFDoc)
Removes the security from a policy-protected document provided that a super administrator is used in connection settings. |
Document |
unlockPDF(Document inPDFDoc)
Unlocks a policy-protected document. |
Method Detail |
---|
java.lang.String getLicenseId(Document inPDFDoc) throws SDKException
inPDFDoc
- A com.adobe.idp.Document
object that represents the policy-protected document from which to extract the license.
This value must represent a document that was secured using the Rights Management service.
java.lang.String
identifier for the com.adobe.livecycle.rightsmanagement.client.infomodel.License
object associated with the specified document.
Note: Document publishers can dynamically change policies for documents that they have published.
Use the LicenseManager.getLicense(String)
method
to retrieve the License
object from the server.
SDKException
- if any of the following conditions occur:
RMInspectResult inspectDocument(Document inDoc) throws SDKException
inDoc
- A com.adobe.idp.Document
object that represents the policy-protected document from which to extract the license.
This value must represent a PDF or MS-Office file that was secured using the Rights Management service.
com.adobe.livecycle.rightsmanagement.RMInspectResult
object associated with the specified document.
SDKException
- if any of the following conditions occur:
Document applyPolicy(Document inPDFDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubDomain, java.lang.String pubUsername) throws SDKException
pubDomain
and pubUsername
parameters must either be a valid domain name and valid username,
or both must be null. If you invoke this method with only one of the two being null, you will cause an exception.
Also, an invalid or blank domain name, or an invalid or blank username will also cause an exception.
To see this method used in a code example, see the Applying a policy to a PDF document using the Java API quick start in Programming with Adobe Experience Manager Forms.
inPDFDoc
- A Document
object that represents the PDF document to secure with the policy.documentName
- A java.lang.String
that contains the name of the document. This value
can have a maximum length of 255 single-byte characters.policySetName
- A java.lang.String
that specifies the policy set to use to secure the document.
If this parameter value is null, then the My Policies
policy set is used.policyName
- A java.lang.String
that specifies the name of the policy to use to secure the document.pubDomain
- A java.lang.String
that represents the name of the User Manager domain of the user who is the publisher of the document. This parameter value is optional.pubUsername
- A java.lang.String
that represents the canonical name of the User Manager user who is the publisher of the document. This parameter value is optional.
Document
object that represents the policy-protected PDF document.
SDKException
- if any of the following conditions occur:
DocumentManager
RMSecureDocumentResult protectDocument(Document inPDFDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubDomain, java.lang.String pubUsername, RMLocale locale) throws SDKException
pubDomain
and pubUsername
parameters must either be a valid domain name and valid username,
or both must be null. If you invoke this method with only one of the two being null, you will cause an exception.
Also, an invalid or blank domain name, or an invalid or blank username will also cause an exception.
To see this method used in a code example that secures a PDF document, see the Applying a policy to a PDF document using the Java API quick start in Programming with Adobe Experience Manager Forms.
To see this method used in a code example that secures a Word document, see the Applying a policy to a Word document using the Java API quick start in Programming with Adobe Experience Manager Forms.
inPDFDoc
- A Document
object that represents the PDF or MS Office document to secure with the policy.documentName
- A java.lang.String
that contains the name of the document. This value
can have a maximum length of 255 single-byte characters.policySetName
- A java.lang.String
that specifies the policy set to use to secure the document.
If this parameter value is null, then the My Policies
policy set is used.policyName
- A java.lang.String
that specifies the name of the policy to use to secure the document.pubDomain
- A java.lang.String
that represents the name of the User Manager domain of the user who is the publisher of the document. This parameter value is optional.
If this parameter is set, then the pubUsername
parameter must be set. Otherwise, both of these parameters can be null.pubUsername
- A java.lang.String
that represents the canonical name of the User Manager user who is the publisher of the document. This parameter value is optional.
If this parameter is set, then the pubDomain
parameter must be set. Otherwise, both of these parameters can be null.locale
- A com.adobe.livecycle.rightsmanagement.Locale
that represents the locale to be used for selecting the MS Office template. This parameter value is optional and not used for PDF documents.
com.adobe.livecycle.rightsmanagement.RMSecureDocumentResult
object that represents the policy-protected document and other meta data.
SDKException
- if any of the following conditions occur:
DocumentManager
RMSecureDocumentResult protectDocument(Document inPDFDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubDomain, java.lang.String pubUsername, RMLocale locale, boolean bExactMatchForNames) throws SDKException
pubDomain
and pubUsername
parameters must either be a valid domain name and valid username,
or both must be null. If you invoke this method with only one of the two being null, you will cause an exception.
Also, an invalid or blank domain name, or an invalid or blank username will also cause an exception.
To see this method used in a code example that secures a PDF document, see the Applying a policy to a PDF document using the Java API quick start in Programming with Adobe Experience Manager Forms.
To see this method used in a code example that secures a Word document, see the Applying a policy to a Word document using the Java API quick start in Programming with Adobe Experience Manager Forms.
inPDFDoc
- A Document
object that represents the PDF or MS Office document to secure with the policy.documentName
- A java.lang.String
that contains the name of the document. This value
can have a maximum length of 255 single-byte characters.policySetName
- A java.lang.String
that specifies the policy set to use to secure the document.
If this parameter value is null, then the My Policies
policy set is used.policyName
- A java.lang.String
that specifies the name of the policy to use to secure the document.pubDomain
- A java.lang.String
that represents the name of the User Manager domain of the user who is the publisher of the document. This parameter value is optional.
If this parameter is set, then the pubUsername
parameter must be set. Otherwise, both of these parameters can be null.pubUsername
- A java.lang.String
that represents the canonical name of the User Manager user who is the publisher of the document. This parameter value is optional.
If this parameter is set, then the pubDomain
parameter must be set. Otherwise, both of these parameters can be null.locale
- A com.adobe.livecycle.rightsmanagement.Locale
that represents the locale to be used for selecting the MS Office template. This parameter value is optional and not used for PDF documents.bExactMatchForNames
- A java.lang.Boolean
that tells if exact name should be used while searching the policy. The default is false. It is recommended to use true for better performance.
com.adobe.livecycle.rightsmanagement.RMSecureDocumentResult
object that represents the policy-protected document and other meta data.
SDKException
- if any of the following conditions occur:
DocumentManager
RMSecureDocumentResult protectDocument(Document inDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, RMLocale locale, boolean bExactMatchForNames) throws SDKException
inDoc
- A Document
object that represents the PDF or MS Office document to secure with the policy.documentName
- A java.lang.String
that contains the name of the document. This value
can have a maximum length of 255 single-byte characters.policySetName
- A java.lang.String
that specifies the policy set to use to secure the document.
If this parameter value is null, then the My Policies
policy set is used.policyName
- A java.lang.String
that specifies the name of the policy to use to secure the document.locale
- A com.adobe.livecycle.rightsmanagement.Locale
that represents the locale to be used for selecting the MS Office template. This parameter value is optional and not used for PDF documents.bExactMatchForNames
- A java.lang.Boolean
that tells if exact name should be used while searching the policy. The default is false. It is recommended to use true for better performance
com.adobe.livecycle.rightsmanagement.RMSecureDocumentResult
object that represents the policy-protected document and other meta data.
SDKException
- if any of the following conditions occur:
DocumentManager
RMSecureDocumentResult protectDocumentWithCoverPage(Document inDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubDomain, java.lang.String pubUsername, Document coverDoc, boolean bExactMatchForNames) throws SDKException
pubDomain
and pubUsername
parameters must either be a valid domain name and valid username,
or both must be null. If you invoke this method with only one of the two being null, you will cause an exception.
Also, an invalid or blank domain name, or an invalid or blank username will also cause an exception.
inDoc
- A Document
object that represents the PDF or Office document to secure with the policy.documentName
- A java.lang.String
that contains the name of the document. This value
can have a maximum length of 255 single-byte characters.policySetName
- A java.lang.String
that specifies the policy set to use to secure the document.
If this parameter value is null, then the My Policies
policy set is used.policyName
- A java.lang.String
that specifies the name of the policy to use to secure the document.pubDomain
- A java.lang.String
that represents the name of the User Manager domain of the user who is the publisher of the document. This parameter value is optional.
If this parameter is set, then the pubUsername
parameter must be set. Otherwise, both of these parameters can be null.pubUsername
- A java.lang.String
that represents the canonical name of the User Manager user who is the publisher of the document. This parameter value is optional.
If this parameter is set, then the pubDomain
parameter must be set. Otherwise, both of these parameters can be null.coverDoc
- A Document
object that represents the cover document which will hold the protected document as an attachment, can be null for office docs only (as stated above)bExactMatchForNames
- A java.lang.Boolean
that tells if exact name should be used while searching the policy. The default is false. It is recommended to use true for better performance.
com.adobe.livecycle.rightsmanagement.RMSecureDocumentResult
object that represents the policy-protected document with the cover page and other meta data.
SDKException
- if any of the following conditions occur:
DocumentManager
RMSecureDocumentResult protectDocumentWithCoverPage(Document inDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, Document coverDoc, boolean bExactMatchForNames) throws SDKException
inDoc
- A Document
object that represents the PDF or Office document to secure with the policy.documentName
- A java.lang.String
that contains the name of the document. This value
can have a maximum length of 255 single-byte characters.policySetName
- A java.lang.String
that specifies the policy set to use to secure the document.
If this parameter value is null, then the My Policies
policy set is used.policyName
- A java.lang.String
that specifies the name of the policy to use to secure the document.coverDoc
- A Document
object that represents the cover document which will hold the protected document as an attachment, can be null for office docs only (as stated above)bExactMatchForNames
- A java.lang.Boolean
that tells if exact name should be used while searching the policy. The default is false. It is recommended to use true for better performance
com.adobe.livecycle.rightsmanagement.RMSecureDocumentResult
object that represents the policy-protected document with the cover page and other meta data.
SDKException
- if any of the following conditions occur:
DocumentManager
Document removeSecurity(Document inPDFDoc) throws SDKException
SWITCH_POLICY
permission in order for this method to remove the security from a PDF document.
Also, the user specified in the Adobe Experience Manager Forms connection settings must also have that permission.
Otherwise, an exception is thrown.
A user cannot open an unsecured PDF document until the returned document
is written to a PDF or DOC file.
To see this method used in a code example that removes a policy from a PDF document, see the Removing a policy from a PDF document using the Java API quick start in Programming with Adobe Experience Manager Forms.
To see this method used in a code example that removes a policy from a Word document, see the Removing a policy from a Word document using the Java API quick start in Programming with Adobe Experience Manager Forms.
inPDFDoc
- A Document
object that represents the policy-protected document.
Document
object that represents an unsecured document.
SDKException
- if any of the following conditions occur:
Document unlockPDF(Document inPDFDoc) throws SDKException
inPDFDoc
- A Document
object that represents the policy-protected PDF document.
Document
object that represents the resulting unlocked document.
SDKException
- if any of the following conditions occur:
Document extractProtectedDocument(Document inPDFDoc) throws SDKException
inPDFDoc
- A Document
object that represents the cover PDF document holding the protected document as an attachment.
Document
object that represents the protected document.
SDKException
- if any of the following conditions occur:
RMSecureDocumentResult protectDocument(Document inDoc, PublishLicenseDTO publishLicense) throws SDKException
inDoc
- A Document
object that represents the PDF or MS Office document to secure with the policy.publishLicense
- a com.adobe.edc.common.dto.PublishLicenseDTO
that contains the information
required for protecting the document.
com.adobe.livecycle.rightsmanagement.RMSecureDocumentResult
object that represents the policy-protected document and other meta data.
SDKException
- if any of the following conditions occur:
PublishLicenseDTO createLicense(java.lang.String policyId, java.lang.String publishUserId, java.lang.String publishUserDomain) throws SDKException
policyId
- The policy id for which the license needs to be createdpublishUserId
- user id of the publisherpublishUserDomain
- domain name for the publisher
com.adobe.edc.common.dto.PublishLicenseDTO
that contains the information
required for protecting a document
SDKException
- if any of the following conditions occur:
#protectDocument(com.adobe.idp.Document, com.adobe.edc.common.dto.PublishLicenseDTO)
PublishLicenseDTO createLicense(java.lang.String policyId, java.lang.String publishUserName, java.lang.String publishUserDomain, java.lang.String documentName, boolean logSecureDocEvent) throws SDKException
policyId
- The policy id for which the license needs to be createdpublishUserId
- user id of the publisherpublishUserDomain
- domain name for the publisherdocumentName
- name of the document for which license is createdlogSecureDocEvent
- true if the secure new document event needs to be logged, false otherwise.
com.adobe.edc.common.dto.PublishLicenseDTO
that contains the information
required for protecting a document
SDKException
- if any of the following conditions occur:
#protectDocument(com.adobe.idp.Document, com.adobe.edc.common.dto.PublishLicenseDTO)
PublishLicenseDTO createLicense(java.lang.String policyId, java.lang.String documentName, boolean logSecureDocEvent) throws SDKException
policyId
- The policy id for which the license needs to be createddocumentName
- name of the document for which license is createdlogSecureDocEvent
- true if the secure new document event needs to be logged, false otherwise.
com.adobe.edc.common.dto.PublishLicenseDTO
that contains the information
required for protecting a document
SDKException
- if any of the following conditions occur:
#protectDocument(com.adobe.idp.Document, com.adobe.edc.common.dto.PublishLicenseDTO)
PublishLicenseDTO createLicense(java.lang.String policyId, java.lang.String publishUserName, java.lang.String publishUserDomain, java.lang.String documentName, boolean logSecureDocEvent, java.lang.String issuingAuthorityBase) throws SDKException
policyId
- policy id for which the license needs to be createdpublishUserId
- user id for the publisherpublishUserDomain
- domain name for the publisherdocumentName
- name of the document for which the license is createdlogSecureDocEvent
- true, if the secure new document event needs to be logged; otherwise, false.issuingAuthorityBase
- base URL to contact while opening the document
com.adobe.edc.common.dto.PublishLicenseDTO
that contains the information
required for protecting a document
SDKException
- if any of the following conditions occur:
#protectDocument(com.adobe.idp.Document, com.adobe.edc.common.dto.PublishLicenseDTO)
void associateUserWithLicenseAndPolicy(java.lang.String domain, java.lang.String userId, java.lang.String licenseId, java.lang.String policyId) throws SDKException
domain
- name of the domain for the user for whom the license needs to be createduserId
- user id of the user for whom the license needs to be createdlicenseId
- license id for the license which needs to be associated with the userpolicyId
- policy id for the policy which needs to be associated with the user
SDKException
- if any of the following conditions occur:
PublishLicenseDTO getPublishLicenseForUser(java.lang.String domain, java.lang.String userId) throws SDKException
com.adobe.edc.common.dto.PublishLicenseDTO
that contains the information
required for protecting a document
domain
- domain name for the user for whom we want to fetch the license and policy informationuserId
- user id for the user for whom we want to fetch the license and policy information
SDKException
- if any of the following conditions occur:
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |