Enterprise Information Portal APIs

com.ibm.mm.beans
Class CMBItem

java.lang.Object
  |
  +--com.ibm.mm.beans.CMBItem
All Implemented Interfaces:
CMBBaseConstant, CMBHitItem, java.io.Serializable

public class CMBItem
extends java.lang.Object
implements CMBHitItem, java.io.Serializable, CMBBaseConstant

This is the helper class for the CMBSearchResults and CMBDataManagement beans. This class represents an item on the content server. An item is usually a document or folder. For relational databases, an item is a row of a table. This class provides functions for manipulation of:

This class should be used in conjunction with CMBDataManagement bean for the following functions: Instances of this class are created by the CMBSearchResults bean. Instances may also be created from scratch or from an item ID string (pidString).

Since:
6.1
See Also:
CMBSearchResults, CMBDataManagement, Serialized Form

Field Summary
protected  java.lang.String _nameAttr
           
 
Fields inherited from interface com.ibm.mm.beans.CMBBaseConstant
ANNOTATION_MIME_TYPE, CMB_CLASS_ICM_DOC_MODEL, CMB_CLASS_ICM_DOC_PART, CMB_CLASS_ITEM, CMB_CLASS_RESOURCE_ITEM, CMB_CLASS_UNDEFINED, CMB_CONNTYPE_DYNAMIC, CMB_CONNTYPE_LOCAL, CMB_CONNTYPE_REMOTE, CMB_CONTENT_ATTRONLY, CMB_CONTENT_CHILDREN, CMB_CONTENT_ITEMTREE, CMB_CONTENT_LINKS_INBOUND, CMB_CONTENT_LINKS_OUTBOUND, CMB_CONTENT_YES, CMB_DATATYPE_COLLECTION, CMB_DATATYPE_COLLECTION_DDO, CMB_DATATYPE_COLLECTION_XDO, CMB_DATATYPE_DATAOBJECTBASE, CMB_DATATYPE_DATE, CMB_DATATYPE_DECIMAL, CMB_DATATYPE_DOUBLE, CMB_DATATYPE_FLOAT, CMB_DATATYPE_FSTRING, CMB_DATATYPE_ITEM, CMB_DATATYPE_ITEM_COLLECTION, CMB_DATATYPE_LONG, CMB_DATATYPE_OBJECT, CMB_DATATYPE_OBJECT_COLLECTION, CMB_DATATYPE_SHORT, CMB_DATATYPE_TIME, CMB_DATATYPE_TIMESTAMP, CMB_DATATYPE_UNDEFINED, CMB_DATATYPE_VSTRING, CMB_DSTYPE_CM, CMB_DSTYPE_DB2, CMB_DSTYPE_DES, CMB_DSTYPE_DJ, CMB_DSTYPE_DL, CMB_DSTYPE_DOMDOC, CMB_DSTYPE_FED, CMB_DSTYPE_FN, CMB_DSTYPE_IC, CMB_DSTYPE_ICM, CMB_DSTYPE_IP390, CMB_DSTYPE_JDBC, CMB_DSTYPE_OD, CMB_DSTYPE_VI400, CMB_EIP_LOGOUT, CMB_OBJTYPE_CMBITEM, CMB_OBJTYPE_CMBOBJECT, CMB_OP_AND, CMB_OP_BETWEEN, CMB_OP_CONTAINS_TEXT, CMB_OP_CONTAINS_TEXT_IN_CONTENT, CMB_OP_EQUAL, CMB_OP_GREATER, CMB_OP_GREATER_EQUAL, CMB_OP_IN, CMB_OP_LESS, CMB_OP_LESS_EQUAL, CMB_OP_LIKE, CMB_OP_NOT, CMB_OP_NOT_BETWEEN, CMB_OP_NOT_EQUAL, CMB_OP_NOT_IN, CMB_OP_NOT_LIKE, CMB_OP_OR, CMB_OP_UNDEFINED, CMB_QS_TYPE_COMBINED, CMB_QS_TYPE_DES, CMB_QS_TYPE_FEDERATED, CMB_QS_TYPE_IMAGE, CMB_QS_TYPE_PARAMETRIC, CMB_QS_TYPE_SQL, CMB_QS_TYPE_TEMPLATE, CMB_QS_TYPE_TEXT, CMB_QS_TYPE_UNKNOWN, CMB_QS_TYPE_XPATH, CMB_ST_SKIP_ALWAYS, CMB_ST_SKIP_NEVER, CMB_ST_SKIP_WITH_PROMPT, CMB_STATUS_FAILED, CMB_STATUS_OK, CMB_STATUS_RESULT_END, CMB_STATUS_RESULT_MORE, CMB_STATUS_RESULT_NEW, CMB_TIMESTAMP_UNDEFINED, CMB_TYPE_DOCUMENT, CMB_TYPE_FOLDER, CMB_TYPE_ITEM, CMB_TYPE_UNKNOWN, CMB_USERID_UNDEFINED, CMB_VERSION_CONTROL_ALWAYS_NEW, CMB_VERSION_CONTROL_BY_APP, CMB_VERSION_CONTROL_NEVER, CMB_VERSION_KEYWORD, CMB_VERSION_LATEST, CMB_VERSION_NEW, PROP_CACHE_ENABLED, PROP_CC2MIME_URL, PROP_CONNECTION, PROP_CONNECTION_TYPE, PROP_DATA_MANAGEMENT_ENABLED, PROP_DSTYPE, PROP_LOCAL_SERVER, PROP_NAME, PROP_NEW_PASSWORD, PROP_PASSWORD, PROP_PORT_NUMBER, PROP_QUERY_CALLBACK_THRESHOLD, PROP_QUERY_MAX_RESULTS, PROP_RESULT_PAGESIZE, PROP_RMI_HOSTNAME, PROP_SCHEMA_MANAGEMENT_ENABLED, PROP_SEARCH_ASYNCH, PROP_SEARCH_MULTI_CHARS_WILDCARD, PROP_SEARCH_PARAMETRIC_WILDCARD, PROP_SEARCH_SINGLE_CHAR_WILDCARD, PROP_SEARCH_SKIP_SERVER, PROP_SEARCH_TIMEOUT, PROP_SERVER_NAME, PROP_SV_CONNECTION_TYPE, PROP_SV_PORT_NUMBER, PROP_SV_RMI_HOSTNAME, PROP_TRACE_ENABLED, PROP_USERID
 
Constructor Summary
CMBItem()
          Default constructor.
CMBItem(java.lang.String pidString)
          Constructs a new CMBItem object with given item ID and a reference to the connection bean.
 
Method Summary
 void addAttr(java.lang.String attr, CMBItem[] value, short type)
          Add a new attribute which contains a collection of CMBItems.
 void addAttr(java.lang.String attr, CMBObject[] value, short type)
          Add a new attribute which contains a collection of CMBObjects.
 void addAttr(java.lang.String attr, java.lang.String value, short type)
          Add a new attribute and its value and type to this item.
 void addAttrItem(java.lang.String attr, CMBItem item)
          Add a new item to the items contained in this attribute This method does NOT create a new attribute
 void addAttrObject(java.lang.String attr, CMBObject object)
          Add a new object to the objects contained in this attribute This method does NOT create a new attribute
 void addFolderItem(CMBItem newItem)
          Adds an item to this folder
 java.lang.Object clone()
          Makes a copy of this current item
protected  void copyValuesForClone(CMBItem origItem, CMBItem newItem)
           
 boolean equals(java.lang.Object itemObj)
          Compare the pidString of two hit items
 int getAttrCount()
          Get the number of attributes for this item.
 CMBItem[] getAttrItems(java.lang.String attr)
          Gets the attribute items for this requested attribute name
 java.lang.String[] getAttrName()
          Deprecated. Use getAttrNames() instead
 java.lang.String getAttrName(int index)
          Gets the attribute name at given index
 java.lang.String[] getAttrNames()
          Gets a list of the attribute names of this item
 CMBObject[] getAttrObjects(java.lang.String attr)
          Gets the attribute objects for this requested attribute name
 short[] getAttrType()
          Deprecated. Use getAttrTypes instead
 short getAttrType(java.lang.String attr)
          Gets the attribute type for this requested attribute name
 short[] getAttrTypes()
          Gets a list of the attribute types of this item
 java.lang.String[] getAttrValue()
          Deprecated. Use getAttrValues instead
 java.lang.String getAttrValue(int index)
          Gets the attribute value at given index
 java.lang.String getAttrValue(java.lang.String attr)
          Gets the String attribute value for the given attribute name
 java.lang.String[] getAttrValues()
          Gets a list of attribute values of this item
 java.lang.String[] getAttrValues(java.lang.String attr)
          Gets a list of the values of the multi-valued attribute specified in the argument
 java.util.Vector getCategories()
          Deprecated. Use getInfoMiningRecord. See the documentation on the Information Mining beans.
 java.lang.String getComponentId()
          Gets the component ID of this item
 CMBConnection getConnection()
          Get the reference of connection bean.
 java.sql.Timestamp getCreateTimestamp()
          Gets the timestamp that the item was created
 java.lang.String getCreateUserid()
          Gets the userid of the user who created the item
 com.ibm.mm.sdk.common.DKDDO getDDO()
          Gets the DDO wrapped by this CMBItem.
 java.lang.String getEntityName()
          Gets the associated entity name for this item
 CMBItem getFolderItem(int index)
          Gets a folder item at a given index
 com.ibm.mm.beans.infomining.CMBRecord getInfoMiningRecord()
          Gets the information mining record associated with this item.
 java.lang.String getItemId()
          Gets the item ID of this item
 short getItemType()
          Gets the item type
 java.sql.Timestamp getLastChangedTimestamp()
          Gets the timestamp that the item was last changed
 java.lang.String getLastChangedUserid()
          Gets the userid of the user who last changed the item
 java.lang.String getName()
          Gets name to represent the item
 java.lang.String getPidString()
          Gets item ID
 int getRanking()
          Gets the item rank value from the query
 java.lang.String getServerName()
          Gets the server name for this item
 java.lang.String getServerType()
          Gets the server type for this item
 java.lang.String getSummary()
          Deprecated. Use getInfoMiningRecord. See the documentation on the Information Mining beans.
 java.awt.Image getThumbnail()
          Gets the thumbnail image represents this item
 java.lang.String getVersion()
          Gets the version of this item Will return 0 if this item does not support versioning
 int hashCode()
          Returns a hashCode for the item.
 boolean isAttr(java.lang.String name)
          Returns true if the given string is the name of an attribute.
 boolean isMapped()
          Checks to see whether the item is mapped or unmapped.
 boolean isResourceItem()
          Checks to see if the item is a resource item (CM V8) Default value is false.
 boolean isRetrieved()
          Checks to see if the item data already been retrieved
 java.util.Vector listFolderItems()
          Gets a list of items in this folder object
 java.util.Vector listRefFolders()
          Returns the item id's of all folders containing this item.
 void removeAllAttrs()
          Removes all attributes associated with this item
 void removeAttr(java.lang.String attrName)
          Removes an attribute from this item attribute list
 void removeAttrItem(java.lang.String attrName, CMBItem item)
          Removes the specified item from the attribute item list This method does NOT remove the attribute.
 void removeAttrObject(java.lang.String attrName, CMBObject object)
          Removes the specified object from the attribute object list This method does NOT remove the attribute.
 void removeFolderItem(CMBItem anItem)
          Remove an item from this folder.
 void setAttr(java.lang.String[] names)
          Deprecated. Use setAttrNames instead
 void setAttrItems(java.lang.String attr, CMBItem[] items)
          Sets the attribute value as CMBItems
 void setAttrNames(java.lang.String[] names)
          Sets the attribute names for this item
 void setAttrObjects(java.lang.String attr, CMBObject[] objects)
          Sets the attribute value as CMBObjects
 void setAttrTypes(short[] attrTypes)
          Sets the attribute types for this item
 void setAttrValue(java.lang.String attr, java.lang.String value)
          Sets the attribute value
 void setAttrValues(java.lang.String[] attrValues)
          Sets the attribute values for this item
 void setCategories(java.util.Vector categories)
          Deprecated. Use setInfoMiningRecord. See the documentation on the Information Mining beans.
 void setConnection(CMBConnection conn)
          Set the reference of connection bean.
 void setEntityName(java.lang.String newEntityName)
          Sets the associated entity name for this item
 void setInfoMiningRecord(com.ibm.mm.beans.infomining.CMBRecord infoMiningRecord)
          Sets associates an information mining record.
 void setItem(com.ibm.mm.sdk.common.DKDDO ddoObj, CMBConnection connBean, java.lang.String attrName)
          Associates a DDO with this item.
 void setItemType(short itemType)
          Sets the item type.
 void setName(java.lang.String name)
          Sets the name to represent this item
 void setPidString(java.lang.String pidString)
          Sets the item persistent ID
 void setRetrieved(boolean isRetrieved)
          Set the retrieved status of the current item.
 void setServerName(java.lang.String name)
          Sets the server name for this item
 void setServerType(java.lang.String type)
          Sets the server type
 void setSummary(java.lang.String summary)
          Deprecated. Use setInfoMiningRecord. See the documentation on the Information Mining beans.
 void setThumbnail(java.awt.Image thumbnail)
          Sets the thumbnail image to represent this item
 void sortFolderItems(java.lang.String server, java.lang.String entity, java.lang.String attribute, boolean ascending)
          Sort folder contents if this item is a folder.
 java.lang.String toString()
          Overridden to display more informative information on the item
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_nameAttr

