Adding language insensitive properties in the Catalogs tool
In this lesson, you are customizing the Catalogs tool to support more UserData information that is added to the CatalogEntry noun. In this tutorial, you are adding support for catalog entry warranty details information. You can follow the same procedure for any language insensitive properties of a noun.
About this task
<wcf:getData>
tag. As part of this
lesson, you must register the custom access profile on the client side to configure the Management Center client to get the warranty data. To register the custom access profile on the client
side, create a custom configuration file, get-data-config.xml. The
get-data-config.xml file configures how the Management Center retrieves
the data from the server with the foundation tag library <wcf:getData>
. The
extension version of this file in the com.ibm.commerce.catalog-ext directory
overrides the original definition.
getData
action. This action searches for configuration files that are named
get-data-config.xml in the WEB-INF/config directory. The
configuration files must adhere to the following rules:- The root element must be
get-data-config
. - Each component has one configuration file, which is used with the
getData
action. - Each component configuration file is in the directory, where component is the name of the component.
- Your extension files must be in the following directory: . These files are loaded after the component configuration files.
MyCompany_All
. An expression
builder is a helper class, or a template, declared in the WebSphere Commerce
get-data-config.xml file. It is used by the getData
tag in a
JSP file to construct an XPath expression that retrieves data.Procedure
-
Update the wc-query-MyCompanyCatalogEntry-get.tpl query template file to
add data to the CatalogEntry noun.
This file contains the following information:
- A symbol definition section that defines the tables included in the query template. In this tutorial, you are including the CATENTRY, CATENTDESC, XWARRANTY, XCAREINSTRUCTION database tables in the symbol definition section.
- Definition of a new association SQL statement that seeks the new custom data.
- Definition of a new access profile
MyCompany_All
, which extends the default CatalogEntry Summary access profile:IBM_Admin_Summary
.Note: TheIBM_Admin_
prefixes that are used in the access profileIBM_Admin_Summary
are intended to be used by admininstrative and Management Center services calls. Access profiles that do not follow the new naming conventions continue to function correctly, as compatibility is maintained with earlier versions. It is recommended, however, that they are followed for existing access profiles, and when you change future access profiles.
-
Enable logging and tracing for Management Center.
-
Determine the service URL name. To find the service URL name, you must enable tracing in
Management Center.
-
Determine the controller JSP file.
-
Determine the expression builder to use for the customization.
-
Determine the default access profile for the expression builder.
-
Override the expression builder within your custom get-data-config.xml
file.
You use your custom configuration file to fetch extra warranty information from the CatalogEntry noun. You custom file must override the base component configuration file.