Oracle Application Server Wireless Java API Reference
B14043-01


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

java.lang.Object
  extended byoracle.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. <p/>

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()


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
void init(java.util.Properties prop)
Initializes the DRMPackager class with the custom properties
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

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

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

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
Throws:
PanamaException
See Also:
#setDRMAgentInfo(String, String)

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
Throws:
java.lang.Exception

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.