com.ibm.wbiserver.map

Interface MapService


  1. 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

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT

Method Summary

Modifier and Type Method and Description
  1. 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.
  1. void
transform(java.lang.String mapTNS,java.lang.String mapName,java.util.HashMap inputObjects,java.util.HashMap outputObjects,com.ibm.wbiserver.relationshipservice.common.ExecutionContext callingContext)
Transforms the input objects to the output objects using the given map.
  1. void
transformSMO(java.lang.String mapTNS,java.lang.String mapName,java.util.HashMap inputObjects,java.util.HashMap outputObjects,java.util.HashMap assertedTypes,com.ibm.wbiserver.relationshipservice.common.ExecutionContext context)

Field Detail

  1. static final java.lang.String COPYRIGHT
See Also:

Method Detail

transform

  1. void transform(java.lang.String mapTNS,
  2. java.lang.String mapName,
  3. java.util.HashMap inputObjects,
  4. java.util.HashMap outputObjects,
  5. com.ibm.wbiserver.relationshipservice.common.ExecutionContext callingContext)
  6. throws com.ibm.wbiserver.map.exceptions.WBIMapServiceException
  7. com.ibm.wbiserver.map.exceptions.WBIMapNotFoundException
  8. com.ibm.wbiserver.map.exceptions.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:
    com.ibm.wbiserver.map.exceptions.WBIMapServiceException
    com.ibm.wbiserver.map.exceptions.WBIMapNotFoundException
    com.ibm.wbiserver.map.exceptions.WBIMapFailureException

    simpleTransform

    1. void simpleTransform(java.lang.String mapTNS,
    2. java.lang.String mapName,
    3. commonj.sdo.DataObject inputObject,
    4. commonj.sdo.DataObject outputObject)
    5. throws com.ibm.wbiserver.map.exceptions.WBIMapServiceException
    6. com.ibm.wbiserver.map.exceptions.WBIMapNotFoundException
    7. com.ibm.wbiserver.map.exceptions.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:
    com.ibm.wbiserver.map.exceptions.WBIMapServiceException
    com.ibm.wbiserver.map.exceptions.WBIMapNotFoundException
    com.ibm.wbiserver.map.exceptions.WBIMapFailureException

    transformSMO

    1. void transformSMO(java.lang.String mapTNS,
    2. java.lang.String mapName,
    3. java.util.HashMap inputObjects,
    4. java.util.HashMap outputObjects,
    5. java.util.HashMap assertedTypes,
    6. com.ibm.wbiserver.relationshipservice.common.ExecutionContext context)
    7. throws com.ibm.wbiserver.map.exceptions.WBIMapServiceException
    8. com.ibm.wbiserver.map.exceptions.WBIMapFailureException
    9. com.ibm.wbiserver.map.exceptions.WBIMapNotFoundException
    Parameters:
    mapTNS -
    mapName -
    inputObjects -
    outputObjects -
    assertedTypes -
    context -
    Throws:
    com.ibm.wbiserver.map.exceptions.WBIMapServiceException
    com.ibm.wbiserver.map.exceptions.WBIMapFailureException
    com.ibm.wbiserver.map.exceptions.WBIMapNotFoundException