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 WC_eardir\xml\config\com.ibm.commerce.catalog\wc-content-version.xml file
to remove the UI object configuration.
Procedure
- Open
WebSphere Commerce Developer and 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.def |
Sales Category |
SalesCatalogGroupPrimaryObjectDefinition.def |
Sales Catalog |
SalesCatalogPrimaryObjectDefinition.def |
Product |
ProductPrimaryObjectDefinition.def |
SKU |
ProductSKUPrimaryObjectDefinition.def |
Catalog Group SKU |
CatalogGroupSKUPrimaryObjectDefinition.def |
Bundle |
BundlePrimaryObjectDefinition.def |
Kit |
KitPrimaryObjectDefinition.def |
- 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.def |
Sales Category |
SalesCategoryPropertiesView.def |
Sales Catalog |
SalesCatalogPropertiesView.def |
Product |
ProductPropertiesView.def |
SKU |
ProductSKUPropertiesView.def |
Catalog Group SKU |
CatalogGroupSKUPropertiesView.def |
Bundle |
BundlePropertiesView.def |
Kit |
KitPropertiesView.def |
- 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.
What to do next
After you complete your customization:
- Right-click LOBTools Project;
then click Build OpenLaszlo Project to produce
an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent
directory. This setting is the default environment setting.
- Test your changes by viewing
them in the Management Center, using this URL: https://hostname:8000/lobtools.
- Deploy
your changes to your production environment.