com.ibm.ccd.ui.dataobjects.items
Class CatalogItem

java.lang.Object
  extended by com.ibm.ccd.ui.dataobjects.items.CatalogItem
All Implemented Interfaces:
IDataBean, ICatalogItem, java.io.Serializable

public class CatalogItem
extends java.lang.Object
implements ICatalogItem, java.io.Serializable

Represents the WPC Catalog Item/Spec The CatalogItem must have catalogID and itemID (PrimaryKey) values and composes several Attributes

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ibm.ccd.ui.dataobjects.items.ICatalogItem
CATALOG_ID, ITEM_ID, PARENT_CATEGORY_ID
 
Constructor Summary
CatalogItem()
           
CatalogItem(java.lang.String catalogID, Attribute[] attributes)
           
CatalogItem(java.lang.String parentCategory, java.lang.String catalogID, java.lang.String catalogVersion, Attribute[] attributes)
           
CatalogItem(java.lang.String parentCategoryID, java.lang.String catalogID, java.lang.String catalogVersion, java.lang.String itemID, Attribute[] attributes)
           
 
Method Summary
protected  void checkMandataoryAttribute(Attribute attribute, org.apache.jetspeed.portlet.PortletRequest portletRequest, MessageMap messageMap)
           
protected  void checkMandatoryCriteria(java.lang.String parameter, Attribute attribute, org.apache.jetspeed.portlet.PortletRequest portletRequest, MessageMap messageMap)
           
 void fromXML(org.w3c.dom.Node domNode)
          The XML parsing capability is externilzed to CatalogItemParser
 void fromXML(java.lang.String xml)
          Decodes the XML string and sets the element values as the bean properties
 java.lang.String getAssociateWFCatalogID()
           
 Attribute getAttribute(java.lang.String name)
           
 Attribute getAttributeFromGroupPath(Attribute[] attribs, java.lang.String attribPath)
          attribPath should contain both groupId and attributeId
 Attribute getAttributeFromGroupPath(java.lang.String attribPath)
          attribPath should contain both groupId and attrubuteId
 Attribute getAttributeFromhashValue(java.lang.String hashValue)
           
 Attribute getAttributeFromPath(java.lang.String attribPath)
           
static java.lang.String getAttributeID(java.lang.String attribParam)
           
 java.util.HashMap getAttributeMap()
           
 java.lang.String getAttributeNameFromhashValue(java.lang.String hashValue)
           
static java.lang.String getAttributeOcc(java.lang.String attribParam)
           
 Attribute[] getAttributes()
           
 Attribute[] getAttributesFromGroupPath(Attribute[] attribs, java.lang.String attribPath)
           
 Attribute[] getAttributesFromGroupPath(java.lang.String attribPath)
           
 java.lang.String getCatalogID()
          Deprecated.  
 java.lang.String getCatalogVersion()
           
protected  java.util.List getChangedValueList(java.lang.String changedValues)
           
 CollaborationArea getCollaborationArea()
           
 java.lang.String getCreateFailureView()
           
 java.lang.String getCreateSuccessView()
           
 java.lang.String getCreateView()
           
 java.util.HashMap getDownloadAttributeMap()
           
 java.util.ArrayList getFlatAttributeList()
           
 java.util.HashMap getFlatAttributeMap()
           
 Attribute getGroupAttribute(Attribute attribute)
           
static java.lang.String getGroupAttributeID(java.lang.String attribParam)
           
static java.lang.String getGroupAttributeOcc(java.lang.String attribParam)
           
 java.lang.String getItemID()
           
 java.lang.String getListView()
           
 java.lang.String getParentCategoryID()
           
 Attribute getPrimaryKeyAttr()
           
 Attribute getPrimaryKeyAttr(Attribute[] attrArry)
           
 java.lang.String getPrimaryKeyValue()
          returns the value of the Primary key attribute
 java.lang.String getPrintView()
           
 java.lang.String getUpdateFailureView()
           
 java.lang.String getUpdateSuccessView()
           
 java.lang.String getUpdateView()
           
