com.ibm.interfaces.portal
Interface WPCPortalResponseUtil

All Known Implementing Classes:
PortalResponseUtil

public interface WPCPortalResponseUtil


Method Summary
 java.lang.String constructItemSkeletonResponse(java.util.HashMap infoMap, com.ibm.pim.attribute.AttributeCollection attributeCollection)
          Builds the xml representation containing the information about item attributes
 java.lang.String constructQueryTransactionStatus(java.util.HashMap infoMap)
          Gives the status of the current transaction
 java.lang.String constructResponseForCatalogView(java.util.HashMap infoMap)
           
 java.lang.String constructResponseForCatalogViewList(java.util.HashMap infoMap)
          Fetches the list of all the views available for the catalog that begin with PORTAL_ and the system default view
 java.lang.String constructResponseForGetCatalogs(java.util.HashMap infoMap)
          Fetches the list of all the catalogs for the current context
 java.lang.String constructResponseForGetDocstoreDoc(java.util.HashMap infoMap, java.lang.String validationError)
          Fetches the document from the doc store
 java.lang.String constructResponseForGetResource(java.util.HashMap infoMap)
          this attaches the expected response to the XML response that goes back points to be noted is it supports one resource at a time, as the webservice attachment should not more than 15KB, atleast till now with our exp.
 java.lang.String constructResponseForItemDetailOrClone(java.util.HashMap infoMap, java.lang.Boolean isClone)
          Fetches the details associated with the item for item detail or clone item operation
 java.lang.String constructResponseForItemOperation(java.util.HashMap infoMap, java.lang.String wpcAction)
          Generates the response for either add,modify or delete depending on the command type passed along
 java.lang.String constructResponseForQueryCatalogChildren(java.util.HashMap infoMap)
          Fetches all the catagories associated with the current catalog when the root hierarchy is selected or the items and catagories under the parent category are fetched
 java.lang.String constructResponseForUploadFile(java.util.HashMap infoMap)
          Retrieves the document from the incoming soap attachments ,copies to the default location .Also copies the document to the new location as specified in the request .
 java.lang.String constructResponseQueryTransactionDetails(java.util.HashMap infoMap)
          Retrieves the document containing the transaction details from the docstore if the given transaction id exists
 java.lang.String constructSearchResponse(java.util.HashMap infoMap, java.lang.String validationError)
          Builds the response indicating the success or failure of the result operation
 java.lang.String constructSpecAttributeXML(com.ibm.pim.attribute.AttributeDefinition currentSpecAttrDefinition, java.lang.String attributeName, com.ibm.pim.attribute.AttributeCollection attrCollection, java.util.HashMap infoMap, com.ibm.pim.catalog.item.Item itm)
          Builds the xml representation containing the details of the attributes of the spec associated with the item
 java.lang.String constructUploadResponse(java.util.HashMap infoMap)
          Fetches the document from the path specified in the request and calls the CSV or XLS Helper to upload the content depending on the file type
 java.lang.String getMultiOccurSearchResults(com.ibm.pim.search.SearchResultSet searchResultSet, java.lang.String catalogName, java.util.HashMap infoMap)
          Builds the response containing the result of the search operation
 java.lang.String getResponse(java.util.HashMap infoMap, java.lang.String command)
          Obtains the result of the request passed after processing it appropriately based on the command
 com.ibm.pim.catalog.item.Item getSupplierFilteredItem(com.ibm.pim.catalog.item.Item itm, java.lang.Object supplierID, java.lang.String specName, java.util.HashMap infoMap)
           
 boolean isAttrPathInAttrCollection(java.lang.String attrPath, com.ibm.pim.attribute.AttributeCollection attrCollection)
          Checks if the attribute is present in the given attribute collection
 

Method Detail

isAttrPathInAttrCollection

boolean isAttrPathInAttrCollection(java.lang.String attrPath,
                                   com.ibm.pim.attribute.AttributeCollection attrCollection)
Checks if the attribute is present in the given attribute collection

Parameters:
attrPath - the full path of the attribute
attrCollection - the attribute collection to be checked for attribute
Returns:
true if the specified attribute is present in the attribute collection,returns false otherwise
Throws:
com.ibm.pim.common.exceptions.PIMInternalException
com.ibm.pim.common.exceptions.PIMAuthorizationException