protected java.lang.String _nameAttr
Since:
6.1
Constructor Detail

CMBItem

public CMBItem()
Default constructor. Use this constructor when creating a new item on the server.

CMBItem

public CMBItem(java.lang.String pidString)
Constructs a new CMBItem object with given item ID and a reference to the connection bean.

Item type is currently set to CMBBaseConstant.CMB_TYPE_UNKNOWN until the item is retrieved from the back-end server.

Parameters:
pidString - item identification value
Method Detail

setItem

public void setItem(com.ibm.mm.sdk.common.DKDDO ddoObj,
                    CMBConnection connBean,
                    java.lang.String attrName)
Associates a DDO with this item.

Note: The DDO is assumed to have been retrieved. If it has not been retrieved, perform a retrieve operation on the DDO priort to invoking this method.

Parameters:
ddoObj - the DDO to associate with this item
connBean - the connection Bean
attrName - the attribute to use as the name of the item

getName

public java.lang.String getName()
                         throws CMBException
Gets name to represent the item
Returns:
item name
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if current item is not retrieved from content server yet.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

setName

public void setName(java.lang.String name)
Sets the name to represent this item
Parameters:
name - item name

getPidString

public java.lang.String getPidString()
Gets item ID
Specified by:
getPidString in interface CMBHitItem
Returns:
item ID

