Enterprise Information Portal APIs

com.ibm.mm.beans
Class CMBObject

java.lang.Object
  |
  +--com.ibm.mm.beans.CMBObject
All Implemented Interfaces:
java.io.Serializable

public class CMBObject
extends java.lang.Object
implements java.io.Serializable

This is a helper class for the CMBDataManagement bean. This class represents the content of an item.

Since:
6.1
See Also:
CMBDataManagement, Serialized Form

Constructor Summary
CMBObject()
          Default constructor
CMBObject(byte[] dataObj, java.lang.String mimeType)
          Constructor with given id and data
CMBObject(com.ibm.mm.sdk.common.dkXDO xdoObj)
          Constructor with given XDO object from api
 
Method Summary
 byte[] getData()
          Gets object content data
 java.io.InputStream getDataStream()
          Gets object content data stream
note: real streaming is only supported by Content Manager.
 java.net.URL getDataURL()
          a URL to the resource manager.
 java.lang.String getId()
          Gets content id
 java.lang.String getMimeType()
          Gets object mime type
 java.lang.String getPartType()
           
 byte[] getPlayData()
          returns a byte buffer received from a BufferInputStream The byte array actually has content in regards to the stream to be played.
 java.lang.String getPlayMimeType()
          return mimetype for the palyer metadata
 int getSize()
          Gets object size
 com.ibm.mm.sdk.common.dkXDO getXDO()
          Returns the underlying XDO used by this object.
 boolean isPlayable()
          if the XDO is an instance of DKStreamICM, therefore can be played with a streaming player such as video charger player
 boolean isTraceEnabled()
          Returns whether trace is enabled.
 void setData(byte[] data)
          Sets object content data
 void setId(java.lang.String pid)
          Sets content object id
 void setMimeType(java.lang.String mimeType)
          Sets object mime type
 void setPartType(java.lang.String partType)
          type strings are the ones that received from entity.getPartTypes() ICM only
 void setTraceEnabled(boolean newValue)
          Sets whether trace is enabled or not.
 void setXDO(com.ibm.mm.sdk.common.dkXDO xdoObj)
          Sets the underlying XDO used by this object.
protected  void setXDOObject(com.ibm.mm.sdk.common.dkXDO xdoObj)
          Deprecated. use setXDO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMBObject

public CMBObject()
Default constructor

CMBObject

public CMBObject(byte[] dataObj,
                 java.lang.String mimeType)
Constructor with given id and data
Parameters:
dataObj - content values
mimeType - object mime type

CMBObject

public CMBObject(com.ibm.mm.sdk.common.dkXDO xdoObj)
Constructor with given XDO object from api
Parameters:
xdoObj - xdo object
Method Detail

getId

public java.lang.String getId()
Gets content id
Returns:
object id

setId

public void setId(java.lang.String pid)
Sets content object id
Parameters:
pid - content object id

getSize

public int getSize()
            throws com.ibm.mm.sdk.common.DKException,
                   java.lang.Exception
Gets object size
Returns:
object size

getMimeType

public java.lang.String getMimeType()
                             throws CMBException
Gets object mime type
Returns:
object type

setMimeType

public void setMimeType(java.lang.String mimeType)
                 throws CMBException
Sets object mime type
Parameters:
mimeType - object mime type

getData

public byte[] getData()
               throws CMBException
Gets object content data
Returns:
object data

setData

public void setData(byte[] data)
             throws CMBException
Sets object content data
Parameters:
data - object data

getDataURL

public java.net.URL getDataURL()
                        throws CMBException,
                               java.net.MalformedURLException
a URL to the resource manager. allows direct retrieval of the content this call is for viewing only. client will get all the attributes and contents. checkout is not performed

isPlayable

public boolean isPlayable()
if the XDO is an instance of DKStreamICM, therefore can be played with a streaming player such as video charger player

getPlayData

public byte[] getPlayData()
                   throws CMBException,
                          java.lang.Exception
returns a byte buffer received from a BufferInputStream The byte array actually has content in regards to the stream to be played. This array can be saved as a .ivs file or passed directly to a player like the Videocharger player, to allow it handle the play stream. it is passed as is, since it is the calling application's choice as to what to do with this array.

getPlayMimeType

public java.lang.String getPlayMimeType()
                                 throws CMBException,
                                        java.lang.Exception
return mimetype for the palyer metadata

getDataStream

public java.io.InputStream getDataStream()
                                  throws CMBException
Gets object content data stream
note: real streaming is only supported by Content Manager. for other data sources, getData() will be called and a ByteArrayInputStream will be formed.
Returns:
InputStream

setPartType

public void setPartType(java.lang.String partType)
type strings are the ones that received from entity.getPartTypes() ICM only

getPartType

public java.lang.String getPartType()
Returns:
type string of the part ICM only

isTraceEnabled

public boolean isTraceEnabled()
Returns whether trace is enabled.
Returns:
traceEnabled property value

setTraceEnabled

public void setTraceEnabled(boolean newValue)
Sets whether trace is enabled or not.
Parameters:
newValue - new trace option value

setXDOObject

protected void setXDOObject(com.ibm.mm.sdk.common.dkXDO xdoObj)
Deprecated. use setXDO


setXDO

public void setXDO(com.ibm.mm.sdk.common.dkXDO xdoObj)
Sets the underlying XDO used by this object.

getXDO

public com.ibm.mm.sdk.common.dkXDO getXDO()
Returns the underlying XDO used by this object.

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.