constructSpecAttributeXML

java.lang.String constructSpecAttributeXML(com.ibm.pim.attribute.AttributeDefinition currentSpecAttrDefinition,
                                           java.lang.String attributeName,
                                           com.ibm.pim.attribute.AttributeCollection attrCollection,
                                           java.util.HashMap infoMap,
                                           com.ibm.pim.catalog.item.Item itm)
Builds the xml representation containing the details of the attributes of the spec associated with the item

Parameters:
currentSpecAttrDefinition - the curent attribute definition required to fetch the required information
attributeName - the name of the attribute
attrCollection - the associated attribute collection in which the attribute is searched for
infoMap - the hashmap containing the header information
itm - the item for which the xml representation is to be constructed
Returns:
the xml representation containing the details of the item attributes
Throws:
java.lang.NumberFormatException
com.ibm.pim.common.exceptions.PIMInternalException
com.ibm.pim.common.exceptions.PIMAuthorizationException

constructItemSkeletonResponse

java.lang.String constructItemSkeletonResponse(java.util.HashMap infoMap,
                                               com.ibm.pim.attribute.AttributeCollection attributeCollection)
                                               throws com.ibm.pim.common.exceptions.PIMException
Builds the xml representation containing the information about item attributes

Parameters:
infoMap - the hashMap containing the header information
attributeCollection - the associated attribute collection
Returns:
the xml representation containing all the iformation about the spec name and the item attributes
Throws:
com.ibm.pim.common.exceptions.PIMException

getSupplierFilteredItem

com.ibm.pim.catalog.item.Item getSupplierFilteredItem(com.ibm.pim.catalog.item.Item itm,
                                                      java.lang.Object supplierID,
                                                      java.lang.String specName,
                                                      java.util.HashMap infoMap)
                                                      throws com.ibm.pim.common.exceptions.PIMException
Parameters:
itm - the item whose supplier id information is to be retrieved
supplierID - the supplier id to be checked
specName - the spec associated with the item
infoMap - the hashmap containing the header information
Returns:
Item if the item has the supplier id value as supplierID ,returns null otherwise
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructResponseForItemOperation

java.lang.String constructResponseForItemOperation(java.util.HashMap infoMap,
                                                   java.lang.String wpcAction)
                                                   throws com.ibm.pim.common.exceptions.PIMException
Generates the response for either add,modify or delete depending on the command type passed along

Parameters:
infoMap - the hashmap containing the header information
wpcAction - the command type that specifies either of the three add ,modify or delete
Returns:
the response that indicates the success or failure of the operation
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructResponseForItemDetailOrClone

java.lang.String constructResponseForItemDetailOrClone(java.util.HashMap infoMap,
                                                       java.lang.Boolean isClone)
                                                       throws com.ibm.pim.common.exceptions.PIMInternalException
Fetches the details associated with the item for item detail or clone item operation

Parameters:
infoMap - the hashmap containing the header information
isClone - holds true if the command invoked is clone , else contains false
Returns:
the xml representation of the item operation
Throws:
com.ibm.pim.common.exceptions.PIMInternalException

constructResponseForUploadFile

java.lang.String constructResponseForUploadFile(java.util.HashMap infoMap)
                                                throws com.ibm.pim.common.exceptions.PIMException
Retrieves the document from the incoming soap attachments ,copies to the default location .Also copies the document to the new location as specified in the request .

Parameters:
infoMap - the hashmap containing the header information
Returns:
the response containing the new path to the document
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructUploadResponse

java.lang.String constructUploadResponse(java.util.HashMap infoMap)
                                         throws com.ibm.pim.common.exceptions.PIMException
Fetches the document from the path specified in the request and calls the CSV or XLS Helper to upload the content depending on the file type

Parameters:
infoMap - the hashmap containing the required information
Returns:
the response indicating the success or failure of the operation
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructQueryTransactionStatus

java.lang.String constructQueryTransactionStatus(java.util.HashMap infoMap)
                                                 throws com.ibm.pim.common.exceptions.PIMInternalException
Gives the status of the current transaction

