StoreConfigurationRegistry to access values stored in STORECONF table
StoreConfigurationRegistry to access store configuration values in the STORECONF database table from either Java code or JSP files.
The STORECONF data is not propagated from staging to production. Therefore, you can have configurations and test systems set up in your staging environment that are different from your production environment.
Java code example
From Java code, you can access the StoreConfigurationRegistry directly.
String value = StoreConfigurationRegistry.getSingleton().getValue(storeId, "STORECONF_Name");
public String getValue(Integer storeId, String name)
JSP file example
You can use the <wcst:storeconf> tag in a JSP file to access data from the STORECONF table. The <wcst:storeconf> tag reads from the StoreConfigurationRegistry cache to provide access to the configuration parameters. This tag is provided with the WebSphere Commerce Stores tag library (stores.tld).
In the default JSTLEnvironmentSetup.jspf file for the Aurora starter store, the library is included, as shown here:
<%@ taglib uri="http://commerce.ibm.com/foundation-fep/stores" prefix="wcst" %>
The following example shows how to use the tag in a store page to get the parameter named wc.bazaarvoice.runtime_url from the STORECONF table:
<wcst:storeconf var="bvUrl" name="wc.bazaarvoice.runtime_url" scope="request" />
scope-
page
request
session
application
If the scope parameter is not set, then the default value is page.
Inserting Data into STORECONF OR Using Dataload
insert into storeconf (storeent_id, name, value, optcounter)values (storeent_id, 'name', 'value', 0);
Nice Blog
ReplyDelete