com.adobe.livecycle.rightsmanagement
Interface RightsManagementServiceInterface


public interface RightsManagementServiceInterface

This interface list of all methods that needs to be implemented by RightsManagementService for policy, license, watermark etc creation, deletion, updation, document protect/un-protect, inspect, revoking it and many other functionalities related to Document Security.


Method Summary
 Document applyPolicy(Document inPDFDoc, java.lang.String documentName, java.lang.String policyId, java.lang.String pubUsername, java.lang.String pubDomain)
           
 Document applyPolicy(Document inPDFDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubUsername, java.lang.String pubDomain)
          Deprecated.  
 void associateUserWithLicenseAndPolicy(java.lang.String domain, java.lang.String userId, java.lang.String licenseId, java.lang.String policyId)
           
 void changeLicensePolicy(java.lang.String licenseId, java.lang.String newPolicyId)
           
 void changeLicensePolicy(java.lang.String licenseId, java.lang.String newPolicySetName, java.lang.String newPolicyName)
          Switches the policy for the specified license.
 void changePolicyOwner(java.lang.String policyName, PrincipalReference existingOwner, PrincipalReference newOwner)
          Changes the owner of the policy.
 PublishLicenseDTO createLicense(java.lang.String policyId, java.lang.String publishUserName, java.lang.String publishUserDomain)
           
 PublishLicenseDTO createLicense(java.lang.String policyId, java.lang.String publishUserName, java.lang.String publishUserDomain, java.lang.String documentName, boolean logEvent)
          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 logEvent, java.lang.String issuingAuthorityBase)
          Creates a publish license for the specified user and policy combination.
 java.lang.String createPolicyFromAbstractPolicy(java.lang.String policySetNameOfNewPolicy, java.lang.String newPolicyName, java.lang.String policySetForAbstractPolicy, java.lang.String abstractPolicyName, java.util.List principals)
          Create a policy from an existing abstract policy
 java.lang.String createPolicyFromExistingPolicy(java.lang.String policySetNameOfNewPolicy, java.lang.String newPolicyName, java.lang.String policySetNameOfExistingPolicy, java.lang.String existingPolicyName, int offlineLeasePeriod, java.util.Date startingDate, java.util.Date expirationDate, IUserlist principalsToAdd, java.util.List permissions, IUserlist principalsToRemove, java.lang.String watermarkName)
          Create a policy from an existing policy with a chance to update the validity period, add or remove principals, set permissions, and add or update the watermark.
 java.lang.String createPolicyFromTemplate(java.lang.String newPolicySetName, java.lang.String newPolicyName, java.lang.String policySetName, java.lang.String policyName, int offlineLeasePeriod, java.util.List principalsToAdd, java.util.List principalsToRemove, java.lang.String watermarkName)
          Deprecated.  
 java.lang.String createPolicySet(PolicySetSpec psSpec)
          This method creates a PolicySet, Creating a lot of PolicySets will have adverse performance effects.
 void deleteAbstractPolicy(java.lang.String policyId)
          Deletes the policy specified by policyId.
 void deleteAbstractPolicy(java.lang.String policySetName, java.lang.String policyName)
          Deletes the policy specified by policySetName/policyName.
 int deleteEvents(EventSpec event)
           
 void deleteMyPolicy(java.lang.String policyName, java.lang.String ownerUsername, java.lang.String ownerDomain)
          Deletes the policy specified by policyName/policyOwnerUsername/ownerDomain.
 void deletePolicy(java.lang.String policyId)
          Deletes the policy specified by policyId.
 void deletePolicy(java.lang.String policySetName, java.lang.String policyName)
          Deletes the policy specified by policySetName/policyName.
 java.util.HashMap deletePolicySets(java.util.List policySetIds)
          This method deletes all policySets whose ids have been set as argument
 void deleteWatermark(java.lang.String watermarkId)
          Deletes the specified watermark so that it can no longer be added to policies.
 void exportEvents(EventSpec event, java.lang.String filePrefix, int maxRecordsPerFile, EventExportFileFormat fileFormat)
           
 Document extractProtectedDocument(Document inPDFDoc)
          Extracts and returns the protected document from the document with cover page.
 java.util.List getAbstractPolicies(AbstractPolicySearchFilterSpec filter, int maxResults)
          Returns all policies of the specified type up to maxResults.
 AbstractPolicySpec getAbstractPolicy(java.lang.String policyId)
          Retrieves the policy specified by the policyId from the server.
 AbstractPolicySpec getAbstractPolicy(java.lang.String policySetName, java.lang.String policyName)
          Registers the provided policy with the server.
 java.util.List getAllDomainNames()
           
 java.util.List getAllPolicySetNames()
           
 java.util.List getAllWatermarkNames()
           
 java.util.List getCustomPermissions()
           
 java.lang.String getDocumentKeyToRemoveSecurity(java.lang.String licenseId)
           
 java.lang.String getDocumentKeyToRemoveSecurity(java.lang.String licenseId, boolean logEvent)
          returns the document key if you have the POLICY_SWITCH permission.
 LicenseSpec getLicense(java.lang.String licenseId)
          returns the License object for the specified licenseId
 LicenseSpec getLicenseByAlternateId(java.lang.String alternateId)
          Returns the license associated with the provided alternateId
 java.lang.String getLicenseID(Document inPDFDoc)
          Returns the License ID held within a Policy protected document
 java.util.List getLicenses(LicenseSearchFilterSpec filter, int maxResults)
          Returns all licenses to maxResults.
 PolicySpec getMyPolicy(java.lang.String policyName, java.lang.String ownerUsername, java.lang.String ownerDomain)
          Retrieves the policy specified by the policyName/policyOwnerUsername/ownerDomain from the server.
 int getNumberOfSearchedEvents(EventSpec event)
           
 java.util.List getPolicies(PolicySearchFilterSpec filter, int maxResults)
          Returns all policies of the specified type up to maxResults.
 PolicySpec getPolicy(java.lang.String policyId)
          Retrieves the policy specified by the policyId from the server.
 PolicySpec getPolicy(java.lang.String policySetName, java.lang.String policyName)
          Registers the provided policy with the server.
 PolicySpec getPolicyByAlternateId(java.lang.String alternateId)
          Returns the policy for the specified alternateId.
 java.util.List getPolicyNames(java.lang.String policySetName)
           
 PolicySetSpec getPolicySet(java.lang.String policySetId, boolean fetchPolicies)
          This method returns PolicySet details for the provided policySetId and if fetchPolicies is set to true, it bring details of all policies under it.
 java.lang.String getPolicySetIdByPolicySetName(java.lang.String policySetName)
          This method get the PolicySetId corresponding to the PolicySetName
 PublishLicenseDTO getPublishLicenseForUser(java.lang.String domain, java.lang.String userId)
           
 WatermarkSpec getWatermark(java.lang.String watermarkId)
          Returns the watermark for the specified watermarkId
 WatermarkSpec2 getWatermark2(java.lang.String watermarkId)
          Returns the watermark for the specified watermarkId
 WatermarkSpec getWatermarkByName(java.lang.String watermarkName)
          Returns the watermark for the specified name
 WatermarkSpec2 getWatermarkByName2(java.lang.String watermarkName)
          Returns the watermark for the specified name
 RMInspectResult inspectDocument(Document inPDFDoc)
           
 java.util.List inviteExternalUsers(java.util.List emails)
          Sends invitation emails to a list of external users to register with the Policy server
 RMSecureDocumentResult protectDocument(Document inDoc, PublishLicenseDTO publishLicense)
           
 RMSecureDocumentResult protectDocument(Document inDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubUsername, java.lang.String pubDomain, RMLocale locale)
           
 RMSecureDocumentResult protectDocument(Document inDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubUsername, java.lang.String pubDomain, RMLocale locale, boolean bNamesExactMatch)
           
 RMSecureDocumentResult protectDocumentWithCoverPage(Document inDoc, java.lang.String documentName, java.lang.String policySetName, java.lang.String policyName, java.lang.String pubUsername, java.lang.String pubDomain, Document coverDoc, boolean bNamesExactMatch)
          Secures a given PDF with the specified policy, and returns a document with a cover page and the protected document as an attachment.
 java.lang.String registerAbstractPolicy(AbstractPolicySpec policy)
          Registers the provided abstract policy with the server.
 java.lang.String registerAbstractPolicy(AbstractPolicySpec policy, java.lang.String policySetName)
          Registers the abstract provided policy with the server.
 java.lang.String registerPolicy(PolicySpec policy)
          Registers the provided policy with the server.
 java.lang.String registerPolicy(PolicySpec policy, java.lang.String policySetName)
          Registers the provided policy with the server.
 java.lang.String registerWatermark(WatermarkSpec watermark)
          Registers the specified watermark with the server, allowing it to be used in policies.
 java.lang.String registerWatermark2(WatermarkSpec2 watermark)
          Registers the specified watermark with the server, allowing it to be used in policies.
 Document removePolicySecurity(Document inPDFDoc)
          Returns a new Document that has security removed given a policy protected document as input.
 boolean resetExternalUserPassword(User user, java.lang.String pwd)
           
 void revokeDocument(Document document, Reason reason, java.lang.String revocationURL)
          Revokes the specified document, making the document it secures inaccessible
 void revokeLicense(java.lang.String licenseId, Reason reason, java.lang.String revocationURL)
          Revokes the specified license, making the document it secures inaccessible
 java.util.List searchForEvents(EventSpec event, int maxResults)
           
 void setLicenseAlternateId(java.lang.String licenseId, java.lang.String alternateId)
          Associates an alternate id (such as a customer invoice number) with the license
 java.util.Map switchPolicy(java.util.List licenseIds, java.lang.String policyId)
           
 java.util.Map switchPolicy(java.util.List licenseIds, java.lang.String policySetName, java.lang.String policyName)
           
 void switchPolicy(java.lang.String licenseId, java.lang.String policyId)
           
 void switchPolicy(java.lang.String licenseId, java.lang.String policySetName, java.lang.String policyName)
           
 Document unlockPDFUsingPolicy(Document inPDFDoc)
          Returns a new unlocked PDF given a policy protected document as input.
 void unrevokeDocument(Document document)
          Returns the state of the document to not revoked.
 void unrevokeLicense(java.lang.String licenseId)
          Returns the state of the license to not revoked.
 void updateAbstractPolicy(AbstractPolicySpec updatedPolicy)
          Updates an existing policy.
 void updateCoordinatorPermission(java.lang.String policySetId, java.lang.String userId, java.util.ArrayList perms)
          This method helps update Coordinator's (userId) Permissions (perms) for a given policySetId
 void updatePolicy(PolicySpec updatedPolicy)
          Updates an existing policy.
 void updatePolicy(java.lang.String policySetName, java.lang.String policyName, int offlineLeasePeriod, IUserlist principalsToAdd, IUserlist principalsToRemove, java.lang.String watermarkName)
          Updates an existing policy.
 void updatePolicySetCoordinators(java.lang.String policysetId, java.util.ArrayList userIdAndPermsList, boolean add)
          This method helps add/remove Coordinators on a given policySet
 void updatePolicySetInfo(java.lang.String name, java.lang.String desc, java.lang.String policySetId)
          This method updates the information for the given PolicySetId
 void updatePolicySetPublishers(java.lang.String policysetId, java.util.ArrayList userIds, boolean add)
          This method helps add/remove Publishers on a given policySet
 void updatePolicySetVisibleUsersGroups(java.lang.String policysetId, java.util.ArrayList userIds, boolean add)
          This method helps add/remove VisibleUsersGroups on a given policySet
 void updateRevocationURL(Document document, java.lang.String newURL)
          Updates the revocation URL for an already-revoked license
 void updateRevocationURL(java.lang.String licenseId, java.lang.String newURL)
          Updates the revocation URL for an already-revoked license
 void updateWatermark(WatermarkSpec watermark)
          Updates the specified watermark with the server, allowing it to be used in policies.
 void updateWatermark2(WatermarkSpec2 watermark)
          Updates the specified watermark with the server, allowing it to be used in policies.
 

