|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.wireless.me.server.tools.drm.DrmManager
DrmManager
is a utility class to manage DRM policy repository. It allows provisioning server administrator to add, modify,remove DRM policy object.
Field Summary | |
static java.lang.String |
DEFAULT_PACKAGER Default package class name |
static java.lang.String |
DRM_APP_NAME Key for Application name |
static java.lang.String |
DRM_CLASS_MIME_TYPE Java Class mimte type. |
static java.lang.String |
DRM_ODRL_MIME_TYPE ODRL DRM mime type |
static java.lang.String |
DRM_PROPERTIES_MIME_TYPE Properties DRM mime type |
static java.lang.String |
DRM_SUPPORTED_MIME_TYPES_MIME_TYPE DRM supported mime types |
static java.lang.String |
ENCODING Default 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) Returns the encoded byte array for specifed properties |
static byte[] |
getByteArray(java.util.Properties prop) Returns the encoded byte array for specifed properties |
java.lang.String |
getDefaultPackagerClass() Returns the default packager class name |
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) Returns the XML document from the specified byte array |
static DrmManager |
getInstance() get an instance of DrmManager |
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) Returns the Properties from the specified byte array |
static java.lang.String |
getTimeInPnYnMnDTnHnMnSFormat(long years, long months, long days, long hours, long minutes, long seconds) Returns time in time on PnYnMnDTnHnMnS format |
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) returns the policy for the specified content |
DRMPolicy |
lookupDRMPolicy(long id) returns the policy for the specified id |
DRMPolicy |
lookupDRMPolicy(java.lang.String name) returns the policy for the specified policy name |
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 |
public static final java.lang.String DEFAULT_PACKAGER
public static final java.lang.String DRM_APP_NAME
public static final java.lang.String DRM_CLASS_MIME_TYPE
public static final java.lang.String DRM_ODRL_MIME_TYPE
public static final java.lang.String DRM_PROPERTIES_MIME_TYPE
public static final java.lang.String DRM_SUPPORTED_MIME_TYPES_MIME_TYPE
public static final java.lang.String ENCODING
Constructor Detail |
public DrmManager()
Method Detail |
public DRMPolicy createBuiltinDRMPolicyPreviewByCount(java.lang.String name, java.lang.String description, int count) throws java.lang.Exception
name
- String the name of the policydescription
- String the description of the policycount
- the number of times the user can run this contentjava.lang.Exception
public DRMPolicy createBuiltinDRMPolicyPreviewByInterval(java.lang.String name, java.lang.String description, java.lang.String interval) throws java.lang.Exception
name
- String the name of the policydescription
- String the description of the policyinterval
- the number of seconds the user can run this contentjava.lang.Exception
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
name
- String the name of the policydescription
- String the description of the policyPanamaException
public DRMPolicy[] getAllDRMPolicies()
public static byte[] getByteArray(org.w3c.dom.Document doc)
public static byte[] getByteArray(java.util.Properties prop)
prop
- the propertiespublic java.lang.String getDefaultPackagerClass()
public java.util.Properties getDefaultPackagerProperties()
public static org.w3c.dom.Document getDocument(byte[] data) throws java.lang.Exception
data
- encoded XML documentjava.lang.Exception
public static DrmManager getInstance()
public static org.w3c.dom.Document getODRLforJ2MEContentCountConstraint(int count)
public static org.w3c.dom.Document getODRLforJ2MEContentIntervalConstraint(java.lang.String interval)
public static java.util.Properties getProperties(byte[] data) throws java.io.IOException
data
- encoded propertiedjava.io.IOException
public static java.lang.String getTimeInPnYnMnDTnHnMnSFormat(long years, long months, long days, long hours, long minutes, long seconds)
public boolean isUsedByContent(DRMPolicy policy) throws PanamaException
PanamaException
public DRMPolicy lookupDRMPolicy(DeliverableContent content)
content
- the deliverable contentpublic DRMPolicy lookupDRMPolicy(long id)
id
- the policy idpublic DRMPolicy lookupDRMPolicy(java.lang.String name)
name
- policy namepublic void removeDRMPolicy(long id) throws PanamaException
PanamaException
public void setDRMPolicy(DeliverableContent content, DRMPolicy policy) throws PanamaException
policy
- DRMPolicy the DRM policy from the DRM repositoryPanamaException
|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |