org.apache.tuscany.sca.databinding
Interface WrapperHandler<T>

All Known Implementing Classes:
DOMWrapperHandler, JAXBWrapperHandler, OMElementWrapperHandler, SDOWrapperHandler, XMLBeansWrapperHandler

public interface WrapperHandler<T>

A contract for transformers to deal with wrapping/unwrapping for WSDL wrapper style operations


Method Summary
 T create(Operation operation, boolean input)
          Create a wrapper element
 java.util.List getChildren(T wrapper, Operation operation, boolean input)
          Get a list of child elements from the wrapper
 DataType getWrapperType(Operation operation, boolean input)
          Get the data type for the wrapper
 boolean isInstance(java.lang.Object wrapper, Operation operation, boolean input)
          Check if the given data is an instance of the wrapper
 void setChildren(T wrapper, java.lang.Object[] childObjects, Operation operation, boolean input)
          Populate the wrapper element with the child objects
 

Method Detail

create

T create(Operation operation,
         boolean input)
Create a wrapper element

Parameters:
operation - The operation
input - Is it for input or output
Returns:
An object representing the wrapper element

getWrapperType

DataType getWrapperType(Operation operation,
                        boolean input)
Get the data type for the wrapper

Parameters:
operation - The operation
input - Is it for input or output?
Returns:
The data type of the wrapper, null if it's not a wrapper type

isInstance

boolean isInstance(java.lang.Object wrapper,
                   Operation operation,
                   boolean input)
Check if the given data is an instance of the wrapper

Parameters:
wrapper -
operation - The operation
input - Input or output
Returns:

setChildren

void setChildren(T wrapper,
                 java.lang.Object[] childObjects,
                 Operation operation,
                 boolean input)
Populate the wrapper element with the child objects

Parameters:
wrapper - The wrapper object
childObjects - The child objects
operation - The operation
input - Is it for input or output

getChildren

java.util.List getChildren(T wrapper,
                           Operation operation,
                           boolean input)
Get a list of child elements from the wrapper

Parameters:
wrapper - The wrapper object
operation - The operation
input - Is it for input or output
Returns:
child elements under the wrapper