Method Detail

getLicenseID

java.lang.String getLicenseID(Document inPDFDoc)
                              throws PDFEncryptionException,
                                     SDKException
Returns the License ID held within a Policy protected document

Parameters:
inPDFDoc -
Returns:
Throws:
PDFEncryptionException
SDKException

inspectDocument

RMInspectResult inspectDocument(Document inPDFDoc)
                                throws SDKException
Throws:
SDKException

protectDocument

RMSecureDocumentResult protectDocument(Document inDoc,
                                       java.lang.String documentName,
                                       java.lang.String policySetName,
                                       java.lang.String policyName,
                                       java.lang.String pubUsername,
                                       java.lang.String pubDomain,
                                       RMLocale locale,
                                       boolean bNamesExactMatch)
                                       throws SDKException
Throws:
SDKException

protectDocument

RMSecureDocumentResult protectDocument(Document inDoc,
                                       java.lang.String documentName,
                                       java.lang.String policySetName,
                                       java.lang.String policyName,
                                       java.lang.String pubUsername,
                                       java.lang.String pubDomain,
                                       RMLocale locale)
                                       throws SDKException
Throws:
SDKException

protectDocumentWithCoverPage

RMSecureDocumentResult protectDocumentWithCoverPage(Document inDoc,
                                                    java.lang.String documentName,
                                                    java.lang.String policySetName,
                                                    java.lang.String policyName,
                                                    java.lang.String pubUsername,
                                                    java.lang.String pubDomain,
                                                    Document coverDoc,
                                                    boolean bNamesExactMatch)
                                                    throws SDKException
Secures a given PDF with the specified policy, and returns a document with a cover page and the protected document as an attachment.

Parameters:
inDoc - 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.
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.
pubUsername - A java.lang.String that represents the canonical name of the User Manager user who is the publisher of the document.
coverDoc - A Document object that represents the cover PDF document which will hold the protected document as an attachment.
bNamesExactMatch - 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.
Returns:
A com.adobe.livecycle.rightsmanagement.RMSecureDocumentResult object that represents the policy-protected document with the cover page and other meta data.
Throws:
SDKException - if any of the following conditions occur:
  • A parameter is invalid.
  • An error occurred while securing the document.

applyPolicy

Document applyPolicy(Document inPDFDoc,
                     java.lang.String documentName,
                     java.lang.String policySetName,
                     java.lang.String policyName,
                     java.lang.String pubUsername,
                     java.lang.String pubDomain)
                     throws PDFEncryptionException,
                            SDKException
Deprecated. 

Returns a new polciy protected document given an non encrypted document as input

Parameters:
inPDFDoc - an IDP Document supplied as input
encryptSpec - an APSEncryptionSpec containing the preferences to use for encryption including the Policy ID of the policy to use
Returns:
a new PDF Docuemnt encrypted using the preferences in the APSEncryptionSpec
Throws:
PDFEncryptionException
SDKException
See Also:
protectDocument

applyPolicy

Document applyPolicy(Document inPDFDoc,
                     java.lang.String documentName,
                     java.lang.String policyId,
                     java.lang.String pubUsername,
                     java.lang.String pubDomain)
                     throws PDFEncryptionException,
                            SDKException
Throws:
PDFEncryptionException
SDKException

unlockPDFUsingPolicy

Document unlockPDFUsingPolicy(Document inPDFDoc)
                              throws PDFEncryptionException,
                                     SDKException
Returns a new unlocked PDF given a policy protected document as input.

Parameters:
inPDFDoc - an IDP Document supplied as input. It must be policy protected
Returns:
a new PDF Document unlocked in the context of the caller's Identity
Throws:
PDFEncryptionException
SDKException

removePolicySecurity

Document removePolicySecurity(Document inPDFDoc)
                              throws PDFEncryptionException,
                                     SDKException
Returns a new Document that has security removed given a policy protected document as input. The identity of the caller authenticated through the Client SDK is used by Policy Server to authorize access to the document

Parameters:
inPDFDoc - an IDP Document supplied as input. It must be policy protected
Returns:
a new PDF Document with security removed
Throws:
PDFEncryptionException
SDKException

extractProtectedDocument

Document extractProtectedDocument(Document inPDFDoc)
                                  throws SDKException
Extracts and returns the protected document from the document with cover page.

Parameters:
inPDFDoc - an IDP Document supplied as input. It must be a collection PDF with the protected PDF as an attachment.
Returns:
the protected PDF document which was an attachment in the input PDF.
Throws:
SDKException

revokeLicense

void revokeLicense(java.lang.String licenseId,
                   Reason reason,
                   java.lang.String revocationURL)
                   throws SDKException
Revokes the specified license, making the document it secures inaccessible

Parameters:
licenseId - The Id of the license to revoke
reason - The reason why the document was revoked, which will be displayed in Acrobat. It must be one of the follow constants: documentTerminated, documentRevised and generalMessage
revocationURL - An optional URL that will be provided to the a user trying to open the revoked document. This argument may be null if you do not wish to provide a URL.
Throws:
SDKException - If there was an error communicating with the server In the licenseId is not recognized by the server or the document has already been revoked If the logged in user does not have permission to perform this operation

revokeDocument

void revokeDocument(Document document,
                    Reason reason,
                    java.lang.String revocationURL)
                    throws SDKException
Revokes the specified document, making the document it secures inaccessible

Parameters:
document - The Id of the license to revoke
reason - The reason why the document was revoked, which will be displayed in Acrobat. It must be one of the follow constants: documentTerminated, documentRevised and generalMessage
revocationURL - An optional URL that will be provided to the a user trying to open the revoked document. This argument may be null if you do not wish to provide a URL.
Throws:
SDKException - If there was an error communicating with the server In the document is not recognized by the server or the document has already been revoked If the logged in user does not have permission to perform this operation

updateRevocationURL

void updateRevocationURL(java.lang.String licenseId,
                         java.lang.String newURL)
                         throws SDKException
Updates the revocation URL for an already-revoked license

Parameters:
licenseId - The Id of the revoked license
newURL - The new revocation URL for the revoked license
Throws:
SDKException - If there was an error communicating with the server. If the licenseId is not recognized by the server or the license is not in the revoked state. If the logged in user does not have permission to perform this operation

