Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.5.0)

E15033-03


com.bea.wli.sb.sources
Interface Transformer


public interface Transformer

The Transformer interface Instances of this class are used to transform one type of Source to another. The instance is responsible for indicating what types of sources it can convert between. Note that a transformer is required to support the full cross-product of transformations implied by the supported input and output sources. In other words, a transformer must support transforming any supported input source to any supported output source.


Method Summary
 java.util.Collection<java.lang.Class<? extends Source>> getSupportedInputs()
          return a collection of source classes from which the transformations are supported.
 java.util.Collection<java.lang.Class<? extends Source>> getSupportedOutputs()
          return a collection of source classes to which the transformations are supported.
<T extends Source>
T
transform(Source source, java.lang.Class<T> clazz, TransformOptions options)
          Perform a transformation (i.e.

 

Method Detail

getSupportedInputs

java.util.Collection<java.lang.Class<? extends Source>> getSupportedInputs()
return a collection of source classes from which the transformations are supported. StreamSource.class need not be returned in this collection since it is implied that the transformer supports it.

getSupportedOutputs

java.util.Collection<java.lang.Class<? extends Source>> getSupportedOutputs()
return a collection of source classes to which the transformations are supported. StreamSource.class need not be returned in this collection since it is implied that the transformer supports it

transform

<T extends Source> T transform(Source source,
                               java.lang.Class<T> clazz,
                               TransformOptions options)
                           throws TransformException
Perform a transformation (i.e. a conversion or translation) from one of the supported to another supported source class instance. Parameter clazz specifies the class of the desired return object. For example if clazz is StreamSource.class, the return value from the method is an instance of StreamSource.
Parameters:
source - the current source instance that we wish to transform
clazz - the desired type of source we are trying to create
options - the set of options that may influence the transformation (e.g. character set encoding)
Throws:
TransformException - if there is a failure while performing the transformation
java.lang.UnsupportedOperationException - if the requested transformation is not supported

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.5.0)

E15033-03


Copyright © 2008, 2011, Oracle. All rights reserved.