Content Versioning configuration file (wc-content-version.xml)
The content versioning configuration file defines the configuration for the UI objects that are versionable. This file indicates which UI objects are versionable, and how the system versions the object. To change the default configuration for the UI objects, you must extend the configuration file. You can extend this file by creating a file in an component extension folder (workspace_dir\WC\xml\config\com.ibm.commerce.component-ext). A component extension folder includes all the extended files for the particular component or service module.
Multiple UI objects can map to the same noun. These UI objects are represented as the same noun but the Management Center interface creates different types for the different UI objects. For example, the product, product SKU, category SKU, bundle, and kit UI objects map to the CatalogEntry noun.
<wc:ContentVersionConfiguration xmlns:wc="http://www.ibm.com/xmlns/prod/WebSphereCommerce"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/WebSphereCommerce ../xsd/wc-content-version.xsd">
1 <wc:ContentVersionContainer name="com.ibm.commerce.catalog" id="-1">
2 <wc:ContentVersionNoun name="Catalog" topTable="CATALOG"
className="com.ibm.commerce.catalog.version.CatalogContentVersionServiceImpl">
3 <wc:ConfigGroup id="-1">
4 <wc:ContentVersionUIObject name="SalesCatalog" />
5 <wc:ContentVersionRelatedTable name="CATALOG"
whereClause="CATALOG_ID=? AND MEMBER_ID=?" values="${objectId}, ${storeOwnerId}"/>
<wc:ContentVersionRelatedTable name="CATALOGDSC" whereClause="CATALOG_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="STORECAT"
whereClause="CATALOG_ID=? AND STOREENT_ID=?" values="${objectId}, ${storeId}"/>
<wc:ContentVersionRelatedTable name="ATCHREL"
whereClause="OBJECT_ID=? AND ATCHOBJTYP_ID=?" values="${objectId}, 1"/>
</wc:ConfigGroup>
</wc:ContentVersionNoun>
<wc:ContentVersionNoun name="CatalogGroup" topTable="CATGROUP"
className="com.ibm.commerce.catalog.version.CatalogGroupContentVersionServiceImpl">
<wc:ConfigGroup id="-1">
<wc:ContentVersionUIObject name="CatalogGroup" />
<wc:ContentVersionUIObject name="SalesCatalogGroup" />
<wc:ContentVersionRelatedTable name="CATGROUP"
whereClause="CATGROUP_ID=? AND MEMBER_ID=?" values="${objectId}, ${storeOwnerId}"/>
<wc:ContentVersionRelatedTable name="CATGRPDESC" whereClause="CATGROUP_ID=?" values="${objectId}" />
<wc:ContentVersionRelatedTable name="CATTOGRP"
whereClause="CATGROUP_ID=? AND CATALOG_ID IN (SELECT CATALOG_ID FROM %CURRENT_SCHEMA%.STORECAT WHERE STOREENT_ID=?)"
values="${objectId}, ${storeId}"/>
<wc:ContentVersionRelatedTable name="CATGRPREL"
whereClause="CATGROUP_ID_CHILD=? AND CATALOG_ID IN (SELECT CATALOG_ID FROM %CURRENT_SCHEMA%.STORECAT WHERE STOREENT_ID=?)"
values="${objectId}, ${storeId}"/>
<wc:ContentVersionRelatedTable name="STORECGRP"
whereClause="CATGROUP_ID=? AND STOREENT_ID=?" values="${objectId}, ${storeId}"/>
<wc:ContentVersionRelatedTable name="ATCHREL" whereClause="OBJECT_ID=? AND ATCHOBJTYP_ID=?" values="${objectId}, 2"/>
</wc:ConfigGroup>
<wc:ConfigGroup id="-2">
<wc:ContentVersionUIObject name="InheritedCatalogGroup" enabled="false" />
<wc:ContentVersionUIObject name="InheritedSalesCatalogGroup" enabled="false" />
<wc:ContentVersionRelatedTable name="CATTOGRP"
whereClause="CATGROUP_ID=? AND CATALOG_ID IN (SELECT CATALOG_ID FROM %CURRENT_SCHEMA%.STORECAT WHERE STOREENT_ID=?)"
values="${objectId}, ${storeId}"/>
<wc:ContentVersionRelatedTable name="CATGRPREL"
whereClause="CATGROUP_ID_CHILD=? AND CATALOG_ID IN (SELECT CATALOG_ID FROM %CURRENT_SCHEMA%.STORECAT WHERE STOREENT_ID=?)"
values="${objectId}, ${storeId}"/>
</wc:ConfigGroup>
</wc:ContentVersionNoun>
<wc:ContentVersionNoun name="CatalogEntry" topTable="CATENTRY"
className="com.ibm.commerce.catalog.version.CatalogEntryContentVersionServiceImpl">
<wc:ConfigGroup id="-1">
<wc:ContentVersionUIObject name="Product" />
<wc:ContentVersionRelatedTable name="CATENTRY"
whereClause="CATENTRY_ID=? AND MEMBER_ID=?" values="${objectId}, ${storeOwnerId}"/>
<wc:ContentVersionRelatedTable name="CATENTDESC" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="CATENTSUBS" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="ATTRIBUTE" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="ATTRVALUE"
whereClause="ATTRIBUTE_ID IN (SELECT ATTRIBUTE_ID FROM ATTRIBUTE WHERE CATENTRY_ID = ?)
AND (CATENTRY_ID = 0 OR CATENTRY_ID = ?)" values="${objectId}, ${objectId}"/>
<wc:ContentVersionRelatedTable name="CATENTRYATTR" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="CATENTSHIP" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="CATGPENREL" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="LISTPRICE" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="STORECENT"
whereClause="CATENTRY_ID=? AND STOREENT_ID=?" values="${objectId}, ${storeId}"/>
<wc:ContentVersionRelatedTable name="CATENTREL" whereClause="CATENTRY_ID_CHILD=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="ATCHREL" whereClause="OBJECT_ID=? AND ATCHOBJTYP_ID=?" values="${objectId}, 3"/>
<wc:ContentVersionRelatedTable name="MASSOCCECE"
whereClause="CATENTRY_ID_FROM=? AND STORE_ID=?" values="${objectId}, ${storeId}" enabled="false"/>
</wc:ConfigGroup>
<wc:ConfigGroup id="-2">
<wc:ContentVersionUIObject name="ProductSKU" />
<wc:ContentVersionUIObject name="CatalogGroupSKU" />
<wc:ContentVersionRelatedTable name="CATENTRY"
whereClause="CATENTRY_ID=? AND MEMBER_ID=?" values="${objectId}, ${storeOwnerId}" />
<wc:ContentVersionRelatedTable name="CATENTDESC" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="CATENTSUBS" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="ATTRIBUTE" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="ATTRVALUE" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="CATENTRYATTR" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="CATENTSHIP" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="CATGPENREL" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="LISTPRICE" whereClause="CATENTRY_ID=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="STORECENT"
whereClause="CATENTRY_ID=? AND STOREENT_ID=?" values="${objectId}, ${storeId}"/>
<wc:ContentVersionRelatedTable name="CATENTREL" whereClause="CATENTRY_ID_CHILD=?" values="${objectId}"/>
<wc:ContentVersionRelatedTable name="ATCHREL"
whereClause="OBJECT_ID=? AND ATCHOBJTYP_ID=?" values="${objectId}, 3"/>
<wc:ContentVersionRelatedTable name="MASSOCCECE"
whereClause="CATENTRY_ID_FROM=? AND STORE_ID=?" values="${objectId}, ${storeId}" enabled="false"/>
</wc:ConfigGroup>
</wc:ContentVersionNoun>
</wc:ContentVersionContainer>
</wc:ContentVersionConfiguration>
In the wc-content-version.xml file: |
---|
1The wc:ContentVersionContainer
element is the root element of the content versioning configuration file. The
wc:ContentVersionContainer element defines a container. Each component must declare
one container. A container contains all the configuration for the component. Specify the following
attributes for this element:
|
2The wc.ContentVersionNoun
element is used to define the configuration for the UI objects to be versioned for the specific
noun. Specify the following attributes for this element:
|
3The wc:ConfigGroup elements are
used to create configuration groups. A configuration group is a group of objects that are versioned
the same way. For example, CatalogGroup and SalesCatalogGroup are
different object types but are versioned the same way. Specify the following attributes for this
element:
|
4The wc:ContentVersionUIObject
element is used to declare which UI objects are part of the configuration group. Specify the
following attributes for this element:
|
5The
wc:ContentVersionRelatedTable elements are used to define which tables are stored
when creating a version of a UI object. Each UI object can have multiple tables that are stored when
a version is created. Specify the following attributes for this element:
In this following sample code snippet, the system selects the primary key and store
identifier rows from the CATENTRY table to be
versioned.
|