updateRevocationURL

void updateRevocationURL(Document document,
                         java.lang.String newURL)
                         throws SDKException
Updates the revocation URL for an already-revoked license

Parameters:
document - The revoked document
newURL - The new revocation URL for the revoked license
Throws:
SDKException - If there was an error communicating with the server. If the licenseId is not recognized by the server or the license is not in the revoked state. If the logged in user does not have permission to perform this operation

unrevokeLicense

void unrevokeLicense(java.lang.String licenseId)
                     throws SDKException
Returns the state of the license to not revoked. The document secured by the specified license will become accessible again to authorized users.

Parameters:
licenseId - The Id of the license to unrevoke
Throws:
SDKException - If there was an error communicating with the server If the document was not recognized by the server or was not revoked. If the logged in user does not have permission to perform this operation

unrevokeDocument

void unrevokeDocument(Document document)
                      throws SDKException
Returns the state of the document to not revoked. The document will become accessible again to authorized users.

Parameters:
document - The document to unrevoke
Throws:
SDKException - If there was an error communicating with the server If the document was not recognized by the server or was not revoked. If the logged in user does not have permission to perform this operation

getLicense

LicenseSpec getLicense(java.lang.String licenseId)
                       throws SDKException
returns the License object for the specified licenseId

Parameters:
licenseId - The Id of the license to retrieve
Returns:
The License object for the specified licenseId
Throws:
SDKException - If there was an error communicating with the server If the licenseId was not recognized by the server If the logged in user does not have permission to perform this operation

setLicenseAlternateId

void setLicenseAlternateId(java.lang.String licenseId,
                           java.lang.String alternateId)
                           throws SDKException
Associates an alternate id (such as a customer invoice number) with the license

Parameters:
licenseId - The licenseId to associate an alternateId with
alternateId - The alternateId, which can be an arbitrary string of maximum length 255. No two licenses may have the same alternateId associated with them
Throws:
SDKException - If there was an error communicating with the server If the licenseId was not recognized by the server, or the alternateId is too long If the logged in user does not have permission to perform this operation

getLicenseByAlternateId

LicenseSpec getLicenseByAlternateId(java.lang.String alternateId)
                                    throws SDKException
Returns the license associated with the provided alternateId

Parameters:
alternateId - The alternateId for a license, which was previously associated with a license using the setAlternateIdForLicense method
Returns:
The licenseId associated with the alternateId, or null if the alternateId is not found
Throws:
SDKException - If there was an error communicating with the server If the alternateId is null If the logged in user does not have permission to perform this operation

changeLicensePolicy

void changeLicensePolicy(java.lang.String licenseId,
                         java.lang.String newPolicySetName,
                         java.lang.String newPolicyName)
                         throws SDKException
Switches the policy for the specified license.

Parameters:
licenseId - The Id of the license to switch the policy on.
newPolicyId - The Id of the new policy to associate with the license
Throws:
SDKException - If there was an error communicating with the server If the licenseId or newPolicyId was not recognized by the server. If the logged in user does not have permission to perform this operation

changeLicensePolicy

void changeLicensePolicy(java.lang.String licenseId,
                         java.lang.String newPolicyId)
                         throws SDKException
Throws:
SDKException

getLicenses

java.util.List getLicenses(LicenseSearchFilterSpec filter,
                           int maxResults)
                           throws SDKException
Returns all licenses to maxResults.

Parameters:
filter - A search filter that is used to specify the query. See the definition of LicenseSearchFilterSpec for more details
maxResults - The maximum number of results to return
Returns:
An array of all matching Policy objects
Throws:
SDKException

registerPolicy

java.lang.String registerPolicy(PolicySpec policy)
                                throws SDKException
Registers the provided policy with the server. The policy is registered as an organizational policy if the currently logged in user is an administrator or a user policy otherwise. Organizational policies must be activated from the Web Console before they can be used.

Parameters:
policy - A new policy to register with the server. The new policy may not have the same name as an existing policy registered by the same user.
Returns:
Returns the policyId for the registered policy
Throws:
SDKException - If there was an error communicating with the server

registerAbstractPolicy

java.lang.String registerAbstractPolicy(AbstractPolicySpec policy)
                                        throws SDKException
Registers the provided abstract policy with the server. The policy is registered as an organizational policy if the currently logged in user is an administrator or a user policy otherwise. Organizational policies must be activated from the Web Console before they can be used.

Parameters:
policy - A new policy to register with the server. The new policy may not have the same name as an existing policy registered by the same user.
Returns:
Returns the policyId for the registered policy
Throws:
SDKException - If there was an error communicating with the server

registerAbstractPolicy

java.lang.String registerAbstractPolicy(AbstractPolicySpec policy,
                                        java.lang.String policySetName)
                                        throws SDKException
Registers the abstract provided policy with the server. The policy is registered as an organizational policy if the currently logged in user is an administrator or a user policy otherwise. Organizational policies must be activated from the Web Console before they can be used.

Parameters:
policy - A new policy to register with the server. The new policy may not have the same name as an existing policy registered by the same user.
policySetName - The name of the policy set that the policy will register within.
Throws:
SDKException - If there was an error communicating with the server

registerPolicy

java.lang.String registerPolicy(PolicySpec policy,
                                java.lang.String policySetName)
                                throws SDKException
Registers the provided policy with the server. The policy is registered as an organizational policy if the currently logged in user is an administrator or a user policy otherwise. Organizational policies must be activated from the Web Console before they can be used.

Parameters:
policy - A new policy to register with the server. The new policy may not have the same name as an existing policy registered by the same user.
policySetName - The name of the policy set that the policy will register within.
Throws:
SDKException - If there was an error communicating with the server

deletePolicy

void deletePolicy(java.lang.String policyId)
                  throws SDKException
Deletes the policy specified by policyId. Once the policy is deleted, it can no longer be applied to new documents. However, the policy will still be enforced for existing documents

Parameters:
policyId - The Id of the policy to delete
Throws:
SDKException - If there was an error communicating with the server

deleteAbstractPolicy

void deleteAbstractPolicy(java.lang.String policyId)
                          throws SDKException
Deletes the policy specified by policyId. Once the policy is deleted, it can no longer be applied to new documents. However, the policy will still be enforced for existing documents

Parameters:
policyId - The Id of the policy to delete
Throws:
SDKException - If there was an error communicating with the server

deletePolicy

void deletePolicy(java.lang.String policySetName,
                  java.lang.String policyName)
                  throws SDKException
Deletes the policy specified by policySetName/policyName. Once the policy is deleted, it can no longer be applied to new documents. However, the policy will still be enforced for existing documents

Parameters:
policySetName - The name of the policy set
policyName - The name the policy (in the policy set) to delete
Throws:
SDKException - If there was an error communicating with the server

deleteAbstractPolicy

void deleteAbstractPolicy(java.lang.String policySetName,
                          java.lang.String policyName)
                          throws SDKException
Deletes the policy specified by policySetName/policyName. Once the policy is deleted, it can no longer be applied to new documents. However, the policy will still be enforced for existing documents

Parameters:
policySetName - The name of the policy set
policyName - The name the policy (in the policy set) to delete
Throws:
SDKException - If there was an error communicating with the server

deleteMyPolicy

void deleteMyPolicy(java.lang.String policyName,
                    java.lang.String ownerUsername,
                    java.lang.String ownerDomain)
                    throws SDKException
Deletes the policy specified by policyName/policyOwnerUsername/ownerDomain. Once the policy is deleted, it can no longer be applied to new documents. However, the policy will still be enforced for existing documents

Parameters:
policyName - The name the policy (in "My Policies" policy set) to delete
ownerUsername - The login identification of the policy owner of the policy to delete
ownerDomain - The domain identification of the policy owner of the policy to delete
Throws:
SDKException - If there was an error communicating with the server

updatePolicy

void updatePolicy(PolicySpec updatedPolicy)
                  throws SDKException
Updates an existing policy. In order to update a policy, you must first retrieve the existing policy using one of the getPolicy() or getPolicies() methods and then modify it.

Parameters:
updatedPolicy - The updated policy
Throws:
SDKException - If there was an error communicating with the server

updateAbstractPolicy

void updateAbstractPolicy(AbstractPolicySpec updatedPolicy)
                          throws SDKException
Updates an existing policy. In order to update a policy, you must first retrieve the existing policy using one of the getPolicy() or getPolicies() methods and then modify it.

Parameters:
updatedPolicy - The updated policy
Throws:
SDKException - If there was an error communicating with the server

updatePolicy

void updatePolicy(java.lang.String policySetName,
                  java.lang.String policyName,
                  int offlineLeasePeriod,
                  IUserlist principalsToAdd,
                  IUserlist principalsToRemove,
                  java.lang.String watermarkName)
                  throws SDKException
Updates an existing policy. In order to update a policy, you must first retrieve the existing policy using one of the getPolicy() or getPolicies() methods and then modify it.

Parameters:
policySetName - The name of the policy set that contains the policy to retrieve
policyName - The name of the policy to retrieve
offlineLeasePeriod - The offline lease period to be added or updated
principalToAdd - The users and/or groups to be added to the policy
principalToRemove - The users and/or groups to be removed from the policy
policyId - The name of the watermark to be added or updated
Throws:
SDKException - If there was an error communicating with the server

createPolicyFromTemplate

java.lang.String createPolicyFromTemplate(java.lang.String newPolicySetName,
                                          java.lang.String newPolicyName,
                                          java.lang.String policySetName,
                                          java.lang.String policyName,
                                          int offlineLeasePeriod,
                                          java.util.List principalsToAdd,
                                          java.util.List principalsToRemove,
                                          java.lang.String watermarkName)
                                          throws SDKException
Deprecated. 

Create a policy from a template policy with a chance to update the offline lease period, add or remove principals, and add or update the watermark.

Parameters:
newPolicySetName - The name of the new policy set that contains the policy to retrieve
newPolicyName - The name of the new policy to retrieve
policySetName - The name of the policy set that contains the policy to retrieve
policyName - The name of the policy to retrieve
offlineLeasePeriod - The offline lease period to be added or updated
principalToAdd - The users and/or groups to be added to the policy
principalToRemove - The users and/or groups to be removed from the policy
watermarkName - The name of the watermark to be added or updated
Returns:
Returns the policyId for the registered policy
Throws:
SDKException - If there was an error communicating with the server
See Also:
createPolicyFromExistingPolicy

getPolicy

PolicySpec getPolicy(java.lang.String policyId)
                     throws SDKException
Retrieves the policy specified by the policyId from the server.

Parameters:
policyId - The Id of the policy to retrieve
Returns:
The policy object for the specified policy
Throws:
SDKException - If there was an error communicating with the server

getAbstractPolicy

AbstractPolicySpec getAbstractPolicy(java.lang.String policyId)
                                     throws SDKException
Retrieves the policy specified by the policyId from the server.

Parameters:
policyId - The Id of the policy to retrieve
Returns:
The policy object for the specified policy
Throws:
SDKException - If there was an error communicating with the server

getPolicy

PolicySpec getPolicy(java.lang.String policySetName,
                     java.lang.String policyName)
                     throws SDKException
Registers the provided policy with the server. The policy is registered as an organizational policy if the currently logged in user is an administrator or a user policy otherwise. Organizational policies must be activated from the Web Console before they can be used.

Parameters:
policy - A new policy to register with the server. The new policy may not have the same name as an existing policy registered by the same user.
policySetName - The name of the policy set that the policy will register within.
Returns:
Returns the policyId for the registered policy
Throws:
SDKException - If there was an error communicating with the server

getAbstractPolicy

AbstractPolicySpec getAbstractPolicy(java.lang.String policySetName,
                                     java.lang.String policyName)
                                     throws SDKException
Registers the provided policy with the server. The policy is registered as an organizational policy if the currently logged in user is an administrator or a user policy otherwise. Organizational policies must be activated from the Web Console before they can be used.

Parameters:
policy - A new policy to register with the server. The new policy may not have the same name as an existing policy registered by the same user.
policySetName - The name of the policy set that the policy will register within.
Returns:
Returns the policyId for the registered policy
Throws:
SDKException - If there was an error communicating with the server

