com.itmill.toolkit.terminal.web
Class UIDLTransformer

java.lang.Object
  extended by com.itmill.toolkit.terminal.web.UIDLTransformer

public class UIDLTransformer
extends Object

Class implementing the UIDLTransformer. The transformer should not be created directly; it should be contructed using getTransformer provided by UIDLTransformerFactory. After the transform has been done, the transformer can be recycled with releaseTransformer by UIDLTransformerFactory.

Since:
3.0
Version:
4.1.4
Author:
IT Mill Ltd.

Nested Class Summary
protected  class UIDLTransformer.TransformerErrorHandler
           
 
Field Summary
protected static TransformerFactory xsltFactory
          XSLT factory.
 
Constructor Summary
UIDLTransformer(UIDLTransformerType type, ThemeSource themes, ApplicationServlet webAdapterServlet)
          UIDLTransformer constructor.
 
Method Summary
 WebPaintTarget getPaintTarget(HttpVariableMap variableMap)
          Attaches the output stream to transformer and get corresponding UIDLStream for writing UI description language trough transform to given output.
 UIDLTransformerType getTransformerType()
          Gets the type of the transformer.
protected  void reset()
          Resets the transformer, before it can be used again.
 void transform(OutputStream outputStream)
          Transforms the UIDL to HTML and output to the OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xsltFactory

protected static TransformerFactory xsltFactory
XSLT factory.

Constructor Detail

UIDLTransformer

public UIDLTransformer(UIDLTransformerType type,
                       ThemeSource themes,
                       ApplicationServlet webAdapterServlet)
                throws UIDLTransformerException
UIDLTransformer constructor.

Parameters:
type - the Type of the transformer.
themes - the theme implemented by the transformer.
webAdapterServlet - the Adapter servlet.
Throws:
UIDLTransformerException - UIDLTransformer exception is thrown, if the transform can not be created.
Method Detail

getTransformerType

public UIDLTransformerType getTransformerType()
Gets the type of the transformer.

Returns:
the Type of the transformer.

getPaintTarget

public WebPaintTarget getPaintTarget(HttpVariableMap variableMap)
Attaches the output stream to transformer and get corresponding UIDLStream for writing UI description language trough transform to given output.

Parameters:
variableMap - the variable map used for UIDL creation.
Returns:
returns UI description language stream, that can be used for writing UIDL to transformer.

reset

protected void reset()
Resets the transformer, before it can be used again. This also interrupts any ongoing transform and thus should not be called before the transform is ready. This is automatically called by the UIDLTransformFactory, when the UIDLTransformer has been released.

See Also:
UIDLTransformerFactory.releaseTransformer(UIDLTransformer)

transform

public void transform(OutputStream outputStream)
               throws UIDLTransformerException
Transforms the UIDL to HTML and output to the OutputStream.

Parameters:
outputStream - the output stream to render to.
Throws:
UIDLTransformerException - UIDLTransformer exception is thrown, if the transform can not be created.


Copyright © 2000-2008 IT Mill Ltd. All Rights Reserved.