setPidString

public void setPidString(java.lang.String pidString)
Sets the item persistent ID
Parameters:
pidString - item persistent ID

getAttrCount

public int getAttrCount()
                 throws CMBException
Get the number of attributes for this item.
Returns:
number of attributes
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if current item is not retrieved from content server yet.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
Since:
8.1

getAttrName

public java.lang.String[] getAttrName()
                               throws CMBException
Deprecated. Use getAttrNames() instead

Gets a list of the attribute names of this item
Returns:
an array of attribute names

getAttrNames

public java.lang.String[] getAttrNames()
                                throws CMBException
Gets a list of the attribute names of this item
Returns:
an array of attribute names
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if current item is not retrieved from content server yet.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

getAttrName

public java.lang.String getAttrName(int index)
                             throws java.lang.ArrayIndexOutOfBoundsException,
                                    CMBException
Gets the attribute name at given index
Parameters:
index - the attribute index
Returns:
the attribute name of this index
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if current item is not retrieved from the content server yet.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
java.lang.ArrayIndexOutOfBoundsException - index is invalid.

isAttr

public boolean isAttr(java.lang.String name)
               throws CMBException
Returns true if the given string is the name of an attribute.

getAttrValue

public java.lang.String[] getAttrValue()
                                throws CMBException
Deprecated. Use getAttrValues instead

Gets a list of attribute values of this item
Specified by:
getAttrValue in interface CMBHitItem
Returns:
an array of attribute values in String format

getAttrValues

public java.lang.String[] getAttrValues()
                                 throws CMBException
Gets a list of attribute values of this item
Returns:
an array of attribute values in String format
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if current item is not retrieved from the content server yet.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

getAttrValues

public java.lang.String[] getAttrValues(java.lang.String attr)
                                 throws CMBException
Gets a list of the values of the multi-valued attribute specified in the argument
Parameters:
attr - attribute name
Returns:
attribute value as a String array
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if the attribute does not exist or is not multi-valued.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
Since:
8.1

getAttrValue

