You can disable content versioning for particular business objects. For example, you
might want your business user to be able to manage versions of sales catalogs, and catalog entries
but not categories.
To disable content versioning for a business object, you modify the definitions file for the
object. The object definition file contains configuration information. The definitions are used by
the Management Center framework to display all the tools, business objects, properties views, and
list views in Management Center. You also modify the
workspace_dir\WC\xml\config\com.ibm.commerce.catalog\wc-content-version.xml
file to remove the UI object configuration.
Procedure
-
Open HCL Commerce Developer. Switch to the Enterprise Explorer view.
-
Update the object definition file that contains all the definition for the business object you
want to disable content versioning for.
-
Open the object definition file for the business object. The files are located in .
The following table shows which definition file corresponds to the business objects.
Business objects |
File |
Category |
CatalogGroupPrimaryObjectDefinition.xml |
Sales Category |
SalesCatalogGroupPrimaryObjectDefinition.xml |
Sales Catalog |
SalesCatalogPrimaryObjectDefinition.xml |
Product |
ProductPrimaryObjectDefinition.xml |
SKU |
ProductSKUPrimaryObjectDefinition.xml |
Catalog Group SKU |
CatalogGroupSKUPrimaryObjectDefinition.xml |
Bundle |
BundlePrimaryObjectDefinition.xml |
Kit |
KitPrimaryObjectDefinition.xml |
-
Locate the
GetChildrenService
class for content version, and comment out the
content version service. This class is used to retrieve content versions from the server.
The following code snippet is the content version service definition for the CatalogGroup
business
object.
<GetChildrenService objectTypes="ContentVersion" url="/cmc/GetContentVersions">
<ServiceParam name="storeId"/>
<ServiceParam name="objectId" propertyName="catgroupId"/>
<ServiceParam name="objectType" value="CatalogGroup"/>
<ServiceParam name="basedOnVersionNumber" propertyName="basedOnVersionNumber"/>
</GetChildrenService>
-
Locate the
ReferenceObjectDefinition
class for content version, and comment
out this class. This class defines the object definition for the content version.
The following code snippet is the CatalogGroup business object definition for content
version.
<!---
Reference object definition for the versioned catalog group
-->
<ReferenceObjectDefinition baseDefinitionName="wcfBaseContentVersion" referencedType="CatalogGroup"/>
-
Locate the
CreateContentVersionClientAction
class, and comment out the class.
This class enables the create content version client action.
<!---
Create Content Version Client Action
-->
<CreateContentVersionClientAction/>
-
Save the file.
-
Remove the Versions tab in the business object properties view.
-
Open the properties view file for the business object. The files are located in the following
directory: .
Business objects |
File |
Category |
CategoryPropertiesView.xml |
Sales Category |
SalesCategoryPropertiesView.xml |
Sales Catalog |
SalesCatalogPropertiesView.xml |
Product |
ProductPropertiesView.xml |
SKU |
ProductSKUPropertiesView.xml |
Catalog Group SKU |
CatalogGroupSKUPropertiesView.xml |
Bundle |
BundlePropertiesView.xml |
Kit |
KitPropertiesView.xml |
-
Comment out the following element:
<PropertyTabPane name="manageVersionTab" text="${foundationResources.manageVersionTab}">
....
</PropertyTabPane>
-
Save your changes.
-
Update the server side.
For the server side, content versioning is disabled on the UI object level. You must modify
the wc-content-version.xml file.
Results
You cannot manage versions of the business object you disabled anymore. To re-enable content
versioning for that business object, uncomment the code snippets you commented out.