Develop > Presentation layer > WebSphere Commerce integration with WebSphere Portal > Integrate WebSphere Commerce Extended Sites with WebSphere Portal > Extended site asset store in WebSphere Portal


Extended site store plugin

A store plugin is one that helps resolving Commerce Store related information for the MVCPortlet application. It leverages the WebSphere Commerce MVCPortlet plug-in framework so that a customized version can also be specified instead. The extended site store plug-in must implement the PortletStorePlugIn interface which can be initialized and destroyed along with the WebSphere Commerce portlet. A default implementation has been provided, com.ibm.commerce.foundation.client.portal.services.MVCPortletStoreService.

This MVCPortletStoreService plug-in serves multiple store related purposes:

  1. It resolves the store directory of the given Store ID.

  2. It resolves the store relationship of the given Extended Site Store ID.

  3. It resolves URL prefix for use with Store related static contents.
When requesting storefront asset store information about a given Extended Site store ID from this MVCPortletStoreService, this plugin first checks to determine if a store relationship property file, called WEB-INF/classes/asset-store.properties, has the store relationship defined. Otherwise, a service call is made to the Infrastructure component service on the WebSphere Commerce server. Once received, the calculated store relationship for the storefront asset store, the result is then cached for future usage.

Once the corresponding asset store is determined, the MVCPortlet can lookup the MVCPortlet configuration to determine if a custom version of the JSP file is used for the given action or render.

This store relationship property file, WEB-INF/classes/asset-store.properties, is used to define the extended site view relationship between the given extended site and the corresponding asset store. The model only supports a many-to-one relationship, where multiple extended sites can be mapped to a single presentation asset store, but not vice versa. This property file uses the following format:

WebSphere Commerce extended site store ID = WebSphere Commerce presentation asset store ID

Considering the following simple example:

Now considering another example where a custom extended site template is used instead:

For ease of maintenance in the production environment, it is recommended not to use the store relationship properties file, leaving it as an empty file, and rely on the service call to retrieve the store relationship information.


+

Search Tips   |   Advanced Search