protected  boolean hasValueChanged(Attribute attribute)
           
 boolean isBworkflowItem()
           
 boolean isValidGroupAttributePath(java.lang.String attribPath)
           
 Attribute preparePrimaryKeyAttr(Attribute[] attrArry)
           
 void printMe()
           
 void setAssociateWFCatalogID(java.lang.String associateWFCatalogID)
           
 void setAttributes(Attribute[] attributes)
           
 void setBworkflowItem(boolean bworkflowItem)
           
 void setCatalogID(java.lang.String catalogID)
           
 void setCatalogVersion(java.lang.String ctgVersion)
           
 void setCollaborationArea(CollaborationArea collabArea)
           
 void setCreateFailureView(java.lang.String createFailureJSP)
           
 void setCreateSuccessView(java.lang.String createSuccessJSP)
           
 void setCreateView(java.lang.String createJSP)
           
 void setItemID(java.lang.String itemID)
           
 void setListView(java.lang.String listJSP)
           
 void setParentCategoryID(java.lang.String parCtgyID)
           
 void setPrintView(java.lang.String printJSP)
           
 MessageMap setProperty(org.apache.jetspeed.portlet.PortletRequest portletRequest, java.lang.String specAttributeName)
          Deprecated.  
 void setUpdateFailureView(java.lang.String updateFailureJSP)
           
 void setUpdateSuccessView(java.lang.String updateSuccessJSP)
           
 void setUpdateView(java.lang.String updateJSP)
           
 java.lang.String toXML()
          The XML generation capability is externilzed to CatalogItemXMLGenerator
 void updateAttribProperty(Attribute attribute, org.apache.jetspeed.portlet.PortletRequest portletRequest, MessageMap messageMap)
           
 MessageMap updateProperties(org.apache.jetspeed.portlet.PortletRequest portletRequest)
          updates the properties of the bean from the portlet request
 MessageMap updateProperty(org.apache.jetspeed.portlet.PortletRequest portletRequest, java.lang.String attribName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogItem

public CatalogItem()

CatalogItem

public CatalogItem(java.lang.String parentCategory,
                   java.lang.String catalogID,
                   java.lang.String catalogVersion,
                   Attribute[] attributes)

CatalogItem

public CatalogItem(java.lang.String catalogID,
                   Attribute[] attributes)

CatalogItem

public CatalogItem(java.lang.String parentCategoryID,
                   java.lang.String catalogID,
                   java.lang.String catalogVersion,
                   java.lang.String itemID,
                   Attribute[] attributes)
Method Detail

getCatalogID

public java.lang.String getCatalogID()
Deprecated. 

Specified by:
getCatalogID in interface ICatalogItem

setCatalogID

public void setCatalogID(java.lang.String catalogID)
Specified by:
setCatalogID in interface ICatalogItem

getItemID

public java.lang.String getItemID()
Specified by:
getItemID in interface ICatalogItem

setItemID

public void setItemID(java.lang.String itemID)
Specified by:
setItemID in interface ICatalogItem

getCreateView

public java.lang.String getCreateView()
Specified by:
getCreateView in interface ICatalogItem

getCreateSuccessView

public java.lang.String getCreateSuccessView()
Specified by:
getCreateSuccessView in interface ICatalogItem

getCreateFailureView

public java.lang.String getCreateFailureView()
Specified by:
getCreateFailureView in interface ICatalogItem

setCreateView

public void setCreateView(java.lang.String createJSP)
Specified by:
setCreateView in interface ICatalogItem

setCreateSuccessView

public void setCreateSuccessView(java.lang.String createSuccessJSP)
Specified by:
setCreateSuccessView in interface ICatalogItem

setCreateFailureView

public void setCreateFailureView(java.lang.String createFailureJSP)
Specified by:
setCreateFailureView in interface ICatalogItem

getUpdateView

public java.lang.String getUpdateView()
Specified by:
getUpdateView in interface ICatalogItem

getUpdateSuccessView

public java.lang.String getUpdateSuccessView()
Specified by:
getUpdateSuccessView in interface ICatalogItem

getUpdateFailureView

public java.lang.String getUpdateFailureView()
Specified by:
getUpdateFailureView in interface ICatalogItem

setUpdateView

public void setUpdateView(java.lang.String updateJSP)
Specified by:
setUpdateView in interface ICatalogItem

setUpdateSuccessView

public void setUpdateSuccessView(java.lang.String updateSuccessJSP)
Specified by:
setUpdateSuccessView in interface ICatalogItem

setUpdateFailureView

public void setUpdateFailureView(java.lang.String updateFailureJSP)
Specified by:
setUpdateFailureView in interface ICatalogItem

getPrintView

public java.lang.String getPrintView()
Specified by:
getPrintView in interface ICatalogItem

getListView

public java.lang.String getListView()
Specified by:
getListView in interface ICatalogItem

setPrintView

public void setPrintView(java.lang.String printJSP)
Specified by:
setPrintView in interface ICatalogItem

setListView

public void setListView(java.lang.String listJSP)
Specified by:
setListView in interface ICatalogItem

setAttributes

public void setAttributes(Attribute[] attributes)

getAttributes

public Attribute[] getAttributes()
Specified by:
getAttributes in interface ICatalogItem

getAttribute

public Attribute getAttribute(java.lang.String name)
Specified by:
getAttribute in interface ICatalogItem

fromXML

public void fromXML(org.w3c.dom.Node domNode)
The XML parsing capability is externilzed to CatalogItemParser

Specified by:
fromXML in interface IDataBean

fromXML

public void fromXML(java.lang.String xml)
Description copied from interface: IDataBean
Decodes the XML string and sets the element values as the bean properties

Specified by:
fromXML in interface IDataBean

setProperty

public MessageMap setProperty(org.apache.jetspeed.portlet.PortletRequest portletRequest,
                              java.lang.String specAttributeName)
                       throws java.text.ParseException
Deprecated. 

Specified by:
setProperty in interface ICatalogItem
Throws:
java.text.ParseException
See Also:
updateProperty(PortletRequest portletRequest,String attribName)

checkMandataoryAttribute

protected void checkMandataoryAttribute(Attribute attribute,
                                        org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                        MessageMap messageMap)

toXML

public java.lang.String toXML()
The XML generation capability is externilzed to CatalogItemXMLGenerator

Specified by:
toXML in interface IDataBean

getAttributeMap

public java.util.HashMap getAttributeMap()
Specified by:
getAttributeMap in interface ICatalogItem

getCatalogVersion

public java.lang.String getCatalogVersion()
Specified by:
getCatalogVersion in interface ICatalogItem

getParentCategoryID

public java.lang.String getParentCategoryID()
Specified by:
getParentCategoryID in interface ICatalogItem

setCatalogVersion

public void setCatalogVersion(java.lang.String ctgVersion)
Specified by:
setCatalogVersion in interface ICatalogItem

setParentCategoryID

public void setParentCategoryID(java.lang.String parCtgyID)
Specified by:
setParentCategoryID in interface ICatalogItem

printMe

public void printMe()
Specified by:
printMe in interface ICatalogItem

getPrimaryKeyValue

public java.lang.String getPrimaryKeyValue()
returns the value of the Primary key attribute

Specified by:
getPrimaryKeyValue in interface ICatalogItem

getPrimaryKeyAttr

public Attribute getPrimaryKeyAttr()
Specified by:
getPrimaryKeyAttr in interface ICatalogItem

getPrimaryKeyAttr

public Attribute getPrimaryKeyAttr(Attribute[] attrArry)
Specified by:
getPrimaryKeyAttr in interface ICatalogItem

preparePrimaryKeyAttr

public Attribute preparePrimaryKeyAttr(Attribute[] attrArry)

getFlatAttributeMap

public java.util.HashMap getFlatAttributeMap()
Specified by:
getFlatAttributeMap in interface ICatalogItem
Returns:
hashmap

getFlatAttributeList

public java.util.ArrayList getFlatAttributeList()
Returns:
flatAttributeList

getCollaborationArea

public CollaborationArea getCollaborationArea()
Specified by:
getCollaborationArea in interface ICatalogItem
See Also:
ICatalogItem.getCollaborationArea()

setCollaborationArea

public void setCollaborationArea(CollaborationArea collabArea)
Specified by:
setCollaborationArea in interface ICatalogItem
See Also:
ICatalogItem.setCollaborationArea(com.ibm.ccd.ui.dataobjects.workflow.CollaborationArea)

updateProperty

public MessageMap updateProperty(org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                 java.lang.String attribName)

updateProperties

public MessageMap updateProperties(org.apache.jetspeed.portlet.PortletRequest portletRequest)
Description copied from interface: IDataBean
updates the properties of the bean from the portlet request

Specified by:
updateProperties in interface IDataBean
Parameters:
portletRequest - - The portletrequest containing the prperties to represent.
Returns:
MessageMap - null/empy in case of no errors - populated with the appropriate list in case of errors

updateAttribProperty

public void updateAttribProperty(Attribute attribute,
                                 org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                 MessageMap messageMap)

checkMandatoryCriteria

protected void checkMandatoryCriteria(java.lang.String parameter,
                                      Attribute attribute,
                                      org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                      MessageMap messageMap)

getAttributeFromhashValue

public Attribute getAttributeFromhashValue(java.lang.String hashValue)

getAttributeNameFromhashValue

public java.lang.String getAttributeNameFromhashValue(java.lang.String hashValue)

getAttributeFromPath

public Attribute getAttributeFromPath(java.lang.String attribPath)
Parameters:
attribPath - is GroupID/GroupOcc/AttribID/AttribOcc
Returns:
attribute

getAttributeFromGroupPath

public Attribute getAttributeFromGroupPath(java.lang.String attribPath)
                                    throws java.lang.Exception
attribPath should contain both groupId and attrubuteId

Parameters:
attribPath -
Returns:
attribute
Throws:
java.lang.Exception

getAttributeFromGroupPath

public Attribute getAttributeFromGroupPath(Attribute[] attribs,
                                           java.lang.String attribPath)
                                    throws java.lang.Exception
attribPath should contain both groupId and attributeId

Parameters:
attribs -
attribPath -
Returns:
attribute
Throws:
java.lang.Exception

getAttributesFromGroupPath

public Attribute[] getAttributesFromGroupPath(java.lang.String attribPath)
                                       throws java.lang.Exception
Parameters:
attribPath - is GroupID_GroupOcc_GroupID_GroupOcc_GroupID_GroupOcc
Returns:
attributes
Throws:
java.lang.Exception

getAttributesFromGroupPath

public Attribute[] getAttributesFromGroupPath(Attribute[] attribs,
                                              java.lang.String attribPath)
                                       throws java.lang.Exception
Parameters:
attribPath - is GroupID_GroupOcc_GroupID_GroupOcc_GroupID_GroupOcc
Returns:
attributes
Throws:
java.lang.Exception

isValidGroupAttributePath

public boolean isValidGroupAttributePath(java.lang.String attribPath)

getGroupAttribute

public Attribute getGroupAttribute(Attribute attribute)

getGroupAttributeID

public static java.lang.String getGroupAttributeID(java.lang.String attribParam)

getGroupAttributeOcc

public static java.lang.String getGroupAttributeOcc(java.lang.String attribParam)

getAttributeID

public static java.lang.String getAttributeID(java.lang.String attribParam)

getAttributeOcc

public static java.lang.String getAttributeOcc(java.lang.String attribParam)

hasValueChanged

protected boolean hasValueChanged(Attribute attribute)

getChangedValueList

protected java.util.List getChangedValueList(java.lang.String changedValues)

getDownloadAttributeMap

public java.util.HashMap getDownloadAttributeMap()
Specified by:
getDownloadAttributeMap in interface ICatalogItem
Returns:
HashMap return the attribute Map for Item Download

isBworkflowItem

public boolean isBworkflowItem()
Specified by:
isBworkflowItem in interface ICatalogItem
Returns:
Returns the bworkflowItem.

setBworkflowItem

public void setBworkflowItem(boolean bworkflowItem)
Specified by:
setBworkflowItem in interface ICatalogItem
Parameters:
bworkflowItem - The bworkflowItem to set.

getAssociateWFCatalogID

public java.lang.String getAssociateWFCatalogID()
Specified by:
getAssociateWFCatalogID in interface ICatalogItem
Returns:
Returns the associateWFCatalogID.

setAssociateWFCatalogID

public void setAssociateWFCatalogID(java.lang.String associateWFCatalogID)
Specified by:
setAssociateWFCatalogID in interface ICatalogItem
Parameters:
associateWFCatalogID - The associateWFCatalogID to set.