com.adobe.livecycle.rightsmanagement.client
Interface LicenseManager


public interface LicenseManager

The LicenseManager interface provides methods for retrieving and manipulating document licenses and for retrieving information about licenses from the server.


Method Summary
 void changeLicensePolicy(java.lang.String licenseId, java.lang.String newPolicySetName, java.lang.String newPolicyName)
          Associates a license with a different policy.
 License getLicense(java.lang.String licenseId)
          Retrieves the license that has the specified identification.
 License getLicenseByAlternateId(java.lang.String alternateId)
          Returns the license that has the specified alternate identification.
 License[] getLicenses(LicenseSearchFilter filter, int maxResults)
          Returns licenses based on the specified search criteria.
 void revokeLicense(java.lang.String licenseId, int reason, java.net.URL revocationURL)
          Revokes the specified license that results in users being unable to open the associated document.
 void setLicenseAlternateId(java.lang.String licenseId, java.lang.String alternateId)
          Sets the alternate identification for a license.
 void unrevokeLicense(java.lang.String licenseId)
          Modifies the state of a revoked license so that it is no longer revoked.
 void updateLicenseRevocationUrl(java.lang.String licenseId, java.net.URL newURL)
          Updates or removes the revocation URL for a license that is currently revoked.
 

Method Detail

revokeLicense

void revokeLicense(java.lang.String licenseId,
                   int reason,
                   java.net.URL revocationURL)
                   throws SDKException
Revokes the specified license that results in users being unable to open the associated document. You can provide a URL that appears to users when they attempt to open a revoked document. You can provide a URL that leads to an updated version of the document associated with the revoked license. If you want to provide a URL for a license that is already revoked, use the com.adobe.livecycle.rightsmanagement.client.LicenseManager#updateDocumentRevocationUrl(com.adobe.idp.Document, java.net.URL) method. To see this method used within a code example, see the Revoking a document using the Java API quick start in Programming with Adobe Experience Manager Forms.

Parameters:
licenseId - A string value that identifies the license that you want to revoke.
reason - An integer value that represents the reason why the license was revoked. The License class defines the values that reason can hold.
revocationURL - A URL object that represents the URL that appears to users who attempt to open the document and null if you do not want to provide a URL.
Throws:
SDKException - if any of the following conditions occur:
  • A parameter is invalid.
  • The license identification is null or empty.
  • The license was revoked.
  • An operation was not permitted.
  • An error occurred while communicating with the Rights Management service.
See Also:
com.adobe.livecycle.rightsmanagement.client.LicenseManager#updateDocumentRevocationUrl(com.adobe.idp.Document, java.net.URL)

unrevokeLicense

void unrevokeLicense(java.lang.String licenseId)
                     throws SDKException
Modifies the state of a revoked license so that it is no longer revoked. When the license is no longer revoked, authorized users can open the associated document. To see this method used within a code example, see the Reinstating access to a revoked document using the Java API quick start in Programming with Adobe Experience Manager Forms.

Parameters:
licenseId - A string value that identifies the license to unrevoke.
Throws:
SDKException - if any of the following conditions occur:
  • The license identificaiton is invalid.
  • The license was not revoked.
  • An operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

getLicense

License getLicense(java.lang.String licenseId)
                   throws SDKException
Retrieves the license that has the specified identification.

Parameters:
licenseId - A String that identifies the license to retrieve.
Returns:
A License object that represents the license with the identification specified in licenseId and null if no license is found.
Throws:
SDKException - if any of the following conditions occur:
  • The license identificaiton is invalid.
  • An operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

getLicenseByAlternateId

License getLicenseByAlternateId(java.lang.String alternateId)
                                throws SDKException
Returns the license that has the specified alternate identification.

Parameters:
alternateId - A String that holds the alternate identification for the license to retrieve. The maximum length of the String you can use is 250 characters or errors can occur.
Returns:
The license object that represents the license with the alternate identification specified in alternateId and null if no license is found.
Throws:
SDKException - if any of the following conditions occur:
  • The alternate license identificaiton is invalid.
  • An operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

getLicenses

License[] getLicenses(LicenseSearchFilter filter,
                      int maxResults)
                      throws SDKException
Returns licenses based on the specified search criteria. You can also specify the maximum number of objects to return. This method always returns the maximum number of available licenses.

Parameters:
filter - A LicenseSearchFilter object that defines the search criteria.
maxResults - An integer that specifies the maximum number of License objects to return. There is no fixed range and the maximum number of licenses is dependent upon the database that Adobe Experience Manager Forms uses.
Returns:
An array of License objects that represent the licenses that match the search criteria. An empty (size of 0) License array is returned when no licenses are found.
Throws:
SDKException - if any of the following conditions occur:
  • A parameter is invalid.
  • An operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

setLicenseAlternateId

void setLicenseAlternateId(java.lang.String licenseId,
                           java.lang.String alternateId)
                           throws SDKException
Sets the alternate identification for a license. This method is useful if you want to cross-reference licenses using the identification scheme of an integrated third-party application.

Parameters:
licenseId - A String that holds the identification of the license for which you want to set the alternate identification.
alternateId - A String that holds the alternate identification to associate with the license. No two licenses can have the same alternate identification. The maximum length of the String you can use is 255 characters or errors can occur.
Throws:
SDKException - if any of the following conditions occur:
  • A parameter is invalid.
  • The license identification is null or empty.
  • The alternate identification is null or empty.
  • An operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

changeLicensePolicy

void changeLicensePolicy(java.lang.String licenseId,
                         java.lang.String newPolicySetName,
                         java.lang.String newPolicyName)
                         throws SDKException
Associates a license with a different policy. The document associated with the license is then protected by the different policy, and the previous policy is no longer used.

Parameters:
licenseId - A String value that holds the identification of the license.
newPolicySetName - A String value that represents the name of the policy set.
newPolicyName - A String value that holds the identification of the policy to associate with the license.
Throws:
SDKException - if any of the following conditions occur:
  • A parameter value is invalid.
  • An operation was not permitted.
  • An error occurred while communicating with the Rights Management service.

updateLicenseRevocationUrl

void updateLicenseRevocationUrl(java.lang.String licenseId,
                                java.net.URL newURL)
                                throws SDKException
Updates or removes the revocation URL for a license that is currently revoked.

Parameters:
licenseId - A String that holds the licenseId of the revoked license.
newURL - An URL object that represents the URL of the new revocation URL and null if you want remove the URL that was previously set.
Throws:
SDKException - if any of the following conditions occur:
  • The specified license is not revoked.
  • A parameter is invalid.
  • This operation is not permitted.
  • The license is null or empty.
  • An error occurred while communicating with the Rights Management service.
See Also:
LicenseManager.revokeLicense(String, int, java.net.URL)