Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you under the Apache License, Version 2.0 (the
   * "License"); you may not use this file except in compliance
   * with the License.  You may obtain a copy of the License at
   *
  *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.tuscany.sca.databinding;
 
 import java.util.Map;
 
This interface will be used as a Tuscany system service to perform data mediations Mediate the data from one type to the other one

Version:
$Rev: 937310 $ $Date: 2010-04-23 15:27:50 +0100 (Fri, 23 Apr 2010) $
Tuscany.spi.extension.asclient:
 
 public interface Mediator {

    
Mediate the data from the source type to the target type

Parameters:
source The data to be mediated
sourceDataType Data type for the source data
targetDataType Data type for the target data
context
Returns:
 
     Object mediate(Object sourceDataType sourceDataTypeDataType targetDataTypeMap<StringObjectcontext);

    
Mediate the source data into the target which is a sink to receive the data

Parameters:
source The data to be mediated
target The sink to receive data
sourceDataType Data type for the source data
targetDataType Data type for the target data
 
     void mediate(Object source,
                  Object target,
                  DataType sourceDataType,
                  DataType targetDataType,
                  Map<StringObjectcontext);

    
Transform the input parameters for the source operation to the expected parameters for the target operation

Parameters:
input The input data, typically an array of parameters
sourceOperation The source operation
targetOperation The target operation
metadata Additional metadata
Returns:
The transformed input data for the target operation
 
     Object mediateInput(Object inputOperation sourceOperationOperation targetOperationMap<StringObjectmetadata);

    
Transform the return value for the target operation to the expected return value for the source operation

Parameters:
output The output data, typically the return value
sourceOperation The source operation
targetOperation The target operation
metadata Additional metadata
Returns:
The transformed output data for the source operation
 
     Object mediateOutput(Object output,
                          Operation sourceOperation,
                          Operation targetOperation,
                          Map<StringObjectmetadata);

    
Transform the fault data for the target operation to the expected fault data for the source operation

Parameters:
fault The fault data, such as Java exception or fault message
sourceOperation The source operation
targetOperation The target operation
metadata Additional metadata
Returns:
The transformed fault data for the source operation
 
     Object mediateFault(Object faultOperation sourceOperationOperation targetOperationMap<StringObjectmetadata);

    
Copy the data

Parameters:
data The orginal data
dataType The data type
Returns:
The copy
    Object copy(Object dataDataType dataType);

    
Copy the data

Parameters:
data The orginal data
dataType The source data type
targetDataType The target data type
Returns:
The copy
    Object copy(Object dataDataType sourceDataTypeDataType targetDataType);

    
Copy the data

Parameters:
data The orginal data
sourceDataType The source data type
targetDataType The target data type
sourceOperation The source operation
targetOperation The target operation
Returns:
The copy
    Object copy(Object data,
                DataType sourceDataType,
                DataType targetDataType,
                Operation sourceOperation,
                Operation targetOperation);
    
    
Copy an array of data objects passed to an operation

Parameters:
data array of objects to copy
Returns:
the copy
    public Object copyInput(Object inputOperation operation);

    
Copy an array of data objects passed to an operation

Parameters:
sourceOperation The source operation
targetOperation The target operation
Returns:
the copy
    public Object copyInput(Object inputOperation sourceOperationOperation targetOperation);

    
Copy the output data

Parameters:
data The orginal output
operation The operation
Returns:
The copy
    Object copyOutput(Object dataOperation operation);

    
Copy the output data from target operation into source operation

Parameters:
data The orginal output
sourceOperation The operation
targetOperation The target operation
Returns:
The copy
    Object copyOutput(Object dataOperation sourceOperationOperation targetOperation);

    
Copy the fault data

Parameters:
fault The orginal fault data
operation The operation
Returns:
The copy
    Object copyFault(Object faultOperation operation);

    
Copy the fault data from target operation into source operation

Parameters:
fault The orginal fault data
sourceOperation The operation
targetOperation The target operation
Returns:
The copy
    Object copyFault(Object faultOperation sourceOperationOperation targetOperation);

    
Get the DataBindings used by this mediator.

Returns:
Get the Transformers used by this mediator.

Returns:
Create an instance of TransformationContext

Returns:
Create an instance of TransformationContext

Parameters:
sourceDataType
targetDataType
metadata
Returns:
                                                      DataType targetDataType,
                                                      Map<StringObjectmetadata);
New to GrepCode? Check out our FAQ X