IBM WebSphere Application ServerTM
Release 7

com.ibm.wbiserver.map
Interface MapService


public interface MapService

The MapService interface represents the client programming model for the Map Service. The MapService provides operations for transforming incoming BusinessGraphs/DataObjects to outgoing BusinessGraphs/ DataObjects.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void simpleTransform(java.lang.String mapTNS, java.lang.String mapName, commonj.sdo.DataObject inputObject, commonj.sdo.DataObject outputObject)
          Transforms an input BusinessGraph/DataObject to an output BusinessGraph/DataObject using a given map.
 void transform(java.lang.String mapTNS, java.lang.String mapName, java.util.HashMap inputObjects, java.util.HashMap outputObjects, ExecutionContext callingContext)
          Transforms the input objects to the output objects using the given map.
 void transformSMO(java.lang.String mapTNS, java.lang.String mapName, java.util.HashMap inputObjects, java.util.HashMap outputObjects, java.util.HashMap assertedTypes, ExecutionContext context)
           
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

transform

void transform(java.lang.String mapTNS,
               java.lang.String mapName,
               java.util.HashMap inputObjects,
               java.util.HashMap outputObjects,
               ExecutionContext callingContext)
               throws WBIMapServiceException,
                      WBIMapNotFoundException,
                      WBIMapFailureException
Transforms the input objects to the output objects using the given map. The inputObjects and outputObjects is a HashMap of BusinessGraph/DataObject keyed on a variable name. This variable name is provided by the user when creating the map definition

example
<map:inputBusinessObjectVariable name="source_SAPCustomerBG" .../>
<map:outputBusinessObjectVariable name="target_CustomerBG" .../>

variable name for the input SAPCustomerBG is source_SAPCustomer
variable name for the output CustomerBG is target_CustomerBG

For a reverse map, the same variable names should be used for the BusinessGraph/DataObject as that for the forward map.

The ExecutionContext is needed only if the map has relationship calls. It contains the following

  • Context string indicating whether this is a request, response, delivery or failure. This context is used for relationship calls.
  • HashMap of original input BusinessGraph/DataObject. This original input object is used by relationships called from an ASBO to GBO reverse map for Create.
  • HashMap of original output BusinessGraph/DataObject. This original output object is used by relationships called from an ASBO to GBO reverse map for Delete.

    Parameters:
    mapTNS - Targetnamespace of the map, available in the map definition.
    mapName - Name of the map
    inputObjects - HashMap of input objects to be transformed. HashMap contains variable name and BusinessGraph/DataObject pairs, keyed on variable name.
    outputObjects - HashMap of output objects that will be generated. HashMap contains variable name and BusinessObject/DataObject pairs, keyed on variable name. An empty HashMap can be passed in as a parameter and will be populated with the output objects as a result of the method call.
    callingContext - contains the context string and the original input and output BusinessGraph/DataObject.
    Throws:
    WBIMapServiceException
    WBIMapNotFoundException
    WBIMapFailureException

  • simpleTransform

    void simpleTransform(java.lang.String mapTNS,
                         java.lang.String mapName,
                         commonj.sdo.DataObject inputObject,
                         commonj.sdo.DataObject outputObject)
                         throws WBIMapServiceException,
                                WBIMapNotFoundException,
                                WBIMapFailureException
    Transforms an input BusinessGraph/DataObject to an output BusinessGraph/DataObject using a given map. This method should be used only if the map does not contain any relationship calls.

    Parameters:
    mapTNS - Targetnamespace of the map
    mapName - Name of the map
    inputObject - The input object to be transformed by the map
    outputObject - The output object that will be created as a result of the transformation. The output object has to be created and passed into the method and cannot be null.
    Throws:
    WBIMapServiceException
    WBIMapNotFoundException
    WBIMapFailureException

    transformSMO

    void transformSMO(java.lang.String mapTNS,
                      java.lang.String mapName,
                      java.util.HashMap inputObjects,
                      java.util.HashMap outputObjects,
                      java.util.HashMap assertedTypes,
                      ExecutionContext context)
                      throws WBIMapServiceException,
                             WBIMapFailureException,
                             WBIMapNotFoundException
    Parameters:
    mapTNS -
    mapName -
    inputObjects -
    outputObjects -
    assertedTypes -
    context -
    Throws:
    WBIMapServiceException
    WBIMapFailureException
    WBIMapNotFoundException

    IBM WebSphere Application ServerTM
    Release 7