getMyPolicy

PolicySpec getMyPolicy(java.lang.String policyName,
                       java.lang.String ownerUsername,
                       java.lang.String ownerDomain)
                       throws SDKException
Retrieves the policy specified by the policyName/policyOwnerUsername/ownerDomain from the server.

Parameters:
policyName - The name the policy (in "My Policies" policy set) to retrieve
ownerUsername - The login identification of the policy owner of the policy to retrieve
ownerDomain - The domain identification of the policy owner of the policy to retrieve
Returns:
The policy object for the specified policy
Throws:
SDKException - If there was an error communicating with the server

getPolicies

java.util.List getPolicies(PolicySearchFilterSpec filter,
                           int maxResults)
                           throws SDKException
Returns all policies of the specified type up to maxResults.

Parameters:
filter - A search filter that is used to specify the query. See the definition of PolicySearchFilter for more details
maxResults - The maximum number of results to return
Returns:
An array of all matching Policy objects
Throws:
SDKException

getAbstractPolicies

java.util.List getAbstractPolicies(AbstractPolicySearchFilterSpec filter,
                                   int maxResults)
                                   throws SDKException
Returns all policies of the specified type up to maxResults.

Parameters:
filter - A search filter that is used to specify the query. See the definition of PolicySearchFilter for more details
maxResults - The maximum number of results to return
Returns:
An array of all matching Policy objects
Throws:
SDKException

changePolicyOwner

void changePolicyOwner(java.lang.String policyName,
                       PrincipalReference existingOwner,
                       PrincipalReference newOwner)
                       throws SDKException
Changes the owner of the policy. Only Administrators have permission to perform this operation

Parameters:
policyName - The new owner for the policy
existingOwner - The new owner for the policy
newOwner - The new owner for the policy
Throws:
SDKException - If there was an error communicating with the server, If the policyName, existingOwner or newOnwer are not recognized by the server or If the logged in user is not an Administrator

getPolicyByAlternateId

PolicySpec getPolicyByAlternateId(java.lang.String alternateId)
                                  throws SDKException
Returns the policy for the specified alternateId. Only search policies that are owned by the currently logged in user, unless the user is an Administrator, in which all policies are searched.

Parameters:
alternateId - An alternateId that was previously associated with a policy
Returns:
The policy corresponding to the specified alternateId, or null if none was found.
Throws:
SDKException - If there was an error communicating with the server. If the alternateId is null

switchPolicy

void switchPolicy(java.lang.String licenseId,
                  java.lang.String policySetName,
                  java.lang.String policyName)
                  throws SDKException
Throws:
SDKException

switchPolicy

void switchPolicy(java.lang.String licenseId,
                  java.lang.String policyId)
                  throws SDKException
Throws:
SDKException

switchPolicy

java.util.Map switchPolicy(java.util.List licenseIds,
                           java.lang.String policySetName,
                           java.lang.String policyName)
                           throws SDKException
Throws:
SDKException

switchPolicy

java.util.Map switchPolicy(java.util.List licenseIds,
                           java.lang.String policyId)
                           throws SDKException
Throws:
SDKException

registerWatermark

java.lang.String registerWatermark(WatermarkSpec watermark)
                                   throws SDKException
Registers the specified watermark with the server, allowing it to be used in policies. Only administrators are permitted to register watermarks

Parameters:
watermark - A watermark to regiseter with the server.
Returns:
The Id for the new watermark
Throws:
SDKException - If there was an error communicating with the server If the watermark is not valid If the logged in user is not an administrator. Only administrators may register watermarks

registerWatermark2

java.lang.String registerWatermark2(WatermarkSpec2 watermark)
                                    throws SDKException
Registers the specified watermark with the server, allowing it to be used in policies. Only administrators are permitted to register watermarks

Parameters:
watermark - A watermark to regiseter with the server.
Returns:
The Id for the new watermark
Throws:
SDKException - If there was an error communicating with the server If the watermark is not valid If the logged in user is not an administrator. Only administrators may register watermarks

updateWatermark

void updateWatermark(WatermarkSpec watermark)
                     throws SDKException
Updates the specified watermark with the server, allowing it to be used in policies. Only administrators are permitted to update watermarks

Parameters:
watermark - A watermark to regiseter with the server.
Throws:
SDKException - If there was an error communicating with the server If the watermark is not valid If the logged in user is not an administrator. Only administrators may register watermarks

updateWatermark2

void updateWatermark2(WatermarkSpec2 watermark)
                      throws SDKException
Updates the specified watermark with the server, allowing it to be used in policies. Only administrators are permitted to update watermarks

Parameters:
watermark - A watermark to regiseter with the server.
Throws:
SDKException - If there was an error communicating with the server If the watermark is not valid If the logged in user is not an administrator. Only administrators may register watermarks

deleteWatermark

void deleteWatermark(java.lang.String watermarkId)
                     throws SDKException
Deletes the specified watermark so that it can no longer be added to policies. Policies that already contain the watermark will still be able to use it. Only administrators may delete watermarks

Parameters:
watermarkId - The Id of the watermark to delete.
Throws:
SDKException - If there was an error communicating with the server If the watermarkId is not recognized by the server If the logged in user is not an administrator. Only administrators may delete watermarks

getWatermark

WatermarkSpec getWatermark(java.lang.String watermarkId)
                           throws SDKException
Returns the watermark for the specified watermarkId

Parameters:
watermarkId - A valid watermarkId
Returns:
A Watermark object for the specified Id
Throws:
SDKException - If there was an error communicating with the server If the watermarkId was not recognized by the server

getWatermark2

WatermarkSpec2 getWatermark2(java.lang.String watermarkId)
                             throws SDKException
Returns the watermark for the specified watermarkId

Parameters:
watermarkId - A valid watermarkId
Returns:
A Watermark object for the specified Id
Throws:
SDKException - If there was an error communicating with the server If the watermarkId was not recognized by the server

getWatermarkByName

WatermarkSpec getWatermarkByName(java.lang.String watermarkName)
                                 throws SDKException
Returns the watermark for the specified name

