BOD Customization Requirements

Here we are updating a post related to the BOD sample task & here we will dealing with a sample coding part related to BOD customization

BOD is the webservices that is included in the Version 7. In this we need not want to keep in mind the main about the main terms mentioned below :

/Stores/WebContent/Aurora/Common/SearchSetup.jspf

The above JSPF consists of the below detailed framing of the GetData tag required.

<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType" var="catalogNavigationView"
expressionBuilder="${navigationView}" scope="request" varShowVerb="showCatalogNavigationView"
maxItems="${pageSize}" recordSetStartNumber="${beginIndex}" scope="request">
<wcf:param name="searchProfile" value="${searchProfile}" />
<wcf:param name="searchTerm" value="${newSearchTerm}" />
<wcf:param name="intentSearchTerm" value="${intentSearchTerm}" />
	<wcf:param name="searchType" value="${searchType}" />
	<wcf:param name="searchSource" value="${WCParam.searchSource}" />		<wcf:param name="metaData" value="${WCParam.metaData}" />		<wcf:param name="orderBy" value="${WCParam.orderBy}" />
		<c:forEach var="facetValue" items="${paramValues.facet}">
			<wcf:param name="facet" value="${facetValue}" />
		</c:forEach>
	<wcf:param name="advancedFacetList" value="${newAdvancedFacetList}"/>
	<wcf:param name="categoryId" value="${currentCategoryId}" />
	<wcf:param name="filterTerm" value="${newFilterTerm}" />
	<wcf:param name="filterType" value="${WCParam.filterType}" />
	<wcf:param name="filterFacet" value="${WCParam.filterFacet}" />
	<wcf:param name="manufacturer" value="${newManufacturer}" />
	<wcf:param name="minPrice" value="${WCParam.minPrice}" />
	<wcf:param name="maxPrice" value="${WCParam.maxPrice}" />
	<wcf:contextData name="storeId" data="${WCParam.storeId}" />
	<wcf:contextData name="catalogId" data="${WCParam.catalogId}" />
</wcf:getData>

In the above code we need to keep in mind regarding the highlighted terms are important to be checked before calling the bod service.

  • <wcf:getData : Here this is the tag which is used to initiate the BOD call this is related to the file get-data-config.xml

The data-type below is defined for calling in the required JSP

<data-type>
<name>CatalogNavigationView</name>
<type>com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType</type>
</data-type>
  • Here we call the client for declaring the method that’s required,

/Stores/WebContent/WEB-INF/config/com.ibm.commerce.catalog-fep/get-data-config.xml

The above XML consists of the below detailed framing of the client-façade required.

<client-facade>
    <data-type-name>CatalogNavigationView</data-type-name>
    <class>com.ibm.commerce.catalog.facade.client.CatalogFacadeClient</class>
    <method>getCatalogNavigationView</method>
</client-facade>
  • In the get-data-config.xml we can get the definition of the expressionBuilder is given

Here in the below syntax we will frame the params we are going to call in the jsp within the wcf:getdata tag

/Stores/WebContent/WEB-INF/config/com.ibm.commerce.catalog-fep/get-data-config.xml

The above XML consists of the below detailed framing of the expressionBuilder required.

<expression-builder>
	<name>getCatalogNavigationView</name>
	<data-type-name>CatalogNavigationView</data-type-name>
	<expression-template>{_wcf.ap='$accessProfile$';_wcf.search.profile='$searchProfile$';_wcf.search.term='$searchTerm$';_wcf.search.intent.term='$intentSearchTerm$';_wcf.search.originalterm='$originalSearchTerm$';_wcf.search.category='$categoryId$';_wcf.search.type='$searchType$';_wcf.search.exclude.term='$filterTerm$';_wcf.search.exclude.type='$filterType$';_wcf.search.manufacturer='$manufacturer$';_wcf.search.price.minimum='$minPrice$';_wcf.search.price.maximum='$maxPrice$';_wcf.search.facet='$facet$';_wcf.search.advanced.facet='$advancedFacetList$';_wcf.search.exclude.facet='$filterFacet$';_wcf.search.sort='$orderBy$';_wcf.search.meta='$metaData$';_wcf.search.source='$searchSource$'}/CatalogNavigationView</expression-template>
	<param>
		<name>accessProfile</name>
		<value>IBM_Store_CatalogEntrySearch</value>
	</param>
	<param>
		<name>searchType</name>
		<value>0</value>
	</param>
	<param>
		<name>searchSource</name>
		<value>O</value>
	</param>
	<param>
		<name>searchProfile</name>
			<value>IBM_findCatalogEntryByNameAndShortDescription</value>
	</param>
	</expression-builder>
  • expressionBuilder : Used for framing the parameters that are needed for mapping and accessing the
  • Profile : Actually we have 2 kind of profiles for search like
  1. Seachprofile : we used to use this when going by using the SOLR
  2. Accessprofile : this is being used if we are using the database to fetch the data when going for accessing.

Actually we have SDO’s called in the BOD calling process and there 2 kinds of SDO’s

  1. Logical SDO’s
  2. Physical SDO’s

/WC/xml/config/com.ibm.commerce.catalog-fep/wc-business-object-mediator.xml

The above XML consists of the below detailed framing of the SDO’s required.

<_config:object logicalType="com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType" 	physicalType="com.ibm.commerce.catalog.facade.server.services.search.metadata.solr.SolrCatalogNavigationViewImpl">
<_config:mediator  interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ReadBusinessObjectMediator"
className="com.ibm.commerce.catalog.facade.server.services.dataaccess.bom.mediator.solr.SolrReadCatalogNavigationViewMediator">

Actual flow of the BOD call in the WCS

JSP –>CLIENT –> OAGIS –>DSL–>DATABASE

In the Data Service Layer (DSL) consists–> Logical SDO’s and Physical SDO’s

Leave a Reply