public java.lang.String getAttrValue(int index)
                              throws java.lang.ArrayIndexOutOfBoundsException,
                                     CMBException
Gets the attribute value at given index
Specified by:
getAttrValue in interface CMBHitItem
Parameters:
index - the attribute index
Returns:
the value of this index attribute
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from the content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute is not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
java.lang.ArrayIndexOutOfBoundsException - index is invalid.

setRetrieved

public void setRetrieved(boolean isRetrieved)
Set the retrieved status of the current item. Set the status to false to reset the item in order to clear out cache information and retrieve updated data from the server.
Parameters:
isRetrieved - false if want to retrieve fresh data from server.

isRetrieved

public boolean isRetrieved()
Checks to see if the item data already been retrieved
Returns:
true if already retrieved, false otherwise

isResourceItem

public boolean isResourceItem()
Checks to see if the item is a resource item (CM V8) Default value is false. Subclasses which are resource items should override this function to return true.
Returns:
true if the item is a resource item, false if not.
Since:
8.1

equals

public boolean equals(java.lang.Object itemObj)
Compare the pidString of two hit items
Specified by:
equals in interface CMBHitItem
Overrides:
equals in class java.lang.Object
Parameters:
itemObj - item object to compare to this item
Returns:
boolean

hashCode

public int hashCode()
Returns a hashCode for the item. This hashcode is based on the pidString for the item, so two different CMBItem objects with the same pidStrings will have the same hashCode.
Overrides:
hashCode in class java.lang.Object
Returns:
hashCode for the pidString

getRanking

public int getRanking()
Gets the item rank value from the query
Specified by:
getRanking in interface CMBHitItem
Returns:
rank value for this item

getItemType

public short getItemType()
Gets the item type
Specified by:
getItemType in interface CMBHitItem
Returns:
One of the following values:
  1. CMB_TYPE_DOCUMENT if the item is a document
  2. CMB_TYPE_FOLDER if the item is a folder
  3. CMB_TYPE_ITEM if the item is neither a document or folder. This is the case for rows of a relational database table.
  4. CMB_TYPE_UNKNOWN if the type of the item is not known. This could be the case if the item has not been retrieved.

setItemType

public void setItemType(short itemType)
Sets the item type. Item type should be set when using a CMBItem to create a new item on the server.
Parameters:
itemType - on of the following:
  1. CMB_TYPE_DOCUMENT for documents
  2. CMB_TYPE_FOLDER for folders
  3. CMB_TYPE_ITEM for items that are neither documents nor folders

addAttr

public void addAttr(java.lang.String attr,
                    java.lang.String value,
                    short type)
             throws CMBException
Add a new attribute and its value and type to this item. This method should only be used for creating a new attribute.
Parameters:
attr - attribute name
value - attribute value
type - attribute type
Throws:
CMBException - if the following error id:
  • CMB_ERR_ATTR_ALREADY_EXIST: attribute already exists

addAttr

public void addAttr(java.lang.String attr,
                    CMBItem[] value,
                    short type)
             throws CMBException
Add a new attribute which contains a collection of CMBItems. This method should only be used for creating a new attribute.
Parameters:
attr - attribute name
value - attribute value, an array of CMBItems
type - attribute type
Throws:
CMBException - if the following error id:
  • CMB_ERR_ATTR_ALREADY_EXIST: attribute already exists
Since:
8.1

addAttr

public void addAttr(java.lang.String attr,
                    CMBObject[] value,
                    short type)
             throws CMBException
Add a new attribute which contains a collection of CMBObjects. This method should only be used for creating a new attribute.
Parameters:
attr - attribute name
value - attribute value, an array of CMBObjects
type - attribute type
Throws:
CMBException - if the following error id:
  • CMB_ERR_ATTR_ALREADY_EXIST: attribute already exists
Since:
8.1

addAttrItem

public void addAttrItem(java.lang.String attr,
                        CMBItem item)
                 throws CMBException
Add a new item to the items contained in this attribute This method does NOT create a new attribute
Parameters:
attr - attribute name
item - attribute item
Throws:
CMBException - if the following error id:
  • CMB_ERR_ATTR_NOT_EXIST: attribute does not exist
Since:
8.1

addAttrObject

public void addAttrObject(java.lang.String attr,
                          CMBObject object)
                   throws CMBException
