com.ibm.ccd.portal
Class PortalCSVHelper

java.lang.Object
  extended by com.ibm.ccd.portal.PortalCSVHelper
All Implemented Interfaces:
WPCPortalCSVHelper

public class PortalCSVHelper
extends java.lang.Object
implements WPCPortalCSVHelper


Constructor Summary
PortalCSVHelper()
           
 
Method Summary
 boolean checkMultiOccurence(com.ibm.pim.attribute.AttributeInstance attrInstance, java.lang.String attrPath)
          checks if the attribute is multi-occuring or not
 void populateItem(com.ibm.pim.catalog.item.Item itm, java.util.HashMap hmAttrPathToValues, java.lang.String attrPath, java.util.HashMap infoMap)
          sets the attributes of an item to their corresponding values,the values are contained in the hashMap
 void setValueForItemAttribute(com.ibm.pim.attribute.AttributeInstance itemAttInstance, java.lang.String attributeValue, com.ibm.pim.catalog.item.Item itm, java.util.HashMap infoMap)
          Sets the value for an item attribute
 java.lang.String[] uploadCSVcontent(java.lang.String strDocPath, java.util.HashMap infoMap, java.lang.String CVS_OR_XLS)
          Reades the content from the CSV document and populates the item with the values and saves it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalCSVHelper

public PortalCSVHelper()
Method Detail

checkMultiOccurence

public boolean checkMultiOccurence(com.ibm.pim.attribute.AttributeInstance attrInstance,
                                   java.lang.String attrPath)
                            throws com.ibm.pim.common.exceptions.PIMException,
                                   com.ibm.pim.common.exceptions.PIMInternalException,
                                   java.lang.IllegalArgumentException
Description copied from interface: WPCPortalCSVHelper
checks if the attribute is multi-occuring or not

Specified by:
checkMultiOccurence in interface WPCPortalCSVHelper
attrPath - A string containing the path in the spec.
Returns:
boolean value returns true if the attribute is multioccurrence
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

setValueForItemAttribute

public void setValueForItemAttribute(com.ibm.pim.attribute.AttributeInstance itemAttInstance,
                                     java.lang.String attributeValue,
                                     com.ibm.pim.catalog.item.Item itm,
                                     java.util.HashMap infoMap)
                              throws com.ibm.pim.common.exceptions.PIMException,
                                     com.ibm.pim.common.exceptions.PIMInternalException,
                                     java.lang.IllegalArgumentException
Description copied from interface: WPCPortalCSVHelper
Sets the value for an item attribute

Specified by:
setValueForItemAttribute in interface WPCPortalCSVHelper
Parameters:
itemAttInstance - A attributeInstance object to return the entry node.
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

populateItem

public void populateItem(com.ibm.pim.catalog.item.Item itm,
                         java.util.HashMap hmAttrPathToValues,
                         java.lang.String attrPath,
                         java.util.HashMap infoMap)
                  throws com.ibm.pim.common.exceptions.PIMException,
                         java.lang.IllegalArgumentException
Description copied from interface: WPCPortalCSVHelper
sets the attributes of an item to their corresponding values,the values are contained in the hashMap

Specified by:
populateItem in interface WPCPortalCSVHelper
Parameters:
itm - An item object to be populated
hmAttrPathToValues - A hashMap of attribute path and their values.
Throws:
com.ibm.pim.common.exceptions.PIMException
java.lang.IllegalArgumentException

uploadCSVcontent

public java.lang.String[] uploadCSVcontent(java.lang.String strDocPath,
                                           java.util.HashMap infoMap,
                                           java.lang.String CVS_OR_XLS)
                                    throws com.ibm.pim.common.exceptions.PIMException,
                                           com.ibm.pim.common.exceptions.PIMInternalException,
                                           java.lang.IllegalArgumentException
Description copied from interface: WPCPortalCSVHelper
Reades the content from the CSV document and populates the item with the values and saves it

Specified by:
uploadCSVcontent in interface WPCPortalCSVHelper
Parameters:
strDocPath - A string that contains path to the document.
Returns:
An array containing the return string and code
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException