Get catalog group details by ID
This service request, getCatalogGroupDetailsByID, obtain detailed information about a category such as:
- catalog group ID
- owner id
- catalog group identifier
- name
- short description
- long description
- thumbnail image
- full image
A list of all CatalogGroup returns if you pass in multiple catalog group IDs. The catalog group ID is used in the request.
Request
Request BOD GetCatalogGroup Access profile WC_CatalogGroupDetailsProfile Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetCatalogGroup.xsd Service data object GetCatalogGroupType
Sample request BOD
<_cat:GetCatalogGroup xmlns:_cat="http://www.ibm.com/xmlns/prod/commerce/9/catalog" xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType"> <oa:CreationDateTime> 2007-01-25T14:31:59.938Z </oa:CreationDateTime> <oa:BODID>b9422820-acaa-11db-936a-832d45b905af</oa:BODID> <_wcf:BusinessContext> <_wcf:ContextData name="storeId">10001</_wcf:ContextData> <_wcf:ContextData name="catalogId">10001</_wcf:ContextData> </_wcf:BusinessContext> </oa:ApplicationArea> <_cat:DataArea> <oa:Get> <oa:Expression expressionLanguage="wcf:XPath"> {_wcf.ap=WC_CatalogGroupDetailsProfile}/CatalogGroup[CatalogGroupIdentifier[UniqueID='10001']] </oa:Expression> </oa:Get> </_cat:DataArea> </_cat:GetCatalogGroup>
Response
Response BOD ShowCatalogGroup Schema /Catalog-DataObjects/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowCatalogGroup.xsd Service data object ShowCatalogGroupType The response contains the following information:
/CatalogGroup/CatalogGroupIdentifier/UniqueID /CatalogGroup/CatalogGroupIdentifier/ExternalIdentifier/@ownerID /CatalogGroup/CatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier /CatalogGroup/Description/@language /CatalogGroup/Description/Name /CatalogGroup/Description/ThumbNail /CatalogGroup/Description/ShortDescription /CatalogGroup/Description/FullImage /CatalogGroup/Description/LongDescription /CatalogGroup/@displayTemplate
Sample response BOD
<cat:ShowCatalogGroup> <_cat:DataArea> <_cat:CatalogGroup> <_cat:CatalogGroupIdentifier> <_wcf:UniqueID>10001</_wcf:UniqueID> <_wcf:ExternalIdentifier ownerID="7000000000000000002"> <_wcf:GroupIdentifier>Brakes components</_wcf:GroupIdentifier> </_wcf:ExternalIdentifier> </_cat:CatalogGroupIdentifier> <_cat:Description language="-1"> <_cat:Name>Brakes</_cat:Name> <_cat:Thumbnail>images/h_brakes.jpg</_cat:Thumbnail> <_cat:FullImage>images/toplvl_brakes.jpg</_cat:FullImage> <_cat:ShortDescription>Brakes components</_cat:ShortDescription> <_cat:LongDescription>Brakes components</_cat:LongDescription> </_cat:Description> <_cat:Attributes name="displayTemplate">ShoppingArea/CatalogSection/CategorySubsection/SubCategoriesDisplay</_cat:Attributes> </_cat:CatalogGroup> </_cat:DataArea> </_cat:ShowCatalogGroup>
Usage
To use this service request on a JSP page, you have the choice between two expression builders: getCatalogGroupDetailsByID and getCatalogGroupDetailsByIDs. The getCatalogGroupDetailsByID accepts one catGroupId as parameter and maps to the following XPath expression: {_wcf.ap=$accessProfile$}/CatalogGroup[CatalogGroupIdentifier[UniqueID='$catGroupId$']].
The default is: accessProfile=WC_CatalogGroupDetailsProfile.
The getCatalogGroupDetailsByIDs accepts a list of catGroupId as parameters and as such should be used to return the details of multiple categories. The accessProfile used is WC_CatalogGroupDetailsProfile.
Here is an example on how to use this in a JSP page:
<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogGroupType[]" var="catalogGroups" expressionBuilder="getCatalogGroupDetailsByIDs"> <c:forEach var="uniqueId" uniqueIDs="the list of Ids"> <wcf:param name="UniqueID" value="${uniqueID}" /> </c:forEach> </wcf:getData>This service request uses the
CatalogGroupDataBean data bean.
Customization
The following extensions are supported:
- Create your own implementation of the interface ComposeCatalogGroupTaskCmd. By creating your own implementation of the ComposeCatalogGroupTaskCmd, and an access profile you can control the level of information returned by these services.
Related concepts
../../com.ibm.commerce.business_process.doc/concepts/processFind_product_(ConsumerDirect).htm
Design pattern for Get service implementation
Related Reference
WebSphere Commerce foundation tag library