com.adobe.ave.drm
Class DRMLicense

java.lang.Object
  extended by com.adobe.ave.drm.DRMLicense

public class DRMLicense
extends java.lang.Object

The DRMLicense class is a handle to the license token that allows a user to view DRM-protected content.

The DRMLicense properties describe the viewing rights conferred by the license.

You can get a license using the acquireLicense() method of the DRMManager object. This method requires a DRMMetaData object, which you can get by listening for DRMMetadata-available events on your media player, or by calling createMetadataFromBytes on DRMManager from a byte array.

When using a media rights server such as Flash Access, you can get a DRMMetadata object from the metadata generated by the media packager tool.


Constructor Summary
protected DRMLicense(byte[] bytes, java.util.Date startDate, java.util.Date endDate, java.util.Date offlineStartDate, java.util.Date offlineEndDate, java.lang.String serverURL, java.lang.String licenseID, java.lang.String policyID, DRMPlaybackTimeWindow w, java.util.Map<java.lang.String,byte[]> customProperties)
           
 
Method Summary
 java.util.Map<java.lang.String,byte[]> getCustomProperties()
          [read-only] The custom application-defined rights, if any, defined by the customer when packaging the content.
 java.util.Date getLicenseEndDate()
          [read-only] The date on which this license expires.
 java.lang.String getLicenseID()
          [read-only] The ID of this license.
 java.util.Date getLicenseStartDate()
          [read-only] The beginning of this license's validity period.
 java.util.Date getOfflineStorageEndDate()
          [read-only] The date and time at which this license expires for offline playback (caching the license locally).
 java.util.Date getOfflineStorageStartDate()
          [read-only] The date and time at which this license becomes valid for offline playback (caching the license locally).
 DRMPlaybackTimeWindow getPlaybackTimeWindow()
          [read-only] The time period, after the first viewing, during which the associated content can be viewed or reviewed.
 java.lang.String getPolicyID()
          [read-only] The policy ID of this license.
 java.lang.String getServerURL()
          [read-only] The URL of the license server used to obtain this license.
 byte[] toBytes()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DRMLicense

protected DRMLicense(byte[] bytes,
                     java.util.Date startDate,
                     java.util.Date endDate,
                     java.util.Date offlineStartDate,
                     java.util.Date offlineEndDate,
                     java.lang.String serverURL,
                     java.lang.String licenseID,
                     java.lang.String policyID,
                     DRMPlaybackTimeWindow w,
                     java.util.Map<java.lang.String,byte[]> customProperties)
Method Detail

getCustomProperties

public java.util.Map<java.lang.String,byte[]> getCustomProperties()
[read-only] The custom application-defined rights, if any, defined by the customer when packaging the content.


getLicenseStartDate

public java.util.Date getLicenseStartDate()
[read-only] The beginning of this license's validity period.


getLicenseEndDate

public java.util.Date getLicenseEndDate()
[read-only] The date on which this license expires.


getOfflineStorageStartDate

public java.util.Date getOfflineStorageStartDate()
[read-only] The date and time at which this license becomes valid for offline playback (caching the license locally).

If a license is only valid for the current online session, getOfflineStorageStartDate is null.


getOfflineStorageEndDate

public java.util.Date getOfflineStorageEndDate()
[read-only] The date and time at which this license expires for offline playback (caching the license locally).

If a license is only valid for the current online session, getOfflineStorageEndDate is null.


getPlaybackTimeWindow

public DRMPlaybackTimeWindow getPlaybackTimeWindow()
[read-only] The time period, after the first viewing, during which the associated content can be viewed or reviewed.

The time period allotted for viewing begins when the user first views the content and ends after the allotted amount of time has elapsed. If no time is allotted, the value of the playbackTimeWindow property is null.


getServerURL

public java.lang.String getServerURL()
[read-only] The URL of the license server used to obtain this license.


getLicenseID

public java.lang.String getLicenseID()
[read-only] The ID of this license.


getPolicyID

public java.lang.String getPolicyID()
[read-only] The policy ID of this license.


toBytes

public byte[] toBytes()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object