Add a new object to the objects contained in this attribute This method does NOT create a new attribute
Parameters:
attr - attribute name
object - attribute object
Throws:
CMBException - if the following error id:
  • CMB_ERR_ATTR_NOT_EXIST: attribute does not exist
Since:
8.1

setAttr

public void setAttr(java.lang.String[] names)
Deprecated. Use setAttrNames instead

Sets the attribute names for this item
Parameters:
names - array of attribute names

setAttrNames

public void setAttrNames(java.lang.String[] names)
Sets the attribute names for this item
Parameters:
names - array of attribute names
Since:
8.1

setAttrValues

public void setAttrValues(java.lang.String[] attrValues)
Sets the attribute values for this item
Parameters:
attrValues - array of attribute values

setAttrTypes

public void setAttrTypes(short[] attrTypes)
Sets the attribute types for this item
Parameters:
attrValues - array of attribute types

removeAllAttrs

public void removeAllAttrs()
Removes all attributes associated with this item

removeAttr

public void removeAttr(java.lang.String attrName)
                throws CMBException
Removes an attribute from this item attribute list
Parameters:
attrName - attribute name to be removed
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from the content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute is not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

removeAttrItem

public void removeAttrItem(java.lang.String attrName,
                           CMBItem item)
                    throws CMBException
Removes the specified item from the attribute item list This method does NOT remove the attribute. It shortens the list of items contained in the attribute.
Parameters:
attrName - attribute name to be removed
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from the content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute is not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
Since:
8.1

removeAttrObject

public void removeAttrObject(java.lang.String attrName,
                             CMBObject object)
                      throws CMBException
Removes the specified object from the attribute object list This method does NOT remove the attribute. It shortens the list of objects contained in the attribute.
Parameters:
attrName - attribute name to be removed
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from the content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute is not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
Since:
8.1

getAttrValue

public java.lang.String getAttrValue(java.lang.String attr)
                              throws CMBException
Gets the String attribute value for the given attribute name
Parameters:
attr - attribute name
Returns:
attribute value
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute is not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

getAttrType

public short[] getAttrType()
                    throws CMBException
Deprecated. Use getAttrTypes instead

Gets a list of the attribute types of this item
Returns:
an array of attribute types

getAttrTypes

public short[] getAttrTypes()
                     throws CMBException
Gets a list of the attribute types of this item
Returns:
an array of attribute types

getAttrType

public short getAttrType(java.lang.String attr)
                  throws CMBException
Gets the attribute type for this requested attribute name
Parameters:
attr - attribute name
Returns:
attribute type
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from the content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute is not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

setAttrValue

public void setAttrValue(java.lang.String attr,
                         java.lang.String value)
                  throws CMBException
Sets the attribute value
Parameters:
attr - attribute name
value - attribute value
Throws:
CMBException - if attribute is not exist, errorId = CMBException.CMB_ERR_ATTR_NOT_EXIST.

setAttrItems

public void setAttrItems(java.lang.String attr,
                         CMBItem[] items)
                  throws CMBException
Sets the attribute value as CMBItems
Parameters:
attr - attribute name
item - attribute item
Throws:
CMBException - if attribute does not exist, errorId = CMBException.CMB_ERR_ATTR_NOT_EXIST.
Since:
8.1

setAttrObjects

public void setAttrObjects(java.lang.String attr,
                           CMBObject[] objects)
                    throws CMBException
Sets the attribute value as CMBObjects
Parameters:
attr - attribute name
object - attribute object
Throws:
CMBException - if attribute does not exist, errorId = CMBException.CMB_ERR_ATTR_NOT_EXIST.
Since:
8.1

getAttrItems

public CMBItem[] getAttrItems(java.lang.String attr)
                       throws CMBException
Gets the attribute items for this requested attribute name
Parameters:
attr - attribute name
Returns:
attribute values as a CMBItem array
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute does not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
Since:
8.1

getAttrObjects

public CMBObject[] getAttrObjects(java.lang.String attr)
                           throws CMBException
Gets the attribute objects for this requested attribute name
Parameters:
attr - attribute name
Returns:
attribute value as a CMBObject array
Throws:
CMBException - with the following errorID:
  • CMBException.CMB_ERR_ITEM_NOT_RETRIEVED: if the current item is not retrieved from content server yet.
  • CMBException.CMB_ERR_ATTR_NOT_EXIST: if attribute does not exist.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
