Monday, April 8, 2013

Sample Troubleshooting Sequence From getData Tag To Search Profile


-- In ProductDescription_Data.jsp

<wcf:getData 
type="com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType"
var="catalogNavigationView"
expressionBuilder="getCatalogEntryViewAllWithoutAttachmentsByID"
varShowVerb="showCatalogNavigationView"
maxItems="1"
recordSetStartNumber="0">

<wcf:param name="UniqueID" value="${productId}"/>
<wcf:contextData name="storeId" data="${WCParam.storeId}" />
<wcf:contextData name="catalogId" data="${WCParam.catalogId}" />
</wcf:getData>

-- In get-data-config.xml this expression builder uses access profile IBM_Store_All
<expression-builder>
<name>getCatalogEntryViewAllWithoutAttachmentsByID</name>
<data-type-name>CatalogNavigationView</data-type-name>
<class>com.ibm.commerce.foundation.internal.client.taglib.util.UniqueIDsExpressionBuilder</class>
<method>formatExpression</method>
<param>
<name>template</name>
<value>/CatalogNavigationView[CatalogEntryView[(UniqueID=)]]</value>
</param>
<param>
<name>searchProfile</name>
<value>IBM_findCatalogEntryDetailsWithComponents</value>
</param>
<param>
<name>accessProfile</name>
<value>IBM_Store_All</value>
</param>
</expression-builder> 

-- In wc-component.xml this access profile is mapped to search profile IBM_findCatalogEntryAll (based on the logs this seems to be the search profile used, not IBM_findCatalogEntryDetailsWithComponents)

<_config:configgrouping name="AccessProfileToSearchProfileMapping">
<_config:property name="IBM_Store_Summary" value="IBM_findCatalogEntrySummary"/>
<_config:property name="IBM_Store_Details" value="IBM_findCatalogEntryDetails"/>
<_config:property name="IBM_Store_CatalogEntryAttachments" value="IBM_findCatalogEntryAttachments"/>
<_config:property name="IBM_Store_CatalogEntryDetailsWithAttachments" value="IBM_findCatalogEntryDetailsWithAttachments"/>
<_config:property name="IBM_Store_CatalogEntryDetailsWithComponentsAndAttachments" value="IBM_findCatalogEntryDetailsWithComponentsAndAttachments"/>
<_config:property name="IBM_Store_CatalogEntryDetailsWithMerchandisingAssociations" value="IBM_findCatalogEntryDetailsWithMerchandisingAssocDetails"/>
<_config:property name="IBM_Store_All" value="IBM_findCatalogEntryAll"/>
<_config:property name="IBM_Store_CatalogEntryPrice" value="IBM_findCatalogEntryPrice"/>
<_config:property name="IBM_Store_CatalogEntryPriceWithAttributes" value="IBM_findCatalogEntryPriceWithAttributes"/>
</_config:configgrouping>

-- In wc-search.xml this search profile is defined

<_config:profile extends="IBM_findCatalogEntryDetailsWithComponentsAndAttachments" name="IBM_findCatalogEntryAll">
<!--  The search profile used to fetch the details of associated catalog entries. -->
<_config:param name="catalogEntrySearchProfile" value="IBM_fetchRelatedCatalogEntryDetailedInfo"/>
<_config:result inherits="true">
<_config:filter classname="com.ibm.commerce.catalog.facade.server.services.search.metadata.SearchCatalogEntryMerchandisingAssocResultFilter"/>
</_config:result>
</_config:profile>


To use custom attribute usages customize:
com.ibm.commerce.catalog.facade.server.services.search.metadata.SearchCatalogEntryViewAttributesResultFilter

No comments:

Post a Comment