In cases where the noun can be divided into parts
that can be independently modified, the change control information
can also be independent. Part mediators can be registered to change
control mediators that manage the noun part by extending the wc-business-object-mediator.xml file.
Note: The
wc-business-object-mediator.xml file
cannot be extended to customize the part mediator in Feature Pack
6 and above.
About this task
A changed noun part will inherit the change control information
of its parent noun by default. However, if that part has been explicitly
configured to have independent change control, then a separate CMMETADATA record is used to manage change control
information for that part of the noun.To configure change control
on a specific part of a noun:
Procedure
- Launch WebSphere Commerce
Developer.
- Identify the business object mediator configuration file
where you will configure this noun part. In most cases, you will have
already created the file following the steps in Enabling change control for a noun. However, if you are enabling additional
change control for a noun part that is part of a default WebSphere
Commerce noun that is already configured in default configuration
files, you need to create a new file for your extensions.
- Determine the correct location for the configuration
file to work with, based on the following criteria:
- If you are enabling change control for a noun part that is part
of a default WebSphere Commerce service module, right-click on the WC\config\com.ibm.commerce.myservicemodulename-ext folder.
- If you are enabling change control for a noun part that is part
of a custom service module, right-click on the WC\config\com.ibm.commerce.myservicemodulename folder.
- If wc-business-object-mediator.xml does
not already exist in that directory, select . If the file already exists,
proceed to the next step.
- Select Create an XML file from scratch.
- Click Next.
- Name the file: wc-business-object-mediator.xml.
- Click Finish.
- Mediators for a noun are defined within the
<_config:object>
element
for the noun. In extensions to existing business object mediator configurations,
you will need to copy over this element in order to add mediators
for nouns and noun parts. In many customizations, this file (and the
appropriate <_config:object>
element) will already
have been generated for you as part of running the Data Service Layer
Wizard. You should never modify default WebSphere Commerce business
object mediator configuration files, as they can be overwritten when
you apply updates to WebSphere Commerce. - Mediators for a noun part are defined within the
<_config:mediator>
element
for the noun mediator. In extensions to existing business object mediator
configurations, you will need to copy over this element in order to
add mediators for noun parts. In many customizations, this file (and
the appropriate <_config:mediator>
element) will
already have been generated for you as part of running the Data Service
Layer Wizard. - Add a
<_config:part-mediator>
element
to the <_config:mediator>
element. Set the interfaceName
attribute
to com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.BusinessObjectMediator.
Because the part mediator implementation is coupled to the change
control mediator implementation for the noun, there is no unique interface
required.For example:
<_config:part-mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.BusinessObjectMediator">
- Create a
<_config:part-mediator-implementation>
element
with a className of com.ibm.commerce.context.content.locking.ChangeControlBusinessObjectPartMediatorImpl.
This is the part mediator implementation which the change control
mediator is expecting and dependent on. Any change control part mediator
must either be this class or a subclass of this class.For
example:
<_config:part-mediator-implementation className="com.ibm.commerce.context.content.locking.ChangeControlBusinessObjectPartMediatorImpl">
- Add a
<_config:mediator-properties>
element
and, within it, <_config:mediator-property>
elements
for the part mediator implementation. An explanation of the values,
and a sample set of configuration elements, are provided: - Optional: Additional properties of the change
control part mediation can be specified:
- A uniqueIDProperty can be specified to indicate the
property of the object that indicates the value that is stored in
the BOKEY2 column of the CMMETADATA</apiname > table. Specify this
property if the object property is a list and each list item has separate
change control information associated with it. If the entire list
shares the same change control information, then this property is
not required.</cmd></substep> <substep><cmd>A resourceContainerId
property can be specified on the change control part mediation implementation
if the <xref keyref=