public class ChangeControlBusinessObjectMediatorImpl extends AbstractBusinessObjectMediatorImpl implements ChangeControlBusinessObjectMediator
This change control mediator uses the CMMETADATA table to store change control information pertaining to business objects. It also uses the Locking Policy configuration to maintain and check whether business objects are locked or not.
The purpose of the change control mediator is to capture and maintain change control information for a noun and identified changeable parts of the noun. However, the support for change control in the NVP programming model with EJBs captures this information at a database layer. By configuring the resource container and manager ids, it is possible for this change control mediator to respect the previous locking information while creating the new change control information at the appropriate business object level.
This change mediator has a dependency on the ChangeControlBusinessObjectPartMediatorImpl class for handling individual noun parts that can have change control applied. Although this implementation manages the change control information for the container business object, it will use this part implementation to help create the metadata used to represent the individual change control for the noun part.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_ACTION
The change control metadata property of the action associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_PERSON_LOGONID
The change control metadata property of the logon ID of the user who is associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_PERSON_UNIQUEID
The change control metadata property of the person UniqueID of the user who is associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASK_IDENTIFIER
The change control metadata property of the task identifier of the task associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASK_NAME
The change control metadata property of the task localized name of the task associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASKGROUP_IDENTIIFER
The change control metadata property of the task group identifier of the task associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASKGROUP_NAME
The change control metadata property of the task group localized name of the task associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_TIMESTAMP
The change control metadata property of the timestamp associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_WORKSPACE_IDENTIIFER
The change control metadata property of the workspace identifier of the workspace associated with the change control information.
|
static java.lang.String | CHANGE_CONTROL_METADATA_PROPERTY_NAME_WORKSPACE_NAME
The change control metadata property of the workspace localized name of the workspace associated with the change control information.
|
protected ManagedResourceMetaData | iDefaultResourceManagerMetadata
The mediator configuration for the default resource manager.
|
protected ResourceContainerMetaData | iResourceContainerMetadata
The mediator configuration for the resource container ID.
|
protected java.util.List | iResourceManagersMetadata
The mediator configuration for resource manager.
|
protected java.lang.String | iUniqueIDPropertyBOKEY1
The mediator configuration for BOKEY1.
|
protected java.lang.String | iUniqueIDPropertyBOKEY2
The mediator configuration for BOKEY2.
|
protected java.lang.String | iUniqueIDPropertyBOKEY3
The mediator configuration for BOKEY3.
|
protected java.lang.String | iUniqueIDPropertyBOKEY4
The mediator configuration for BOKEY4.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_BOKEY1_UNIQUEIDPROPERTY
The change control mediator property that specifies the element of the object that represents the long value that is stored in the BOKEY1 column the the CMMETADATA table.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_BOKEY2_UNIQUEIDPROPERTY
The change control mediator property that specifies the element of the object that represents the long value that is stored in the BOKEY2 column the the CMMETADATA table.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_BOKEY3_UNIQUEIDPROPERTY
The change control mediator property that specifies the element of the object that represents the long value that is stored in the BOKEY3 column the the CMMETADATA table.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_BOKEY4_UNIQUEIDPROPERTY
The change control mediator property that specifies the element of the object that represents the long value that is stored in the BOKEY4 column the the CMMETADATA table.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_CHANGE_CONTROL_PART
The change control part mediator property that specifies the element of the isolated noun part that can be locked.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_LOCKDISABLED
The change control part mediator property value that indicates the mediator should not lock any records in CMMETADATA table
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_RESOURCECONTAINERID
The change control mediator property that specifies the container ID used when querying CMMETADATA table.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_RESOURCEMANAGERID
The change control mediator property that specifies the resource manager ID used when querying CMMETADATA table.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_RESOURCEMANAGERIDS
The change control mediator property that specifies the resource manager IDs used when querying the CMMETADATA table.
|
static java.lang.String | MEDIATOR_CONFIG_PARAMETER_UNIQUEIDPROPERTY
The change control mediator property that specifies the element of the business object that is used to resolve the CMMETADATA for the business object.
|
Constructor and Description |
---|
ChangeControlBusinessObjectMediatorImpl()
Creates an instance of a change control mediator that uses CMMETADATA to store the change control information.
|
Modifier and Type | Method and Description |
---|---|
boolean | canModify(java.lang.Object noun, java.lang.Object nounPart)
This method return whether the part of the business object specified can be modified or not.
|
protected ManagedResourceKey[] | createKey(java.lang.Object noun, java.lang.Object nounPart)
This method creates the managed resource key that represents the noun.
|
java.util.List | getChangeControlNounParts()
This method will return a list of XPath expressions, of type java.lang.String, that represents the breakdown of defined change control parts of the noun.
|
java.util.Map | getMetadata(java.lang.Object noun, java.lang.Object nounPart)
This method will return the change control metadata that is associated with the business objects specified.
|
void | initialize(java.util.List aListNoun)
Initialize the change mediator with the nouns submitted for the change request
|
void | initializeConfig(BusinessObjectMediatorConfig aConfig, java.util.Map properties)
This method initializes the change control mediator by extract the configuration properties that controls how the mediator will behave.
|
void | lock(java.lang.Object noun, java.lang.Object nounPart, short action)
This method will obtain a lock for the given part of the business object.
|
void | unlock(java.lang.Object noun, java.lang.Object nounPart)
This method will release the lock for the given part of the business object.
|
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_RESOURCECONTAINERID
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_LOCKDISABLED
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_RESOURCEMANAGERIDS
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_RESOURCEMANAGERID
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_UNIQUEIDPROPERTY
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_CHANGE_CONTROL_PART
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_BOKEY1_UNIQUEIDPROPERTY
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_BOKEY2_UNIQUEIDPROPERTY
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_BOKEY3_UNIQUEIDPROPERTY
public static final java.lang.String MEDIATOR_CONFIG_PARAMETER_BOKEY4_UNIQUEIDPROPERTY
protected java.lang.String iUniqueIDPropertyBOKEY1
protected java.lang.String iUniqueIDPropertyBOKEY2
protected java.lang.String iUniqueIDPropertyBOKEY3
protected java.lang.String iUniqueIDPropertyBOKEY4
protected java.util.List iResourceManagersMetadata
protected ManagedResourceMetaData iDefaultResourceManagerMetadata
protected ResourceContainerMetaData iResourceContainerMetadata
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_PERSON_LOGONID
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_PERSON_UNIQUEID
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_WORKSPACE_IDENTIIFER
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_WORKSPACE_NAME
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASKGROUP_IDENTIIFER
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASKGROUP_NAME
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASK_IDENTIFIER
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_TASK_NAME
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_ACTION
public static final java.lang.String CHANGE_CONTROL_METADATA_PROPERTY_NAME_TIMESTAMP
public ChangeControlBusinessObjectMediatorImpl()
public void initialize(java.util.List aListNoun) throws java.lang.Exception
public java.util.Map getMetadata(java.lang.Object noun, java.lang.Object nounPart)
This method will return the change control metadata that is associated with the business objects specified. If the specified noun part is classified as an individually controlled part, then the metadata pertains to that controlled part. Otherwise the change control metadata associated with the noun should be returned.
When change control metadata is found for the controlled part, the information that is returned consists of the person who created the information along with the workspace and task information about the change. The change control metadata included in the result includes the following properties.
If no metadata exists for the controlled part or the business object, then null is returned.
protected ManagedResourceKey[] createKey(java.lang.Object noun, java.lang.Object nounPart)
public boolean canModify(java.lang.Object noun, java.lang.Object nounPart)
public void lock(java.lang.Object noun, java.lang.Object nounPart, short action) throws AbstractApplicationException
public void unlock(java.lang.Object noun, java.lang.Object nounPart) throws AbstractApplicationException
public void initializeConfig(BusinessObjectMediatorConfig aConfig, java.util.Map properties)
public java.util.List getChangeControlNounParts()