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

java.lang.Object
  extended by com.ibm.ccd.ui.dataobjects.items.CatalogItemGenerator

public class CatalogItemGenerator
extends java.lang.Object

Provides the functionality to generate the CatalogItem XMLs for various user actions like getting spec/details/create/update/delete/clone etc. Note: This comp. is not optimized for the XML generation, presently it uses the Stringbuffer, A better option could be making serialized dom elements and setting values using DOM.. but this may have little overhead in mem. usage. Need to re-look at the design again..


Field Summary
static java.lang.String COMP_NAME
           
 
Constructor Summary
CatalogItemGenerator()
           
 
Method Summary
protected static java.lang.String generateAttributesXML(Attribute[] attributes)
          Generates the attribute list xml for the item.
protected static void generateAttributeXML(Attribute attr, java.lang.StringBuffer xmlBuffer, java.util.Map cacheTemplatesMap)
           
static java.lang.String prepareCatalogSpecRequestXML(java.lang.String parentCategory, java.lang.String catalogID)
          Prepares the WPC specific XML request for getting the catalog specification.
static java.lang.String prepareItemAddRequestXML(ICatalogItem item)
          Prepares the WPC specific XML request for creating the item
static java.lang.String prepareItemCloneRequestXML(java.lang.String parentCtgyID, java.lang.String catalogID, java.lang.String itemID)
          Prepares the WPC specific XML request for getting the item clone.
static java.lang.String prepareItemDeleteRequestXML(java.lang.String parenetCategory, java.lang.String catalogID, java.lang.String itemID)
          Prepares the WPC specific XML request for deleting the item
static java.lang.String prepareItemDetailsRequestXML(java.lang.String parentCtgyID, java.lang.String catalogID, java.lang.String itemID)
          Prepares the WPC specific XML request for getting the item details.
static java.lang.String prepareItemUpdateRequestXML(ICatalogItem item)
          Prepares the WPC specific XML request for updating the item
static java.lang.String prepareLookupTableSpecRequestXML(java.lang.String lookupID)
          Prepares the WPC specific XML request for getting the catalog specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMP_NAME

public static final java.lang.String COMP_NAME
See Also:
Constant Field Values
Constructor Detail

CatalogItemGenerator

public CatalogItemGenerator()
Method Detail

prepareCatalogSpecRequestXML

public static java.lang.String prepareCatalogSpecRequestXML(java.lang.String parentCategory,
                                                            java.lang.String catalogID)
Prepares the WPC specific XML request for getting the catalog specification.


prepareLookupTableSpecRequestXML

public static java.lang.String prepareLookupTableSpecRequestXML(java.lang.String lookupID)
Prepares the WPC specific XML request for getting the catalog specification.


prepareItemDetailsRequestXML

public static java.lang.String prepareItemDetailsRequestXML(java.lang.String parentCtgyID,
                                                            java.lang.String catalogID,
                                                            java.lang.String itemID)
Prepares the WPC specific XML request for getting the item details.


prepareItemCloneRequestXML

public static java.lang.String prepareItemCloneRequestXML(java.lang.String parentCtgyID,
                                                          java.lang.String catalogID,
                                                          java.lang.String itemID)
Prepares the WPC specific XML request for getting the item clone. Note: The request xml is same as that of item details


prepareItemAddRequestXML

public static java.lang.String prepareItemAddRequestXML(ICatalogItem item)
Prepares the WPC specific XML request for creating the item


prepareItemUpdateRequestXML

public static java.lang.String prepareItemUpdateRequestXML(ICatalogItem item)
Prepares the WPC specific XML request for updating the item


prepareItemDeleteRequestXML

public static java.lang.String prepareItemDeleteRequestXML(java.lang.String parenetCategory,
                                                           java.lang.String catalogID,
                                                           java.lang.String itemID)
Prepares the WPC specific XML request for deleting the item


generateAttributesXML

protected static java.lang.String generateAttributesXML(Attribute[] attributes)
Generates the attribute list xml for the item.


generateAttributeXML

protected static void generateAttributeXML(Attribute attr,
                                           java.lang.StringBuffer xmlBuffer,
                                           java.util.Map cacheTemplatesMap)
Parameters:
attr -
xmlBuffer -
cacheTemplatesMap -