Oracle Application Server Wireless Java API Reference
B10400-01

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

java.lang.Object
  |
  +--oracle.wireless.me.server.tools.drm.J2MEDRMPackager
All Implemented Interfaces:
DRMPackager

public class J2MEDRMPackager
extends java.lang.Object
implements DRMPackager

J2MEDRMPackager provides implementation of DRMPackager to package a J2ME application (content) with the DRM policy.

Custom Packagers may extend this class for modifying the default behaviour as long as the general contract of DRMPackager is satisfied by providing a static factory method, getInstance()

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

Method Summary
 java.util.Properties getInitPropertiesDef()
          Get the list of the init properties this DRMPackager class requires along with the default values
static DRMPackager getInstance()
          Returns J2MEDRMPackager reference
static java.util.Properties getProperties(org.w3c.dom.Document odrl)
          Internal: The method is not exported API and may not be supported in future.
static java.lang.String getValueOf(java.lang.String uri, java.lang.String localNodeName, org.w3c.dom.Document odrl)
          Internal: The method is not exported API and may not be supported in future.
 void init(java.util.Properties prop)
          Initializes the DRMPackager class with the custom properties
static void main(java.lang.String[] argv)
          Deprecated. the method is no-op and only provided for binary compatibility
 byte[] packageDRMContent(byte[] content, java.util.Properties policyProperties, org.w3c.dom.Document odrlXml, UserDevice device)
          Package the content with the Digital Rights information.
static org.w3c.dom.Document replaceCID(org.w3c.dom.Document doc, java.lang.String cid)
          Internal: The method is not exported API and may not be supported in future.

 

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

 

Method Detail

getInstance

public static DRMPackager getInstance()
Returns J2MEDRMPackager reference

init

public void init(java.util.Properties prop)
Initializes the DRMPackager class with the custom properties
Specified by:
init in interface DRMPackager
Parameters:
prop - Properties Initialization Properties

getInitPropertiesDef

public java.util.Properties getInitPropertiesDef()
Get the list of the init properties this DRMPackager class requires along with the default values
Specified by:
getInitPropertiesDef in interface DRMPackager
Returns:
Properties

packageDRMContent

public byte[] packageDRMContent(byte[] content,
                                java.util.Properties policyProperties,
                                org.w3c.dom.Document odrlXml,
UserDevice device)
                         throws PanamaException
Package the content with the Digital Rights information. The JAR file containing DRM Agent class is loaded using the scheme described by setDRMAgentInfo(String, String) method.
Specified by:
packageDRMContent in interface DRMPackager
Parameters:
content - byte[] the content to be packaged
policyProperties - Properties the init properties
odrlXml - Document the digital rights expressed in ODRL format
device - UserDevice the user device this content is being delivered to
Returns:
byte[] the new DRM enabled content
PanamaException
See Also:
#setDRMAgentInfo(String, String)

getProperties

public static java.util.Properties getProperties(org.w3c.dom.Document odrl)
Internal: The method is not exported API and may not be supported in future.

Converts values of an ODRL document into Properties

Returns:
Properties values of an ODRL document in a map.

getValueOf

public static java.lang.String getValueOf(java.lang.String uri,
                                          java.lang.String localNodeName,
                                          org.w3c.dom.Document odrl)
Internal: The method is not exported API and may not be supported in future.

Returns the value of a named node with specified namespace and ODRL document

Returns:
String values of the named element

replaceCID

public static org.w3c.dom.Document replaceCID(org.w3c.dom.Document doc,
                                              java.lang.String cid)
                                       throws java.lang.Exception
Internal: The method is not exported API and may not be supported in future.

Replaces the the value of CID in specified document

Returns:
String the modified document
java.lang.Exception

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.