public class GetElectronicCatalogRequest extends ProductRequest
Modifier and Type | Field and Description |
---|---|
protected org.w3c.dom.Element | electronicCatalogElement_
electronicCatalogElement_ contains the request document's ElectronicCatalog element.
|
Constructor and Description |
---|
GetElectronicCatalogRequest()
Default constructor to create a new request handler.
|
Modifier and Type | Method and Description |
---|---|
protected org.w3c.dom.Element | createDataAreaElement()
This method builds the DataArea element and adds it as a child of rootElement_.
|
protected org.w3c.dom.Element | createElectronicCatalogElement()
This method builds the ElectronicCatalog element and adds it as a child of dataAreaElement_.
|
protected org.w3c.dom.Element | createSenderElement()
This method builds the Sender element and adds it as a child of applicationAreaElement_.
|
protected java.lang.String | determineProductType(org.w3c.dom.Element electronicCatalogElement)
This method determines the product type for the specified ElectronicCatalog element.
|
protected org.w3c.dom.Document | getRequestBod()
This method constructs the request document.
|
protected Session | getResponseData()
This method returns the unmarshalled response data in the form of a com.ibm.commerce.telesales.model.GenericGet object.
|
ServiceContext | getServiceContext()
This method returns the ServiceContext object specific to this request.
|
protected java.lang.String | getXSDFileName()
This method returns the name of the schema file for the request BOD (business object document).
|
protected void | unmarshallCatalogItemLine(Product product, org.w3c.dom.Element catalogItemLineElement)
This method unmarshalls the CatalogItemLine element.
|
protected void | unmarshallDataArea(GenericGet get, org.w3c.dom.Element dataAreaElement)
This method unmarshalls the DataArea element.
|
protected void | unmarshallDocumentId(Product product, org.w3c.dom.Element documentIdElement)
This method unmarshalls the DocumentId element.
|
protected void | unmarshallECHeader(Product product, org.w3c.dom.Element ecHeaderElement)
This method unmarshalls the oa:ECHeader element.
|
protected void | unmarshallElectronicCatalog(Product product, org.w3c.dom.Element electronicCatalogElement)
This method unmarshalls the ElectronicCatalog element.
|
protected void | unmarshallFeature(Product product, org.w3c.dom.Element featureElement)
Unmarshalls the Feature element.
|
protected void | unmarshallImages(Product product, org.w3c.dom.Element imagesElement)
This method unmarshalls the Images element.
|
protected void | unmarshallItemClassification(Product product, org.w3c.dom.Element itemClassificationElement)
This method unmarshalls the ItemClassification element.
|
protected void | unmarshallItemId(Product product, org.w3c.dom.Element itemIdElement)
This method unmarshalls the ItemId element.
|
protected void | unmarshallItemPrice(Product product, org.w3c.dom.Element itemPriceElement)
This method unmarshalls the UnitPrice element.
|
protected void | unmarshallItemPrices(Product product, java.util.ArrayList priceList)
This method unmarshalls the ItemPrice elements.
|
protected void | unmarshallParties(Product product, org.w3c.dom.Element partiesElement)
This method unmarshalls the Parties element.
|
protected void | unmarshallResponseBod(org.w3c.dom.Document responseBOD)
This method unmarshalls the response BOD.
|
protected void | unmarshallShowElectronicCatalog(GenericGet get, org.w3c.dom.Element showElectronicCatalogElement)
This method unmarshalls the ShowElectronicCatalog element.
|
protected org.w3c.dom.Element electronicCatalogElement_
public GetElectronicCatalogRequest()
protected Session getResponseData()
public ServiceContext getServiceContext()
protected java.lang.String getXSDFileName()
protected org.w3c.dom.Document getRequestBod()
<GetElectronicCatalog> <!-- created by the createWCRootElement method --> . . </GetElectronicCatalog>
protected org.w3c.dom.Element createDataAreaElement()
The following outline shows the structure of the DataArea element and its construction:
<DataArea> <Get> <!-- constructed by createGetElement() --> . . </Get> <ElectronicCatalog> <!-- constructed by createElectronicCatalogElement() --> . . </ElectronicCatalog> </DataArea>
protected org.w3c.dom.Element createElectronicCatalogElement()
The following outline shows the structure of the ElectronicCatalog element and its construction:
<ElectronicCatalog> <CommerceArea> <!-- constructed by createCommerceAreaElement() --> . . </CommerceArea> </ElectronicCatalog>
protected org.w3c.dom.Element createSenderElement()
The following sample Sender element shows how the element is constructed:
<oa:Sender> <oa:LogicalId>TSCLIENT</oa:LogicalId> <oa:Component>ElectronicCatalog</oa:Component> <oa:Task>GetElectronicCatalog</oa:Task> <oa:ReferenceId>-1680589954192190044</oa:ReferenceId> <!-- value of getActionCtx --> <oa:Confirmation>2</oa:Confirmation> <oa:AuthorizationId>LOGON_TOKEN_ID_SCAFFOLDING</oa:AuthorizationId> <!-- value of ContextManager.getInstance().getSessionCtx() --> </oa:Sender>
protected java.lang.String determineProductType(org.w3c.dom.Element electronicCatalogElement)
<oa:ElectronicCatalog> <oa:CatalogItemLine> <ItemType>ItemBean/<ItemType> <-- used to determine product type --> </oa:CatalogItemLine> </oa:ElectronicCatalog>The returned product type can be one of the following:
protected void unmarshallCatalogItemLine(Product product, org.w3c.dom.Element catalogItemLineElement)
<oa:CatalogItemLine> <oa:ItemId> <!-- unmarshalled by unmarshallItemId() --> . . </oa:ItemId> <ItemType>ProductBean</ItemType> <oa:Description>description</oa:Description> <!-- product.setLongDescription() --> <ShortDescription>short description</ShortDescription> <!-- product.setShortDescription() --> <oa:Parties> <!-- unmarshalled by unmarshallParties() --> . . </oa:Parties> <oa:ItemClassification> <!-- unmarshalled by unmarshallItemClassification() --> . . </oa:ItemClassification> <oa:Feature/> <!-- unmarshalled by unmarshallFeature() --> <oa:ItemPrice> <!-- unmarshalled by unmarshallItemPrice() --> . . </oa:ItemPrice> <Merchandising>false</Merchandising> <!-- product.setMerchandise() --> <Buyable>1</Buyable> <!-- product.setAvailableForSale() --> </oa:CatalogItemLine>
protected void unmarshallDataArea(GenericGet get, org.w3c.dom.Element dataAreaElement)
<DataArea> <oa:ElectronicCatalog> <!-- unmarshalled by unmarshallElectronicCatalog() --> . . </oa:ElectronicCatalog> <oa:ElectronicCatalog> <!-- unmarshalled by unmarshallElectronicCatalog() --> . . </oa:ElectronicCatalog> </DataArea>
protected void unmarshallDocumentId(Product product, org.w3c.dom.Element documentIdElement)
<oa:DocumentId> <oa:Id>100</Id> <!-- product.setCatalogEntryId() --> </oa:DocumentId>
protected void unmarshallECHeader(Product product, org.w3c.dom.Element ecHeaderElement)
<oa:ECHeader> <oa:DocumentId> <!-- unmarshalled by unmarshallDocumentId() --> . . </oa:DocumentId> </oa:ECHeader>
protected void unmarshallElectronicCatalog(Product product, org.w3c.dom.Element electronicCatalogElement)
<oa:ElectronicCatalog type="Product"> <!-- type is one of "Product", "Package", "Item", "Bundle" --> <oa:ECHeader> <!-- unmarshalled by unmarshallECHeader --> . . </oa:ECHeader> <oa:CatalogItemLine> <!-- unmarshalled by unmarshallCatalogItemLine --> . . </oa:CatalogItemLinte> <oa:ElectronicCatalog> <!-- unmarshalled by unmarshallElectronicCatalog --> . . </oa:ElectronicCatalog> <oa:ElectronicCatalog> <!-- unmarshalled by unmarshallElectronicCatalog --> . . </oa:ElectronicCatalog> <UserData/> <!-- unmarshalled by unmarshallUserData -- > </oa:ElectronicCatalog>
protected void unmarshallItemClassification(Product product, org.w3c.dom.Element itemClassificationElement)
<oa:ItemClassification> <oa:ClassificationId>1234</oa:ClassificationId> <oa:Description>Clothing</oa:Description> <!-- product.setCategory() --> </oa:ItemClassification>
protected void unmarshallFeature(Product product, org.w3c.dom.Element featureElement)
<oa:Feature> <oa:NameValue name="color" type="defining">black</oa:NameValue> <!-- product.addAttribute(name, value) --> <oa:NameValue name="info" type="nondefining">descriptive information</oa:NameValue> <!-- product.addDescriptiveAttribute(name, value) --> </oa:Feature>
protected void unmarshallItemId(Product product, org.w3c.dom.Element itemIdElement)
<oa:ItemId> <oa:Id>100</oa:Id> <!-- product.setProductId() --> <oa:Name>Sleek Occasional Table</oa:Name> <!-- product.setProductName() --> <oa:UPC url="www.ibm.com"/> <!-- product.setUrl() --> </oa:ItemId>
protected void unmarshallImages(Product product, org.w3c.dom.Element imagesElement)
<wc:Images> <wc:ImageUrl type="full">wcstore/ConsumerDirect/images/catalog/TATEP_01.jpg</wc:ImageUrl> <!-- product.setFullImagePath() --> <wc:ImageUrl type="thumbnail">wcstore/ConsumerDirect/images/catalog/TATEP_01_sm.jpg</wc:ImageUrl> <!-- product.setThumbnailImagePath() --> </wc:Images>
protected void unmarshallItemPrices(Product product, java.util.ArrayList priceList)
<oa:ItemPrice> <oa:UnitPrice> <!-- unmarshalled by unmarshallItemPrice() --> . . </oa:UnitPrice> </oa:ItemPrice>
protected void unmarshallParties(Product product, org.w3c.dom.Element partiesElement)
<oa:Parties> <oa:PartyId/> <!-- product.setManufacturer() --> </oa:Parties>
protected void unmarshallResponseBod(org.w3c.dom.Document responseBOD)
protected void unmarshallShowElectronicCatalog(GenericGet get, org.w3c.dom.Element showElectronicCatalogElement)
<ShowElectronicCatalog> <oa:ApplicationArea> <!-- unmarshalled by unmarshallApplicationArea() --> . . </oa:ApplicationArea> <DataArea> <!-- unmarshalled by unmarshallDataArea() --> . . </DataArea> </ShowElectronicCatalog>
protected void unmarshallItemPrice(Product product, org.w3c.dom.Element itemPriceElement)
<oa:UnitPrice> <oa:Amount currency="USD">99.99</oa:Amount> <!-- product.setUnitPrice, product.setCurrency --> <!-- unmarshalled by unmarshallUserData() --> <wc:UserData> <!-- optional --> <wc:UserDataField name="name">value</wc:UserDataField> . </wc:UserData> </oa:UnitPrice>