com.ibm.wbiserverspi.mediation

Class JavaMediationDataObject

  1. java.lang.Object
  2. extended bycom.ibm.wbiserverspi.mediation.JavaMediationDataObject

  1. public abstract class JavaMediationDataObject
  2. extends java.lang.Object
This class is implemented by Java Snippets that are called by Interface Mediation components configured to mediate WSDL interfaces.

An Interface Mediation component will call this class to perform mediation of a particular parameter in an interface. This is used for a DataObject parameter to be mediated (for example, WSDL interfaces).


Field Summary

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

Constructor Summary

Constructor and Description
JavaMediationDataObject()

Method Summary

Modifier and Type Method and Description
  1. com.ibm.wbiserver.relationshipservice.common.ExecutionContext
getContext()
  1. abstract
  2. commonj.sdo.DataObject
mediate(commonj.sdo.DataObject parameter)
This method should mediate a DataObject parameter in whatever user-defined manner is needed.
  1. void
setContext(com.ibm.wbiserver.relationshipservice.common.ExecutionContext arg0)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

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

Constructor Detail

JavaMediationDataObject

  1. public JavaMediationDataObject( )

Method Detail

mediate

  1. public abstract commonj.sdo.DataObject mediate( commonj.sdo.DataObject parameter)
  2. throws MediateException
This method should mediate a DataObject parameter in whatever user-defined manner is needed. It returns the mediated parameter.

If ExecutionContext is needed to call Relationship Service API, get the context with getContext().

Sample code:

 public DataObject mediate(commonj.sdo.DataObject arg0) throws MediateException {
     // Create the output DataObject.
     com.ibm.websphere.bo.BOFactory factory = (com.ibm.websphere.bo.BOFactory) new com.ibm.websphere.sca.ServiceManager()
                .locateService("com/ibm/websphere/bo/BOFactory");
     commonj.sdo.DataObject outputBO = factory.create("http://www.ibm.com/CustomerMediation", "OutputBO");
     // Obtain the attributes from the input parameter.
     String address = arg0.getString("Address");
     // Perform mediation and return the output parameter.
     outputBO.setString("HomeAddress", address);
     return outputBO;
 }
 
Parameters:
parameter - DataObject parameter to mediate
Returns:
DataObject the mediated DataObject parameter
Throws:

getContext

  1. public com.ibm.wbiserver.relationshipservice.common.ExecutionContext getContext( )

setContext

  1. public void setContext(com.ibm.wbiserver.relationshipservice.common.ExecutionContext arg0)