Enabling change control for the noun
You can enable change control for a noun by registering
a change control mediator for the noun. No Java coding is required. The
data service layer uses the registration information and the change
control mediator to validate whether the object can be modified and
to create locks when the object is modified. All change control uses
a common change control mediator implementation, which is provided
for you by default.
About this task
When you lock a noun, its noun parts are also locked. However, you can provide separate change control for noun parts. For more information, see Enabling change control for a noun part.
To register a change control business object mediator for a noun:
Procedure
Results
<?xml version="1.0" encoding="UTF-8"?>
<_config:BusinessObjectMediatorConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-business-object-mediator.xsd"
xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
<!-- Here are the read and change mediator for the Project -->
<!-- ******************* TODO ******************** -->
<!-- ******************* Below line is demo code, pls replace it with the physical type object as something like
<_config:object logicalType="com.mycompany.commerce.project.facade.datatypes.ProjectType"
physicalType="com.mycompany.commerce.project.facade.server.entity.datatypes.Project">
******************** -->
<_config:object logicalType="com.mycompany.commerce.project.facade.datatypes.ProjectType"
physicalType="com.mycompany.commerce.project.facade.server.entity.datatypes.Xproject">
<_config:mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ReadBusinessObjectMediator"
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectMediator">
<_config:part-mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ReadBusinessObjectPartMediator">
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectDescriptionMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectMaterialMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectInstructionMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectColRelMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectToolMediator" />
</_config:part-mediator>
</_config:mediator>
<_config:mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ChangeBusinessObjectMediator"
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectMediator">
<_config:part-mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ChangeBusinessObjectPartMediator">
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectBasePartMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectDescriptionMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectMaterialMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectInstructionMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectToolMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectPrjColRelMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectMaterialCatentryMediator" />
</_config:part-mediator>
</_config:mediator>
<!-- Here is the example to enable property mapping to map Logical Data Object's User Data into Physical Data Object User Data
<_config:property-mapping logicalType="com.mycompany.commerce.project.facade.datatypes.ProjectType"
physicalType="com.mycompany.commerce.project.facade.server.entity.datatypes.Project">
<_config:userDataProperty logicalPropertyName="Logical User Data name" physicalPropertyName="Physical User Data name" />
</_config:property-mapping>
-->
<!-- Added for Workspace support for project-->
<_config:mediator className="com.ibm.commerce.context.content.locking.ChangeControlBusinessObjectMediatorImpl"
interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ChangeControlBusinessObjectMediator">
<_config:mediator-properties>
<_config:mediator-property name="uniqueIDProperty" value="ProjectIdentifier/UniqueID" />
<_config:mediator-property name="resourceManagerId" value="1" />
<_config:mediator-property name="resourceContainerId" value="10005" />
</_config:mediator-properties>
</_config:mediator>
</_config:object>
<_config:object logicalType="com.mycompany.commerce.project.facade.datatypes.ProjectCollectionType"
physicalType="com.mycompany.commerce.project.facade.server.entity.datatypes.Xprjcol">
<_config:mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ReadBusinessObjectMediator"
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectCollectionMediator">
<_config:part-mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ReadBusinessObjectPartMediator">
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ReadProjectCollectionDescriptionMediator" />
</_config:part-mediator>
</_config:mediator>
<_config:mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ChangeBusinessObjectMediator"
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectCollectionMediator">
<_config:part-mediator interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ChangeBusinessObjectPartMediator">
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectCollectionBasePartMediator" />
<_config:part-mediator-implementation
className="com.mycompany.commerce.project.facade.server.services.dataaccess.bom.mediator.ChangeProjectCollectionDescriptionMediator" />
</_config:part-mediator>
</_config:mediator>
<!-- Added for Workspace support for ProjectCollection-->
<_config:mediator className="com.ibm.commerce.context.content.locking.ChangeControlBusinessObjectMediatorImpl"
interfaceName="com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.ChangeControlBusinessObjectMediator">
<_config:mediator-properties>
<_config:mediator-property name="uniqueIDProperty" value="ProjectCollectionIdentifier/UniqueID"/>
<_config:mediator-property name="resourceManagerId" value="9" />
<_config:mediator-property name="resourceContainerId" value="10005" />
</_config:mediator-properties>
</_config:mediator>
</_config:object>
</_config:BusinessObjectMediatorConfiguration>