Introduced in Feature Pack 2

Creating new expression builders to process Subscription service requests

Introduced in Feature Pack 2 In this step, you create expression builders that allow the storefront to access the Day-of-month schedule information. The get-data-config.xml file contains expression builders, each represents a different SQL query that is defined in the query template file. By referencing the appropriate expression builder, getData tags in the storefront JavaServer Pages (JSP) files can retrieve specific data from the database.

Procedure

  1. Create a get-data-config file.
    1. In the Enterprise Explorer view, expand Stores > WebContent > WEB-INF > config.
    2. Right-click config and select New > Folder.
    3. In the Folder name field, enter com.ibm.commerce.subscription-ext.
    4. If the com.ibm.commerce.subscription-ext folder is not visible, right-click the config directory in the Enterprise Explorer view and click Refresh.
    5. Right-click the com.ibm.commerce.subscription-ext folder and select New > File > Next. In the File name field, enter get-data-config.xml and click Finish. The newly created get-data-config.xml file automatically opens.
  2. Insert Subscription-related expression builders into the get-data-config file. Copy the following code into the get-data-config.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <_config:get-data-config>
    	<expression-builder>
    			<name>getSubscriptionDetailsByUniqueID</name>
    			<data-type-name>Subscription</data-type-name>
    			<class>com.ibm.commerce.foundation.internal.client.taglib.util.UniqueIDsExpressionBuilder</class>
    			<method>formatExpression</method>
    			<param>
    				<name>template</name>
    				<value>/Subscription[SubscriptionIdentifier[(UniqueID=)]]</value>
    			</param>
    			<param>
    				<name>accessProfile</name>
    				<value>MyCompany_Store_Details</value>
    			</param>
    	</expression-builder>
    </_config:get-data-config>
  3. Save the file.
  4. Restart the WebSphere Commerce Test Server.