net.sf.xbus.protocol.simple
Class TextXSLTTransformer

java.lang.Object
  extended by net.sf.xbus.protocol.simple.TextXSLTTransformer
All Implemented Interfaces:
Transformer

public class TextXSLTTransformer
extends java.lang.Object
implements Transformer

TODO: Kommentierung


Field Summary
protected static java.lang.String XSL_LOCATION
           
 
Constructor Summary
TextXSLTTransformer()
           
 
Method Summary
protected  javax.xml.transform.Transformer getXSLTransformer(java.lang.String xslFile)
          Returns a Transformer object needed for the XSLT processing.
 java.lang.Object transform(java.lang.Object inObject, XBUSSystem source, XBUSSystem destination, Message destinationMessage)
          The transform method is automatically called by the xBus during the routing of messages.
protected  java.lang.String transformXML(java.lang.String xmlOld, java.lang.String xslFile, Message message)
          Transforms the given XML-data with the given XSL-stylesheet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSL_LOCATION

protected static final java.lang.String XSL_LOCATION
Constructor Detail

TextXSLTTransformer

public TextXSLTTransformer()
Method Detail

transform

public java.lang.Object transform(java.lang.Object inObject,
                                  XBUSSystem source,
                                  XBUSSystem destination,
                                  Message destinationMessage)
                           throws XException
The transform method is automatically called by the xBus during the routing of messages.

Specified by:
transform in interface Transformer
Parameters:
inObject - either the request or response that shall be transformed to another format
source - the XBUSSystem of the message of the inObject
destination - the XBUSSystem of the target message
destinationMessage - the target message eventually contains more information necessary for transforming
Returns:
the transformed Object, written to either the request or response of the target message
Throws:
XException

transformXML

protected java.lang.String transformXML(java.lang.String xmlOld,
                                        java.lang.String xslFile,
                                        Message message)
                                 throws XException
Transforms the given XML-data with the given XSL-stylesheet. After the XSL-transformation the so-called XBUS_Stylets are processed.

Parameters:
xmlOld - the source XML-data
xslFile - the name of the XSL-stylesheet
message - the destination message
Throws:
XException - if something goes wrong

getXSLTransformer

protected javax.xml.transform.Transformer getXSLTransformer(java.lang.String xslFile)
                                                     throws XException
Returns a Transformer object needed for the XSLT processing. The Transformers are cached for every thread and every XSLT stylesheet.

Throws:
XException