|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.beans.CMBItem
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:
CMBSearchResults
,
CMBDataManagement
, Serialized FormField Summary | |
protected java.lang.String |
_nameAttr
|
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 |
protected java.lang.String _nameAttr
Constructor Detail |
public CMBItem()
public CMBItem(java.lang.String pidString)
Item type is currently set to CMBBaseConstant.CMB_TYPE_UNKNOWN until the item is retrieved from the back-end server.
pidString
- item identification valueMethod Detail |
public void setItem(com.ibm.mm.sdk.common.DKDDO ddoObj, CMBConnection connBean, java.lang.String attrName)
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.
ddoObj
- the DDO to associate with this itemconnBean
- the connection BeanattrName
- the attribute to use as the name of the itempublic java.lang.String getName() throws CMBException
CMBException
- with the following errorID:
public void setName(java.lang.String name)
name
- item namepublic java.lang.String getPidString()
getPidString
in interface CMBHitItem
public void setPidString(java.lang.String pidString)
pidString
- item persistent IDpublic int getAttrCount() throws CMBException
CMBException
- with the following errorID:
public java.lang.String[] getAttrName() throws CMBException
public java.lang.String[] getAttrNames() throws CMBException
CMBException
- with the following errorID:
public java.lang.String getAttrName(int index) throws java.lang.ArrayIndexOutOfBoundsException, CMBException
index
- the attribute indexCMBException
- with the following errorID:
java.lang.ArrayIndexOutOfBoundsException
- index is invalid.public boolean isAttr(java.lang.String name) throws CMBException
public java.lang.String[] getAttrValue() throws CMBException
getAttrValue
in interface CMBHitItem
public java.lang.String[] getAttrValues() throws CMBException
CMBException
- with the following errorID:
public java.lang.String[] getAttrValues(java.lang.String attr) throws CMBException
attr
- attribute nameCMBException
- with the following errorID:
public java.lang.String getAttrValue(int index) throws java.lang.ArrayIndexOutOfBoundsException, CMBException
getAttrValue
in interface CMBHitItem
index
- the attribute indexCMBException
- with the following errorID:
java.lang.ArrayIndexOutOfBoundsException
- index is invalid.public void setRetrieved(boolean isRetrieved)
isRetrieved
- false if want to retrieve fresh data from server.public boolean isRetrieved()
public boolean isResourceItem()
public boolean equals(java.lang.Object itemObj)
equals
in interface CMBHitItem
equals
in class java.lang.Object
itemObj
- item object to compare to this itempublic int hashCode()
hashCode
in class java.lang.Object
public int getRanking()
getRanking
in interface CMBHitItem
public short getItemType()
getItemType
in interface CMBHitItem
public void setItemType(short itemType)
itemType
- on of the following:
public void addAttr(java.lang.String attr, java.lang.String value, short type) throws CMBException
attr
- attribute namevalue
- attribute valuetype
- attribute typeCMBException
- if the following error id:
public void addAttr(java.lang.String attr, CMBItem[] value, short type) throws CMBException
attr
- attribute namevalue
- attribute value, an array of CMBItemstype
- attribute typeCMBException
- if the following error id:
public void addAttr(java.lang.String attr, CMBObject[] value, short type) throws CMBException
attr
- attribute namevalue
- attribute value, an array of CMBObjectstype
- attribute typeCMBException
- if the following error id:
public void addAttrItem(java.lang.String attr, CMBItem item) throws CMBException
attr
- attribute nameitem
- attribute itemCMBException
- if the following error id:
public void addAttrObject(java.lang.String attr, CMBObject object) throws CMBException
attr
- attribute nameobject
- attribute objectCMBException
- if the following error id:
public void setAttr(java.lang.String[] names)
names
- array of attribute namespublic void setAttrNames(java.lang.String[] names)
names
- array of attribute namespublic void setAttrValues(java.lang.String[] attrValues)
attrValues
- array of attribute valuespublic void setAttrTypes(short[] attrTypes)
attrValues
- array of attribute typespublic void removeAllAttrs()
public void removeAttr(java.lang.String attrName) throws CMBException
attrName
- attribute name to be removedCMBException
- with the following errorID:
public void removeAttrItem(java.lang.String attrName, CMBItem item) throws CMBException
attrName
- attribute name to be removedCMBException
- with the following errorID:
public void removeAttrObject(java.lang.String attrName, CMBObject object) throws CMBException
attrName
- attribute name to be removedCMBException
- with the following errorID:
public java.lang.String getAttrValue(java.lang.String attr) throws CMBException
attr
- attribute nameCMBException
- with the following errorID:
public short[] getAttrType() throws CMBException
public short[] getAttrTypes() throws CMBException
public short getAttrType(java.lang.String attr) throws CMBException
attr
- attribute nameCMBException
- with the following errorID:
public void setAttrValue(java.lang.String attr, java.lang.String value) throws CMBException
attr
- attribute namevalue
- attribute valueCMBException
- if attribute is not exist, errorId = CMBException.CMB_ERR_ATTR_NOT_EXIST.public void setAttrItems(java.lang.String attr, CMBItem[] items) throws CMBException
attr
- attribute nameitem
- attribute itemCMBException
- if attribute does not exist, errorId = CMBException.CMB_ERR_ATTR_NOT_EXIST.public void setAttrObjects(java.lang.String attr, CMBObject[] objects) throws CMBException
attr
- attribute nameobject
- attribute objectCMBException
- if attribute does not exist, errorId = CMBException.CMB_ERR_ATTR_NOT_EXIST.public CMBItem[] getAttrItems(java.lang.String attr) throws CMBException
attr
- attribute nameCMBException
- with the following errorID:
public CMBObject[] getAttrObjects(java.lang.String attr) throws CMBException
attr
- attribute nameCMBException
- with the following errorID:
public java.lang.String getComponentId()
public java.sql.Timestamp getCreateTimestamp()
public java.lang.String getCreateUserid()
public java.sql.Timestamp getLastChangedTimestamp()
public java.lang.String getLastChangedUserid()
public void setEntityName(java.lang.String newEntityName)
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.
newEntityName
- name of new associated entitypublic java.lang.String getEntityName()
public java.lang.String getItemId()
public java.lang.String getServerName() throws CMBException
CMBException
- although declared to throw this exception, currently it will
not be thrown in any situation.public void setServerName(java.lang.String name)
name
- server namepublic java.lang.String getServerType() throws CMBException
CMBException
- although declared to throw this exception, currently it will
not be thrown in any situation.public void setServerType(java.lang.String type)
type
- server typepublic java.awt.Image getThumbnail()
public void setThumbnail(java.awt.Image thumbnail)
thumbnail
- new thumbnail imagepublic java.lang.String getVersion()
public boolean isMapped()
public void setConnection(CMBConnection conn)
conn
- reference of connection beanpublic CMBConnection getConnection()
public void addFolderItem(CMBItem newItem) throws CMBServerAccessErrorException, CMBNoConnectionException, CMBException
anItem
- the item to be added to this folderCMBServerAccessErrorException
- when the server is no longer availableCMBNoConnectionException
- 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():
public void removeFolderItem(CMBItem anItem) throws CMBNoConnectionException, CMBItemNotExistException, CMBException
anItem
- the item to be removed from this folderCMBItemNotExistException
- 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():
public java.util.Vector listFolderItems() throws CMBNoConnectionException, CMBException
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():
public CMBItem getFolderItem(int index) throws CMBNoConnectionException, CMBException, java.lang.ArrayIndexOutOfBoundsException
index
- the index of item in this folder objectCMBNoConnectionException
- 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():
ArrayOutOfBoundsException
- if index is invalid.public java.util.Vector listRefFolders() throws CMBMethodNotSupportedException, CMBException
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():
public java.lang.Object clone()
clone
in class java.lang.Object
protected void copyValuesForClone(CMBItem origItem, CMBItem newItem)
public void setSummary(java.lang.String summary)
summary
- the summary informationpublic java.lang.String getSummary()
public void setCategories(java.util.Vector categories)
categories
- a vector of CMBCategory objectscom.ibm.mm.beans.textmining.CMBCategory
public java.util.Vector getCategories()
com.ibm.mm.beans.textmining.util.CMBCategory
public void setInfoMiningRecord(com.ibm.mm.beans.infomining.CMBRecord infoMiningRecord)
infoMiningRecord
- an information mining record.public com.ibm.mm.beans.infomining.CMBRecord getInfoMiningRecord()
public void sortFolderItems(java.lang.String server, java.lang.String entity, java.lang.String attribute, boolean ascending)
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.public java.lang.String toString()
toString
in class java.lang.Object
public com.ibm.mm.sdk.common.DKDDO getDDO()
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |