Package com.castlabs.android.drm

# Class DrmTodayUriFactory

java.lang.Object
com.castlabs.android.drm.DrmTodayUriFactory

public class DrmTodayUriFactory extends Object
DRMToday clients helper. Generates url with several parameter configurations for the following request:

Device Registration:

     GET /license-server-oma/RegistrationTrigger

According to the OMA DRM specification. To register a device it must receive a RegistrationTrigger first. This means that it must send a HTTP GET request for the following address and consume the response.

OMA v2 1-pass ROAP license request:

     GET /onepassro/v2/(string: merchant)?sessionId=(string: sessionId)
     					&userId=(string: userId)&deviceId=(string: deviceId)
     					&assetId=(string: assetId)
     					&variantId=(string: variantId)
     					&drmTime=(ISO8601Time: drmTime)
     					&authToken=(string: authToken)

Widevine modular license request:

     GET license-proxy-widevine/cenc/(string: merchant)
     					&logRequestId=(string: deviceId)
     					&assetId=(string: assetId)
     					&variantId=(string: variantId)

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final DateFormat`
  `TIME_FORMAT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DrmTodayUriFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `appendRequestProperties(DrmTodayConfiguration configuration, Map<String,String> requestProperties)`
  Adds the required DRMtoday request properties to the given map.
  `static Uri.Builder`
  `createLicenseUri(DrmTodayConfiguration configuration)`
  Utility method that builds the license request URL to DRMToday for each DRM implementation.
  `static Uri.Builder`
  `createLicenseUri(DrmTodayConfiguration configuration, String drmTimeString)`
  Utility method that builds the license request URL to DRMToday for each DRM implementation.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### TIME_FORMAT

    public static final DateFormat TIME_FORMAT

- ## Constructor Details

  - ### DrmTodayUriFactory

    public DrmTodayUriFactory()

- ## Method Details

  - ### appendRequestProperties

    public static void appendRequestProperties(@NonNull DrmTodayConfiguration configuration, @NonNull Map<String,String> requestProperties)
    Adds the required DRMtoday request properties to the given map.
    Parameters:
      `configuration` - The DRMtoday configuration
      `requestProperties` - The target map where the properties will be appended to

  - ### createLicenseUri

    public static Uri.Builder createLicenseUri(@NonNull DrmTodayConfiguration configuration)
    Utility method that builds the license request URL to DRMToday for each DRM implementation.
    Parameters:
      `configuration` - the drm configuration
    Returns:
      The URI use for license requests to DRMToday

  - ### createLicenseUri

    public static Uri.Builder createLicenseUri(@NonNull DrmTodayConfiguration configuration, String drmTimeString)
    Utility method that builds the license request URL to DRMToday for each DRM implementation.
    Parameters:
      `configuration` - the drm configuration
      `drmTimeString` - The drm time string
    Returns:
      The URI use for license requests to DRMToday