Since:
8.1

getComponentId

public java.lang.String getComponentId()
Gets the component ID of this item
Returns:
String value of the component ID
Since:
8.1

getCreateTimestamp

public java.sql.Timestamp getCreateTimestamp()
Gets the timestamp that the item was created
Returns:
timestamp of time that the item was created, or null if not supported by the server.
Since:
8.1

getCreateUserid

public java.lang.String getCreateUserid()
Gets the userid of the user who created the item
Returns:
userid of the user who created the item, or null if not supported by the server.
Since:
8.1

getLastChangedTimestamp

public java.sql.Timestamp getLastChangedTimestamp()
Gets the timestamp that the item was last changed
Returns:
timestamp of when the item was last changed, or null if not supported by the server.
Since:
8.1

getLastChangedUserid

public java.lang.String getLastChangedUserid()
Gets the userid of the user who last changed the item
Returns:
userid of the user who last changed the item, or null if not supported by the server.
Since:
8.1

setEntityName

public void setEntityName(java.lang.String newEntityName)
Sets the associated entity name for this item

Note: This method is usually used as part of a reindexing operation. New attributes should also be specified on the item. This call does not modify the current attributes, which may be invalid for the entity after this call.

Parameters:
newEntityName - name of new associated entity

getEntityName

public java.lang.String getEntityName()
Gets the associated entity name for this item
Returns:
entity name

getItemId

public java.lang.String getItemId()
Gets the item ID of this item
Returns:
String value of the item ID
Since:
8.1

getServerName

public java.lang.String getServerName()
                               throws CMBException
Gets the server name for this item
Returns:
server name
Throws:
CMBException - although declared to throw this exception, currently it will not be thrown in any situation.

setServerName

public void setServerName(java.lang.String name)
Sets the server name for this item
Parameters:
name - server name

getServerType

public java.lang.String getServerType()
                               throws CMBException
Gets the server type for this item
Returns:
server type
Throws:
CMBException - although declared to throw this exception, currently it will not be thrown in any situation.

setServerType

public void setServerType(java.lang.String type)
Sets the server type
Parameters:
type - server type

getThumbnail

public java.awt.Image getThumbnail()
Gets the thumbnail image represents this item
Returns:
thumbnail image

setThumbnail

public void setThumbnail(java.awt.Image thumbnail)
Sets the thumbnail image to represent this item
Parameters:
thumbnail - new thumbnail image

getVersion

public java.lang.String getVersion()
Gets the version of this item Will return 0 if this item does not support versioning
Returns:
String value of version
Since:
8.1

isMapped

public boolean isMapped()
Checks to see whether the item is mapped or unmapped.
Returns:
true if mapped, false otherwise.

setConnection

public void setConnection(CMBConnection conn)
Set the reference of connection bean.
Parameters:
conn - reference of connection bean

getConnection

public CMBConnection getConnection()
Get the reference of connection bean.
Since:
8.1

addFolderItem

public void addFolderItem(CMBItem newItem)
                   throws CMBServerAccessErrorException,
                          CMBNoConnectionException,
                          CMBException
Adds an item to this folder
Parameters:
anItem - the item to be added to this folder
Throws:
CMBServerAccessErrorException - when the server is no longer available
CMBNoConnectionException - if there is no CMBConnection bean set. Call setConnection() before calling any methods in this bean.
CMBException - will be thrown for the following errorCode form CMBException.getErrorCode():
  • CMBException.CMB_ERR_INVALID_METHOD: if this item is not a folder.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

removeFolderItem

public void removeFolderItem(CMBItem anItem)
                      throws CMBNoConnectionException,
                             CMBItemNotExistException,
                             CMBException
Remove an item from this folder.
Parameters:
anItem - the item to be removed from this folder
Throws:
CMBItemNotExistException - if the current item is not exist on the Content server.
CMBNoConnectionException - if there is no CMBConnection bean set. Call setConnection() before calling any methods in this bean.
CMBException - will be thrown for the following errorCode form CMBException.getErrorCode():
  • CMBException.CMB_ERR_INVALID_METHOD: if this item is not a folder.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

listFolderItems

public java.util.Vector listFolderItems()
                                 throws CMBNoConnectionException,
                                        CMBException
