Introduced in Feature Pack 2

Enabling the version services for custom object

You update the primary object definition for the custom object you want to version. In the primary object definition file, you add the functionality to create versions, update versions, and retrieve the list of versions for your custom object.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. In the Enterprise Explorer view, expand LOBTools > WebContent > config > Management_Center_component > objectDefinitions; where Management_Center_component is the name of the tool you want to customize.
  3. Locate the primary object definition for your custom object and open this file for editing.
  4. Add the GetContentVersion service. This service retrieves the different versions of your custom object.
    The following code snippet shows a sample GetContentVersions service for a Category object.
    <GetChildrenService objectTypes="ContentVersion" url="/cmc/GetContentVersions">
    		<ServiceParam name="storeId"/>
    		1<ServiceParam name="objectId" propertyName="catgroupId"/>
    		2<ServiceParam name="objectType" value="CatalogGroup"/>
    		<ServiceParam name="basedOnVersionNumber" propertyName="basedOnVersionNumber"/>
    </GetChildrenService>
    Replace the attributes values as follows:
    • 1 The propertyName represents the name of the property of the UI object that uniquely identifies the object. This is usually the same as the primary key of the topTable specified in the content versioning configuration file.
    • 2 The objectType value corresponds to the UI object type you want to version.
  5. Add the ReferenceObjectDefinition service.
    The following code snippet shows a sample reference object definition for Category object type:
    <ReferenceObjectDefinition baseDefinitionName="wcfBaseContentVersion" referencedType="CatalogGroup"/>
    Replace the value of the referencedType attribute with the UI object type you want to version.
  6. Add the CreateContentVersion client action.
    This action calls the service to create versions of your custom object.
    The following code snippet shows the create version client action:
    <CreateContentVersionClientAction/>
  7. Save and close the primary object definition file.