public final class MVCPortletStoreService extends java.lang.Object implements PortletStorePlugIn
This MVCPortletStoreService plug-in serves multiple store related purposes:
When requesting store front asset store information about a given Extended Site store ID from this MVCPortletStoreService, this plug-in will first checks to determine if a storefront asset store path property file, called WEB-INF/classes/asset-store.properties, has the store path relationship defined in there. Otherwise, a service call will be made to the Infrastructure component service on the WebSphere Commerce server.
Once received the calculated store path for the store front asset store, the result will then be cached for future usages. Once the corresponding asset store is determined, then the MVCPortlet can lookup the MVCPortlet configuration to determine if a custom version of JSP is used for the given action or render.
Constructor and Description |
---|
MVCPortletStoreService() |
Modifier and Type | Method and Description |
---|---|
void | destroy()
Destroy routine for the plugin before shutting down.
|
java.lang.String | getAssetStoreId(javax.portlet.PortletRequest portletRequest)
Returns the asset store Id based on the current store Id defined in the business context; if the given store Id is not associated with any other asset store, then the same store Id is returned.
|
java.lang.String | getStoreDirectory(javax.portlet.PortletRequest portletRequest)
Returns the store directory based on the current store Id in the business context, such as "ConsumerDirectory".
|
java.lang.String | getStoreId(javax.portlet.PortletRequest portletRequest)
Returns the WebSphere Commerce store Id based on the current business context.
|
java.lang.String | getStoreLocalURLPrefix(javax.portlet.PortletRequest portletRequest)
Returns the store local URL prefix based on the current store Id in the business context; this is typically a relative directory location within the portlet application, such as "jsp/html".
|
java.lang.String | getStoreRemoteURLPrefix(javax.portlet.PortletRequest portletRequest)
Returns the store remote URL prefix based on the current store Id in the business context; this is typically the former part of an external URL request, such as "http://hostname:port/wcsstore".
|
boolean | hasAssetStore(javax.portlet.PortletRequest portletRequest)
Returns whether the current store Id in the business context has an associated Commerce asset store.
|
void | init(javax.portlet.PortletConfig portletConfig)
Initialization routine for the plugin on starting up.
|
public java.lang.String getStoreId(javax.portlet.PortletRequest portletRequest)
public java.lang.String getAssetStoreId(javax.portlet.PortletRequest portletRequest)
public java.lang.String getStoreLocalURLPrefix(javax.portlet.PortletRequest portletRequest)
public java.lang.String getStoreRemoteURLPrefix(javax.portlet.PortletRequest portletRequest)
public java.lang.String getStoreDirectory(javax.portlet.PortletRequest portletRequest)
public boolean hasAssetStore(javax.portlet.PortletRequest portletRequest)
public void init(javax.portlet.PortletConfig portletConfig) throws javax.portlet.PortletException
public void destroy() throws javax.portlet.PortletException