Oracle Application Server Wireless Java API Reference
B10400-01

oracle.wireless.me.server.tools.drm
Class DrmManager

java.lang.Object
  |
  +--oracle.wireless.me.server.tools.drm.DrmManager

public class DrmManager
extends java.lang.Object

DrmManager is a utility class to manage DRM policy repository. It allows provisioning server administrator to add, modify,remove DRM policy object.

Version:
1.01
Author:
Sunny W. Sun, Chandra Patni

Field Summary
static java.lang.String DEFAULT_PACKAGER
           
static java.lang.String DRM_APP_NAME
           
static java.lang.String DRM_CLASS_MIME_TYPE
           
static java.lang.String DRM_ODRL_MIME_TYPE
           
static java.lang.String DRM_PROPERTIES_MIME_TYPE
           
static java.lang.String DRM_SUPPORTED_MIME_TYPES_MIME_TYPE
           
static java.lang.String ENCODING
           

 

Constructor Summary
DrmManager()
           

 

Method Summary
 DRMPolicy createBuiltinDRMPolicyPreviewByCount(java.lang.String name, java.lang.String description, int count)
          Add a new DRMPolicy Objects to the repository using the buildin Preview by count policy
 DRMPolicy createBuiltinDRMPolicyPreviewByInterval(java.lang.String name, java.lang.String description, java.lang.String interval)
          Add a new DRMPolicy Objects to the repository using the buildin Preview by count policy
 DRMPolicy createDRMPolicy(java.lang.String name, java.lang.String description, org.w3c.dom.Document odrlDocument, java.lang.String drmPackagerClassName, java.util.Properties prop)
          Add a new Digital Rights Policy Objects to the repository
 DRMPolicy[] getAllDRMPolicies()
          Get all the Digital Rights Policy Objects from repository
static byte[] getByteArray(org.w3c.dom.Document doc)
           
static byte[] getByteArray(java.util.Properties prop)
           
 java.lang.String getDefaultPackagerClass()
           
 java.util.Properties getDefaultPackagerProperties()
          Used to display the default init properties and values used by the default packager impl which Wireless provides out of the box
static org.w3c.dom.Document getDocument(byte[] data)
           
static DrmManager getInstance()
          get an instance of J2meAppUtil
static org.w3c.dom.Document getODRLforJ2MEContentCountConstraint(int count)
          Helper method to create an ODRL document for J2ME content with count constraint on execute permission
static org.w3c.dom.Document getODRLforJ2MEContentIntervalConstraint(java.lang.String interval)
          Helper method to create an ODRL document for J2ME content with interval constraint on execute permission
static java.util.Properties getProperties(byte[] data)
           
static java.lang.String getTimeInPnYnMnDTnHnMnSFormat(long years, long months, long days, long hours, long minutes, long seconds)
           
 boolean isUsedByContent(DRMPolicy policy)
          Checks if any content is currently using the policy this check must be done before deleting the policy
 DRMPolicy lookupDRMPolicy(DeliverableContent content)
           
 DRMPolicy lookupDRMPolicy(long id)
           
 DRMPolicy lookupDRMPolicy(java.lang.String name)
           
static void main(java.lang.String[] argv)
          Deprecated. the method is no-op and only provided for binary compatibility
 void removeDRMPolicy(long id)
          Remove a Digital Rights Policy Objects from the repository
 void setDRMPolicy(DeliverableContent content, DRMPolicy policy)
          Set the content's DRM policy

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

DRM_APP_NAME

public static final java.lang.String DRM_APP_NAME
See Also:
Constant Field Values

DRM_CLASS_MIME_TYPE

public static final java.lang.String DRM_CLASS_MIME_TYPE
See Also:
Constant Field Values

DRM_ODRL_MIME_TYPE

public static final java.lang.String DRM_ODRL_MIME_TYPE
See Also:
Constant Field Values

DRM_PROPERTIES_MIME_TYPE

public static final java.lang.String DRM_PROPERTIES_MIME_TYPE
See Also:
Constant Field Values

DRM_SUPPORTED_MIME_TYPES_MIME_TYPE

public static final java.lang.String DRM_SUPPORTED_MIME_TYPES_MIME_TYPE
See Also:
Constant Field Values

ENCODING

public static final java.lang.String ENCODING
See Also:
Constant Field Values

DEFAULT_PACKAGER

public static final java.lang.String DEFAULT_PACKAGER
See Also:
Constant Field Values
Constructor Detail

DrmManager

public DrmManager()
Method Detail

getAllDRMPolicies

public DRMPolicy[] getAllDRMPolicies()
Get all the Digital Rights Policy Objects from repository
Returns:
DRMPolicy[] an array of DRMPolicy objects

createDRMPolicy

public DRMPolicy createDRMPolicy(java.lang.String name,
                                 java.lang.String description,
                                 org.w3c.dom.Document odrlDocument,
                                 java.lang.String drmPackagerClassName,
                                 java.util.Properties prop)
                          throws PanamaException
Add a new Digital Rights Policy Objects to the repository
Parameters:
name - String the name of the policy
description - String the description of the policy
Returns:
J2meDrmPolicy
PanamaException

createBuiltinDRMPolicyPreviewByCount

public DRMPolicy createBuiltinDRMPolicyPreviewByCount(java.lang.String name,
                                                      java.lang.String description,
                                                      int count)
                                               throws java.lang.Exception
Add a new DRMPolicy Objects to the repository using the buildin Preview by count policy
Parameters:
name - String the name of the policy
description - String the description of the policy
count - the number of times the user can run this content
Returns:
DRMPolicy
java.lang.Exception

getDefaultPackagerProperties

public java.util.Properties getDefaultPackagerProperties()
Used to display the default init properties and values used by the default packager impl which Wireless provides out of the box
Returns:
Properties default init properties of the sample packager impl

getDefaultPackagerClass

public java.lang.String getDefaultPackagerClass()

createBuiltinDRMPolicyPreviewByInterval

public DRMPolicy createBuiltinDRMPolicyPreviewByInterval(java.lang.String name,
                                                         java.lang.String description,
                                                         java.lang.String interval)
                                                  throws java.lang.Exception
Add a new DRMPolicy Objects to the repository using the buildin Preview by count policy
Parameters:
name - String the name of the policy
description - String the description of the policy
interval - the number of seconds the user can run this content
Returns:
DRMPolicy
java.lang.Exception

getTimeInPnYnMnDTnHnMnSFormat

public static java.lang.String getTimeInPnYnMnDTnHnMnSFormat(long years,
                                                             long months,
                                                             long days,
                                                             long hours,
                                                             long minutes,
                                                             long seconds)

isUsedByContent

public boolean isUsedByContent(DRMPolicy policy)
                        throws PanamaException
Checks if any content is currently using the policy this check must be done before deleting the policy
Returns:
boolean returns true if there is dependency else false
PanamaException

removeDRMPolicy

public void removeDRMPolicy(long id)
                     throws PanamaException
Remove a Digital Rights Policy Objects from the repository
PanamaException

lookupDRMPolicy

public DRMPolicy lookupDRMPolicy(long id)

lookupDRMPolicy

public DRMPolicy lookupDRMPolicy(DeliverableContent content)

lookupDRMPolicy

public DRMPolicy lookupDRMPolicy(java.lang.String name)

setDRMPolicy

public void setDRMPolicy(DeliverableContent content,
DRMPolicy policy)
                  throws PanamaException
Set the content's DRM policy
Parameters:
policy - DRMPolicy the DRM policy from the DRM repository
PanamaException

getODRLforJ2MEContentCountConstraint

public static org.w3c.dom.Document getODRLforJ2MEContentCountConstraint(int count)
Helper method to create an ODRL document for J2ME content with count constraint on execute permission

getODRLforJ2MEContentIntervalConstraint

public static org.w3c.dom.Document getODRLforJ2MEContentIntervalConstraint(java.lang.String interval)
Helper method to create an ODRL document for J2ME content with interval constraint on execute permission

getInstance

public static DrmManager getInstance()
get an instance of J2meAppUtil

getByteArray

public static byte[] getByteArray(java.util.Properties prop)

getByteArray

public static byte[] getByteArray(org.w3c.dom.Document doc)

getDocument

public static org.w3c.dom.Document getDocument(byte[] data)
                                        throws java.lang.Exception
java.lang.Exception

getProperties

public static java.util.Properties getProperties(byte[] data)
                                          throws java.io.IOException
java.io.IOException

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Deprecated. the method is no-op and only provided for binary compatibility
java.lang.Exception

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.