com.bea.ld.dsmediator.update
Class DataServiceMediatorContext

java.lang.Object
  extended bycom.bea.ld.dsmediator.update.DataServiceMediatorContext

public class DataServiceMediatorContext
extends java.lang.Object


Constructor Summary
DataServiceMediatorContext()
           
 
Method Summary
 void addView2TargetDataObjectMap(commonj.sdo.DataObject modifiedObj, java.lang.String binding, commonj.sdo.DataObject targetDataObject)
           
static DataServiceMediatorContext currentContext()
           
 void executeUpdatePlan(UpdatePlan updatePlan)
          iterate through individual datagraph to trigger submit
 java.lang.String getApplicationProperty(java.lang.String propertyName, java.lang.String defaultValue)
          access the application properties defined in MBean console
 java.lang.String getContainerDSName(commonj.sdo.DataGraph child)
           
 commonj.sdo.DataGraph getContainerSDO(commonj.sdo.DataGraph child)
           
 commonj.sdo.DataGraph getCurrentCompositeObject()
           
 com.bea.ld.dsmediator.update.DecompositionMapDocument.DecompositionMap getCurrentDecompositionMap()
           
 UpdatePlan getCurrentUpdatePlan(commonj.sdo.DataGraph sdo)
          For a given view SDO object, decompose it and return a update plan Update plan is a sequence of nodes decomposed from original View SDO object.
 UpdatePlan getCurrentUpdatePlan(commonj.sdo.DataGraph sdo, boolean checkLineage)
          For a given view SDO object, decompose it and return a update plan Update plan is a sequence of nodes decomposed from original View SDO object.
 com.bea.ld.server.AppLogger getLogger()
           
 java.lang.Object[] getSDOChildren()
           
 commonj.sdo.DataObject getTargetDataObjectForView(commonj.sdo.DataObject viewDataObject, java.lang.String binding)
           
 commonj.sdo.DataGraph getTopCompositeObject()
           
 java.util.Properties[] popReturnKey()
           
 void pushReturnKey(java.util.Properties returnKey)
          Use inside updateoverride to indicate the return key values to the caller of submit method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataServiceMediatorContext

public DataServiceMediatorContext()
Method Detail

getCurrentDecompositionMap

public com.bea.ld.dsmediator.update.DecompositionMapDocument.DecompositionMap getCurrentDecompositionMap()
Returns:
Decomposition Map for current dataServiceMetaData object being procesed in XMLBean form

getContainerSDO

public commonj.sdo.DataGraph getContainerSDO(commonj.sdo.DataGraph child)
Returns:
The dependable SDO object of current SDO

getContainerDSName

public java.lang.String getContainerDSName(commonj.sdo.DataGraph child)
Parameters:
child - DataGraph
Returns:
URI of the dataservice from which the current SDO object comes

getSDOChildren

public java.lang.Object[] getSDOChildren()
Returns:
All dependent SDO objects of current SDO

getCurrentCompositeObject

public commonj.sdo.DataGraph getCurrentCompositeObject()
Returns:
The direct containing composite object that is being decomposed. return null if client submit a datasource level object for update

getTopCompositeObject

public commonj.sdo.DataGraph getTopCompositeObject()
Returns:
The original composite object that is being decomposed. return null if client submit a datasource level object for update

pushReturnKey

public void pushReturnKey(java.util.Properties returnKey)
Use inside updateoverride to indicate the return key values to the caller of submit method

Parameters:
returnKey -

popReturnKey

public java.util.Properties[] popReturnKey()

getCurrentUpdatePlan

public UpdatePlan getCurrentUpdatePlan(commonj.sdo.DataGraph sdo)
For a given view SDO object, decompose it and return a update plan Update plan is a sequence of nodes decomposed from original View SDO object. Each node in sequence can either be a SDO instance only or a SDO with a sub-update plan, which is another sequence of nodes. in View SDO, if a parent DataObject get updated, at least partially due to the changes on the DataObjects nested inside it, then SDO instances corresponding to those children DataObjects will be addChild into sub-update plan. Update plan contains inserted, updated, deleted and unchanged SDO instances as well. Update plan is constructed from a LinkedHashMap tree, independent SDO instances are addChild in the same level and update sequence on their source dataobjects is preserved

Parameters:
sdo -

getCurrentUpdatePlan

public UpdatePlan getCurrentUpdatePlan(commonj.sdo.DataGraph sdo,
                                       boolean checkLineage)
For a given view SDO object, decompose it and return a update plan Update plan is a sequence of nodes decomposed from original View SDO object. Each node in sequence can either be a SDO instance only or a SDO with a sub-update plan, which is another sequence of nodes. in View SDO, if a parent DataObject get updated, at least partially due to the changes on the DataObjects nested inside it, then SDO instances corresponding to those children DataObjects will be addChild into sub-update plan. Update plan contains inserted, updated, deleted and unchanged SDO instances as well. Update plan is constructed from a LinkedHashMap tree, independent SDO instances are addChild in the same level and update sequence on their source dataobjects is preserved

Parameters:
sdo -
checkLineage - boolean flag, default is true, when check lineage is enabled, all updated properties must have lineage, otherwise error will be thrown back to user

executeUpdatePlan

public void executeUpdatePlan(UpdatePlan updatePlan)
iterate through individual datagraph to trigger submit

Parameters:
updatePlan -

currentContext

public static DataServiceMediatorContext currentContext()
Returns:
DataServiceMediatorContext for current user submit session

getLogger

public com.bea.ld.server.AppLogger getLogger()

getApplicationProperty

public java.lang.String getApplicationProperty(java.lang.String propertyName,
                                               java.lang.String defaultValue)
access the application properties defined in MBean console

Parameters:
propertyName -
defaultValue -
Returns:
property value or the default value is property is not exist

addView2TargetDataObjectMap

public void addView2TargetDataObjectMap(commonj.sdo.DataObject modifiedObj,
                                        java.lang.String binding,
                                        commonj.sdo.DataObject targetDataObject)

getTargetDataObjectForView

public commonj.sdo.DataObject getTargetDataObjectForView(commonj.sdo.DataObject viewDataObject,
                                                         java.lang.String binding)


Copyright © 2006 BEA Systems Inc. All Rights Reserved.