java.lang.Object | +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean | +--com.ibm.commerce.common.objects.StoreAccessBean | +--com.ibm.commerce.common.beans.StoreDataBean
This data bean represents a Store
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT Copyright |
static java.lang.String |
URL_PATH_SEPARATOR The URL separator |
Constructor Summary | |
---|---|
StoreDataBean() Creates an empty StoreDataBean. | |
StoreDataBean(
StoreAccessBean abStore) Creates a StoreDataBean from a StoreAccessBean |
Method Summary | |
---|---|
CommandContext |
getCommandContext() Gets the command context set within this bean. |
java.lang.String |
getFilePath() Returns the path that has to be prepended to the front of a static assets for a store |
java.lang.String |
getFilePath(java.lang.String filename) Returns the path that has to be prepended to the front of a static assets for a store. |
java.lang.String |
getJspPath() Returns the path that has to be prepended to the front of a store related JSP |
java.lang.String |
getJspPath(java.lang.String filename) Returns the path that has to be prepended to the front of a store related JSP. |
java.lang.String |
getJspStoreDirFilePath() Returns the path that has to be prepended to the front of a static assets for a store |
TypedProperty |
getRequestProperties() Gets the request property set within this bean. |
java.util.ResourceBundle |
getResourceBundle(java.lang.String resourceName) Gets a property resource bundle from a store directory. |
java.util.ResourceBundle |
getResourceBundle(java.lang.String resourceName,
java.lang.Integer languageId) Gets a property resource bundle from a store directory. |
CatalogDataBean[] |
getStoreCatalogs() Returns a list of beans that represent catalogs in the store |
static java.lang.String |
getStoreContextPath() Returns the context path for the store servlet. |
java.lang.String |
getStoreId() Gets the store ID that represents the primary key for this store |
void |
populate() Fetches and populates information needed by the bean. |
void |
setCommandContext(
CommandContext commandContext) Sets the command context within this bean. |
void |
setFilePath(java.lang.String filePath) Sets the path for static resources |
void |
setJspPath(java.lang.String jspPath) Sets the path for jsps. |
void |
setRequestProperties(
TypedProperty requestProperty) Sets the request property within this bean. |
void |
setStoreId(java.lang.String storeId) Sets the store ID that represents the primary key for this store |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String URL_PATH_SEPARATOR
Constructor Detail |
---|
public StoreDataBean()
public StoreDataBean(StoreAccessBean abStore) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException, javax.ejb.CreateException
abStore
- com.ibm.commerce.common.objects.StoreAccessBeanjava.rmi.RemoteException
- The java.rmi.RemoteException
exceptionjavax.ejb.FinderException
- The javax.ejb.FinderException
exceptionjavax.naming.NamingException
- The
javax.naming.NamingException exceptionjavax.ejb.CreateException
- The javax.ejb.CreateException
exceptionMethod Detail |
---|
public CommandContext getCommandContext()
public java.lang.String getFilePath() throws java.lang.Exception
java.lang.Exception
- The
java.lang.Exceptionpublic java.lang.String getFilePath(java.lang.String filename) throws java.lang.Exception
If a file is added/removed/changed in a store directory, and the store has 'com.ibm.commerce.view' store relationships, then the StoreRegistry for the corresponding store must be refreshed before retrieving the resource using this method.
If an alias for the store is defined, this method will return the store alias followed by the store directory as the file path. If the alias is not defined, it will just return the store directory.
If the store does not have any active 'com.ibm.commerce.view' store relationships, then this store's directory is used in the path. Otherwise, if the file exists in this store's public directory, then this store's directory is used in the path. Otherwise, the store directory in the request properties is used in the path.
e.g. If the store alias is "storeAlias", and the store directory is "storeDir", and this store has no 'com.ibm.commerce.view' store relationships, the result is "/storeAlias/storeDir/filename".
e.g. If the store alias is "storeAlias", and the store directory is "storeDir", and this store has the 'com.ibm.commerce.view' store relationships, and the file does not exist in this store's directory, and the request properties has a ECConstants.EC_JSP_STORE_DIR parameter value "jspStoreDir", then the result is "/storeAlias/jspStoreDir/filename"
filename
- The name of the filejava.lang.Exception
- The java.lang.Exception
exceptionpublic java.lang.String getJspPath() throws java.lang.Exception
java.lang.Exception
- The java.lang.Exception
exceptionpublic java.lang.String getJspPath(java.lang.String filename) throws java.lang.Exception
If a JSP is added/removed/changed in a store directory, and the store has 'com.ibm.commerce.view' store relationships, then the StoreRegistry for the corresponding store must be refreshed before retrieving the resource using this method.
If the store does not have any active 'com.ibm.commerce.view' store relationships, then this store's directory is used in the path. Otherwise, if the file exists in this store's public directory, then this store's directory is used in the path. Otherwise, the store directory in the request properties is used in the path.
e.g. If the store directory is "storeDir", and this store has no 'com.ibm.commerce.view' store relationships, the result is "/storeDir/filename".
e.g. If the store directory is "storeDir", and this store has the 'com.ibm.commerce.view' store relationships, and the file does not exist in this store's directory, and the request properties has a ECConstants.EC_JSP_STORE_DIR parameter value "jspStoreDir", then the result is "/jspStoreDir/filename"
filename
- the name of the JSPECException
java.lang.Exception
public java.lang.String getJspStoreDirFilePath() throws java.lang.Exception
The jspStoreDir request attribute value is used when building this path.
java.lang.Exception
- The java.lang.Exception
exceptionpublic java.util.ResourceBundle getResourceBundle(java.lang.String resourceName) throws ECException
If a properties file is added/removed/changed in a store directory, then the StoreRegistry for the corresponding store must be refreshed before retrieving the resource using this method.
The store path for the 'com.ibm.commerce.view' relationship type is used as the basis for the search of the resource.
For each store, the search consists of searching for ".properties" files with the locale as set in the command context. If a file with the command context locale cannot be found, then a file with no locale is searched for.
eg. The command context locale is "en_US", and there are two stores in the store path with directories "storeA" and "storeB". The search order is:
storeA/resourceName_en_US.properties storeA/resourceName.properties storeB/resourceName_en_US.properties storeB/resourceName.properties
resourceName
- The name of the resource, using '.' as
the namespace delimiterECException
- The com.ibm.comerce.exception.ECException exceptionpublic java.util.ResourceBundle getResourceBundle(java.lang.String resourceName, java.lang.Integer languageId) throws ECException
If a properties file is added/removed/changed in a store directory, then the StoreRegistry for the corresponding store must be refreshed before retrieving the resource using this method.
The store path for the 'com.ibm.commerce.view' relationship type is used as the basis for the search of the resource.
For each store, the search consists of searching for ".properties" files with the locale as set in the command context. If a file with the locale of the specified language cannot be found, then a file with no locale is searched for.
eg. The locale for the specified language id is "en_US", and there are two stores in the store path with directories "storeA" and "storeB". The search order is:
storeA/resourceName_en_US.properties storeA/resourceName.properties storeB/resourceName_en_US.properties storeB/resourceName.properties
resourceName
- The name of the resource, using '.' as
the namespace delimiterlanguageId
- The language IDECException
- The com.ibm.commerce.exception.ECException exceptionpublic TypedProperty getRequestProperties()
public CatalogDataBean[] getStoreCatalogs() throws ECException
ECException
- The com.ibm.commerce.exception.ECExceptionpublic java.lang.String getStoreId()
public void populate() throws java.lang.Exception
java.lang.Exception
- The java.lang.Exception
exceptionpublic void setCommandContext(CommandContext commandContext)
public void setFilePath(java.lang.String filePath)
filePath
- The file pathpublic void setJspPath(java.lang.String jspPath)
jspPath
- The JSP pathpublic void setRequestProperties(TypedProperty requestProperty) throws ECException
requestProperty
- The request property to set within this
bean.javax.ejb.CreateException
- The javax.ejb.CreateException
exceptionjava.rmi.RemoteException
- The java.rmi.RemoteException
exceptionjavax.naming.NamingException
- The
javax.naming.NamingException exceptionjavax.ejb.FinderException
- The javax.ejb.FinderException
exceptionECException
public void setStoreId(java.lang.String storeId)
storeId
- The store IDpublic static java.lang.String getStoreContextPath() throws java.lang.Exception
java.lang.Exception
- The
java.lang.Exception