Parameters:
infoMap - the hashmap containing the header information
Returns:
the xml response indicating the status of the transaction
Throws:
java.lang.Exception
com.ibm.pim.common.exceptions.PIMInternalException

constructResponseQueryTransactionDetails

java.lang.String constructResponseQueryTransactionDetails(java.util.HashMap infoMap)
                                                          throws com.ibm.pim.common.exceptions.PIMInternalException
Retrieves the document containing the transaction details from the docstore if the given transaction id exists

Parameters:
infoMap - the hashmap containing the header information
Returns:
notification indicating the success or failure of the operation
Throws:
com.ibm.pim.common.exceptions.PIMInternalException

constructResponseForQueryCatalogChildren

java.lang.String constructResponseForQueryCatalogChildren(java.util.HashMap infoMap)
                                                          throws com.ibm.pim.common.exceptions.PIMException
Fetches all the catagories associated with the current catalog when the root hierarchy is selected or the items and catagories under the parent category are fetched

Parameters:
infoMap - the hash map containing the header information
Returns:
xml representation containing the children and also the notification indicating the success or failure of the operation
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructResponseForGetCatalogs

java.lang.String constructResponseForGetCatalogs(java.util.HashMap infoMap)
                                                 throws com.ibm.pim.common.exceptions.PIMInternalException
Fetches the list of all the catalogs for the current context

Parameters:
infoMap - the hashmap containing the header information
Returns:
xml representation of the list of the catalogs
Throws:
com.ibm.pim.common.exceptions.PIMInternalException

constructResponseForCatalogView

java.lang.String constructResponseForCatalogView(java.util.HashMap infoMap)
Parameters:
infoMap -
Returns:
string containing the response

constructResponseForCatalogViewList

java.lang.String constructResponseForCatalogViewList(java.util.HashMap infoMap)
Fetches the list of all the views available for the catalog that begin with PORTAL_ and the system default view

Parameters:
infoMap - the hashMap containing the header information
Returns:
the xml representation of all the views in the catalog

getMultiOccurSearchResults

java.lang.String getMultiOccurSearchResults(com.ibm.pim.search.SearchResultSet searchResultSet,
                                            java.lang.String catalogName,
                                            java.util.HashMap infoMap)
                                            throws com.ibm.pim.common.exceptions.PIMException
Builds the response containing the result of the search operation

Parameters:
searchResultSet - the result set of the search operation
catalogName - the current catalog selected by the user
infoMap - the hash map containing the header information
Returns:
the result of the search operation
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructSearchResponse

java.lang.String constructSearchResponse(java.util.HashMap infoMap,
                                         java.lang.String validationError)
Builds the response indicating the success or failure of the result operation

Parameters:
infoMap - the hashmap containing the header information
validationError - the validation error string
Returns:
the response indicating the success or failure

getResponse

java.lang.String getResponse(java.util.HashMap infoMap,
                             java.lang.String command)
                             throws com.ibm.pim.common.exceptions.PIMException
Obtains the result of the request passed after processing it appropriately based on the command

Parameters:
infoMap -
command - the command type passed in the request
Returns:
the result of the request
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructResponseForGetResource

java.lang.String constructResponseForGetResource(java.util.HashMap infoMap)
                                                 throws com.ibm.pim.common.exceptions.PIMException
this attaches the expected response to the XML response that goes back points to be noted is it supports one resource at a time, as the webservice attachment should not more than 15KB, atleast till now with our exp. we were not able to send more than this in the attachments if the given attribute's type is other than BINARY/IMAGE/THUMBNAIL_IMAGE foult code will be sent back

Parameters:
infoMap -
Returns:
string containing the response
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalArgumentException

constructResponseForGetDocstoreDoc

java.lang.String constructResponseForGetDocstoreDoc(java.util.HashMap infoMap,
                                                    java.lang.String validationError)
                                                    throws com.ibm.pim.common.exceptions.PIMException
Fetches the document from the doc store

Parameters:
infoMap -
validationError -
Returns:
notification indicating success or failure
Throws:
com.ibm.pim.common.exceptions.PIMException
com.ibm.pim.common.exceptions.PIMInternalException
java.lang.IllegalStateException