Parameters:
watermarkName - The name of a watermark
Returns:
A Watermark object for the specified watermarkName
Throws:
SDKException - If there was an error communicating with the server If the watermarkName is not recognized by the server

getWatermarkByName2

WatermarkSpec2 getWatermarkByName2(java.lang.String watermarkName)
                                   throws SDKException
Returns the watermark for the specified name

Parameters:
watermarkName - The name of a watermark
Returns:
A Watermark object for the specified watermarkName
Throws:
SDKException - If there was an error communicating with the server If the watermarkName is not recognized by the server

inviteExternalUsers

java.util.List inviteExternalUsers(java.util.List emails)
                                   throws SDKException
Sends invitation emails to a list of external users to register with the Policy server

Parameters:
emails - A list of email id's to sent the invitation to
Returns:
Throws:
SDKException

resetExternalUserPassword

boolean resetExternalUserPassword(User user,
                                  java.lang.String pwd)
                                  throws SDKException
Throws:
SDKException

getDocumentKeyToRemoveSecurity

java.lang.String getDocumentKeyToRemoveSecurity(java.lang.String licenseId)
                                                throws SDKException
Throws:
SDKException

getDocumentKeyToRemoveSecurity

java.lang.String getDocumentKeyToRemoveSecurity(java.lang.String licenseId,
                                                boolean logEvent)
                                                throws SDKException
returns the document key if you have the POLICY_SWITCH permission.

Parameters:
licenseId - - the license id for which the document key is requested
logEvent - - A boolean to indicate whether of logging of remove policy should be done or not
Returns:
the document key if you have the POLICY_SWITCH permission.
Throws:
SDKException

searchForEvents

java.util.List searchForEvents(EventSpec event,
                               int maxResults)
                               throws SDKException
Throws:
SDKException

exportEvents

void exportEvents(EventSpec event,
                  java.lang.String filePrefix,
                  int maxRecordsPerFile,
                  EventExportFileFormat fileFormat)
                  throws SDKException
Throws:
SDKException

deleteEvents

int deleteEvents(EventSpec event)
                 throws SDKException
Throws:
SDKException

getNumberOfSearchedEvents

int getNumberOfSearchedEvents(EventSpec event)
                              throws SDKException
Throws:
SDKException

getAllPolicySetNames

java.util.List getAllPolicySetNames()
                                    throws SDKException
Throws:
SDKException

getPolicyNames

java.util.List getPolicyNames(java.lang.String policySetName)
                              throws SDKException
Throws:
SDKException

getAllWatermarkNames

java.util.List getAllWatermarkNames()
                                    throws SDKException
Throws:
SDKException

getAllDomainNames

java.util.List getAllDomainNames()
                                 throws SDKException
Throws:
SDKException

getCustomPermissions

java.util.List getCustomPermissions()
                                    throws SDKException
Throws:
SDKException

createPolicyFromExistingPolicy

java.lang.String createPolicyFromExistingPolicy(java.lang.String policySetNameOfNewPolicy,
                                                java.lang.String newPolicyName,
                                                java.lang.String policySetNameOfExistingPolicy,
                                                java.lang.String existingPolicyName,
                                                int offlineLeasePeriod,
                                                java.util.Date startingDate,
                                                java.util.Date expirationDate,
                                                IUserlist principalsToAdd,
                                                java.util.List permissions,
                                                IUserlist principalsToRemove,
                                                java.lang.String watermarkName)
                                                throws SDKException
Create a policy from an existing policy with a chance to update the validity period, add or remove principals, set permissions, and add or update the watermark.

Parameters:
policySetNameOfNewPolicy - The name of the new policy set that contains the policy to retrieve
newPolicyName - The name of the new policy to retrieve
policySetNameOfExistingPolicy - The name of the policy set that contains the policy to retrieve
existingPolicyName - The name of the policy to retrieve
offlineLeasePeriod - The offline lease period to be added or updated
startingDate - The starting date of the policy validity period
expirationDate - The expiration date of the policy validity period
principalToAdd - The users and/or groups to be added to the policy
permissions - The permissions of the users to be added in the policy
principalToRemove - The users and/or groups to be removed from the policy
watermarkName - The name of the watermark to be added or updated
Returns:
Returns the policyId for the registered policy
Throws:
SDKException - If there was an error communicating with the server

createPolicyFromAbstractPolicy

java.lang.String createPolicyFromAbstractPolicy(java.lang.String policySetNameOfNewPolicy,
                                                java.lang.String newPolicyName,
                                                java.lang.String policySetForAbstractPolicy,
                                                java.lang.String abstractPolicyName,
                                                java.util.List principals)
                                                throws SDKException
Create a policy from an existing abstract policy

Parameters:
policySetNameOfNewPolicy - The name of the new policy set that contains the policy to retrieve
newPolicyName - The name of the new policy to retrieve
policySetNameOfExistingPolicy - The name of the policy set that contains the policy to retrieve
abstractPolicyName - The name of the abstract policy
principals - The users and/or groups to be replaced in the abstract policy the number of principals should match the number of policy entries in the abstract policy
Returns:
policyId
Throws:
SDKException - If there was an error communicating with the server

createLicense

PublishLicenseDTO createLicense(java.lang.String policyId,
                                java.lang.String publishUserName,
                                java.lang.String publishUserDomain,
                                java.lang.String documentName,
                                boolean logEvent)
                                throws SDKException
Creates a publish license for the specified user and policy combination. This function can also log document secure event.

Parameters:
policyId - The policy id for which the license needs to be created
publishUserId - user id of the publisher
publishUserDomain - domain name for the publisher
documentName - name of the document for which license is created
logSecureDocEvent - true if the secure new document event needs to be logged, false otherwise.
Returns:
publishLicense a com.adobe.edc.common.dto.PublishLicenseDTO that contains the information required for protecting a document
Throws:
SDKException - if any of the following conditions occur:
  • A parameter is invalid.
  • An error occurred while communicating with the Rights Management service.
  • The user invoking the service doesn't have the publishing permission for the specified policy in the policy id.

createLicense

PublishLicenseDTO createLicense(java.lang.String policyId,
                                java.lang.String publishUserName,
                                java.lang.String publishUserDomain)
                                throws SDKException
Throws:
SDKException

createLicense

PublishLicenseDTO createLicense(java.lang.String policyId,
                                java.lang.String publishUserName,
                                java.lang.String publishUserDomain,
                                java.lang.String documentName,
                                boolean logEvent,
                                java.lang.String issuingAuthorityBase)
                                throws SDKException
Creates a publish license for the specified user and policy combination. This function can also log document secure event.

Parameters:
policyId - The policy id for which the license needs to be created
publishUserId - user id of the publisher
publishUserDomain - domain name for the publisher
documentName - name of the document for which license is created
logSecureDocEvent - true if the secure new document event needs to be logged, false otherwise.
issuingAuthorityBase - the base url to be embedded into the document which would be utilised to contact the drm server
Returns:
publishLicense a com.adobe.edc.common.dto.PublishLicenseDTO that contains the information required for protecting a document
Throws:
SDKException - if any of the following conditions occur:
  • A parameter is invalid.
  • An error occurred while communicating with the Rights Management service.
  • The user invoking the service doesn't have the publishing permission for the specified policy in the policy id.

associateUserWithLicenseAndPolicy

void associateUserWithLicenseAndPolicy(java.lang.String domain,
                                       java.lang.String userId,
                                       java.lang.String licenseId,
                                       java.lang.String policyId)
                                       throws SDKException
Throws:
SDKException

protectDocument

RMSecureDocumentResult protectDocument(Document inDoc,
                                       PublishLicenseDTO publishLicense)
                                       throws SDKException
Throws:
SDKException

getPublishLicenseForUser

PublishLicenseDTO getPublishLicenseForUser(java.lang.String domain,
                                           java.lang.String userId)
                                           throws SDKException
Throws:
SDKException

getPolicySet

PolicySetSpec getPolicySet(java.lang.String policySetId,
                           boolean fetchPolicies)
                           throws SDKException
This method returns PolicySet details for the provided policySetId and if fetchPolicies is set to true, it bring details of all policies under it.

Parameters:
policySetId - Id of the PolicySet whose information needs to be fetched
fetchPolicies - if set to true, it fetches number of policies and details of all the policies under the policy set. If set to false, it neither fetches the details nor the count of the policies under it.
Returns:
PolicySetSpec this object encapsulates all details related to policy set
Throws:
SDKException

createPolicySet

java.lang.String createPolicySet(PolicySetSpec psSpec)
                                 throws SDKException
This method creates a PolicySet, Creating a lot of PolicySets will have adverse performance effects. Please use Cautiously

Parameters:
PolicySetSpec - this object encapsulates all details related to PolicySet
Returns:
policySetId of the newly created PolicySet
Throws:
SDKException

updatePolicySetInfo

void updatePolicySetInfo(java.lang.String name,
                         java.lang.String desc,
                         java.lang.String policySetId)
                         throws SDKException
This method updates the information for the given PolicySetId

Parameters:
name - Updated Name of PolicySet
description - Updated description of the PolicySet
policySetId - of the PolicySet whose information needs to be updated
Throws:
SDKException

getPolicySetIdByPolicySetName

java.lang.String getPolicySetIdByPolicySetName(java.lang.String policySetName)
                                               throws SDKException
This method get the PolicySetId corresponding to the PolicySetName

Parameters:
policySetName - name of the PolicySet
Returns:
policySetId of the policySet
Throws:
SDKException

deletePolicySets

java.util.HashMap deletePolicySets(java.util.List policySetIds)
                                   throws SDKException
This method deletes all policySets whose ids have been set as argument

Parameters:
policySetIds - of the policySets which needs to be deleted, if a policySetId does not exist the system will throw SDKException
Returns:
A map which contains all those policySetIds (which existed in the system) as keys which were not deleted and reasons for same as values, This would not let a user delete any policySet which has policies under it
Throws:
SDKException

updatePolicySetPublishers

void updatePolicySetPublishers(java.lang.String policysetId,
                               java.util.ArrayList userIds,
                               boolean add)
                               throws SDKException
This method helps add/remove Publishers on a given policySet

Parameters:
policySetId - id of the policySet whose publishers need to be modified
userIds - list of userIds which need to be added/removed from the policySet as publishers
add, - a boolean which if set to true will add users as publishers, if set to false will delete those as publishers
Throws:
SDKException

updatePolicySetVisibleUsersGroups

void updatePolicySetVisibleUsersGroups(java.lang.String policysetId,
                                       java.util.ArrayList userIds,
                                       boolean add)
                                       throws SDKException
This method helps add/remove VisibleUsersGroups on a given policySet

Parameters:
policySetId - id of the policySet whose VisibleUsersGroups need to be modified
userIds - list of userIds which need to be added/removed from the policySet as VisibleUsersGroups
add, - a boolean which if set to true will add users as VisibleUsersGroups, if set to false will delete those as VisibleUsersGroups
Throws:
SDKException

updatePolicySetCoordinators

void updatePolicySetCoordinators(java.lang.String policysetId,
                                 java.util.ArrayList userIdAndPermsList,
                                 boolean add)
                                 throws SDKException
This method helps add/remove Coordinators on a given policySet

Parameters:
policySetId - id of the policySet whose Coordinators need to be modified
userIdAndPermsList - list of userIds and their permissions (com.adobe.livecycle.rightsmanagement.client.infomodel.PolicySetCoordinatorAndPerms) which need to be added/removed from the policySet as Coordinators
add, - a boolean which if set to true will add users as Coordinators, if set to false will delete those as Coordinators
Throws:
SDKException

updateCoordinatorPermission

void updateCoordinatorPermission(java.lang.String policySetId,
                                 java.lang.String userId,
                                 java.util.ArrayList perms)
                                 throws SDKException
This method helps update Coordinator's (userId) Permissions (perms) for a given policySetId

Parameters:
policySetId - id of the policySet on which the user will we added as co-ordinator
userId - which will be added as co-ordinator
perms, - an ArrayList to be set as permissions for the co-ordinator (userId). These would be amongst com.adobe.edc.server.constants.PolicyServerConstants.PolicySetAggregatePermissions, else it would throw an exception.
Throws:
SDKException