Gets a list of items in this folder object
Returns:
a collection of items
Throws:
CMBNoConnectionException - if there is no CMBConnection bean set. Call setConnection() before calling any methods in this bean.
CMBException - will be thrown for the following errorCode form CMBException.getErrorCode():
  • CMBException.CMB_ERR_INVALID_METHOD: if this item is not a folder.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

getFolderItem

public CMBItem getFolderItem(int index)
                      throws CMBNoConnectionException,
                             CMBException,
                             java.lang.ArrayIndexOutOfBoundsException
Gets a folder item at a given index
Parameters:
index - the index of item in this folder object
Throws:
CMBNoConnectionException - if there is no CMBConnection bean set. Call setConnection() before calling any methods in this bean.
CMBException - will be thrown for the following errorCode form CMBException.getErrorCode():
  • CMBException.CMB_ERR_INVALID_METHOD: if this item is not a folder.
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.
ArrayOutOfBoundsException - if index is invalid.

listRefFolders

public java.util.Vector listRefFolders()
                                throws CMBMethodNotSupportedException,
                                       CMBException
Returns the item id's of all folders containing this item.
Returns:
Vector of CMBItem objects for the folders containing this item.
Throws:
CMBMethodNotSupportedException - will be thrown if the method is not supported for the content server.
CMBException - will be thrown for the following errorCode form CMBException.getErrorCode():
  • CMBException.CMB_ERR_SERVER_EXCEPTION: error has occurred at the content server. Call CMBException.getErrorData() to get the original exception object.

clone

public java.lang.Object clone()
Makes a copy of this current item
Overrides:
clone in class java.lang.Object
Returns:
new CMBItem object with contents of this item

copyValuesForClone

protected void copyValuesForClone(CMBItem origItem,
                                  CMBItem newItem)

setSummary

public void setSummary(java.lang.String summary)
Deprecated. Use setInfoMiningRecord. See the documentation on the Information Mining beans.

Sets the summary text for the object represented by this item.
Parameters:
summary - the summary information

getSummary

public java.lang.String getSummary()
Deprecated. Use getInfoMiningRecord. See the documentation on the Information Mining beans.

Returns the summary for the object represented by this item.
Returns:
the summary information as a String object or null if there is no summary information available

setCategories

public void setCategories(java.util.Vector categories)
Deprecated. Use setInfoMiningRecord. See the documentation on the Information Mining beans.

Sets the category information vector for the object represented by this item.
Parameters:
categories - a vector of CMBCategory objects
See Also:
com.ibm.mm.beans.textmining.CMBCategory

getCategories

public java.util.Vector getCategories()
Deprecated. Use getInfoMiningRecord. See the documentation on the Information Mining beans.

Returns the category information for the object represented by this item.
Returns:
the category information as a vector of CMBCategory objects or null if there is no category information available.
See Also:
com.ibm.mm.beans.textmining.util.CMBCategory

setInfoMiningRecord

public void setInfoMiningRecord(com.ibm.mm.beans.infomining.CMBRecord infoMiningRecord)
Sets associates an information mining record. See the reference for the information mining beans for more details.
Parameters:
infoMiningRecord - an information mining record.

getInfoMiningRecord

public com.ibm.mm.beans.infomining.CMBRecord getInfoMiningRecord()
Gets the information mining record associated with this item. See the reference for the information mining beans for more details.
Returns:
an information mining record

sortFolderItems

public void sortFolderItems(java.lang.String server,
                            java.lang.String entity,
                            java.lang.String attribute,
                            boolean ascending)
Sort folder contents if this item is a folder.
Parameters:
server - the name of the content server for the items to be sorted. Item that are not on this server will not be sorted.
entity - the name of the entity to sort by. Any items not of this entity will not be sorted.
attribute - the name of the attribute to sort by.
ascending - if true, the items are sorted in ascending order. If false, the items are sorted in descending order.

toString

public java.lang.String toString()
Overridden to display more informative information on the item
Overrides:
toString in class java.lang.Object

getDDO

public com.ibm.mm.sdk.common.DKDDO getDDO()
Gets the DDO wrapped by this CMBItem.
Returns:
DDO wrapped by this item, or null if no DDO exists. A DDO can be brought into existence using CMBDataManagement.retrieveItem.

EIP JavaBeans

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