org.exoplatform.services.rest.transformer
Class OutputEntityTransformer

java.lang.Object
  extended by org.exoplatform.services.rest.transformer.OutputEntityTransformer
All Implemented Interfaces:
GenericEntityTransformer, GenericOutputEntityTransformer
Direct Known Subclasses:
Bean2JsonOutputTransformer, JAXBOutputTransformer, PassthroughOutputTransformer, SerializableTransformer, StringOutputTransformer, XMLOutputTransformer, XSLT4DOMOutputTransformer, XSLT4SourceOutputTransformer

public abstract class OutputEntityTransformer
extends Object
implements GenericOutputEntityTransformer

Basic implementation of GenericOutputEntityTransformer.

Version:
$Id: $
Author:
Andrey Parfonov

Field Summary
protected  Map<String,String> transformerParameters
          External parameters for transformation.
 
Constructor Summary
OutputEntityTransformer(Object... components)
          With this constructor from ExoContainer can be got any Objects.
 
Method Summary
 void addTransformerParameters(Map<String,String> trfParams)
           
abstract  void writeTo(Object entity, OutputStream entityDataStream)
          Write entity to OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transformerParameters

protected Map<String,String> transformerParameters
External parameters for transformation. In this Map parameters can be added by ResourceContainer.

See Also:
org.exoplatform.services.rest.Response#setTransformerParameters()., Response.getTransformerParameters().
Constructor Detail

OutputEntityTransformer

public OutputEntityTransformer(Object... components)
With this constructor from ExoContainer can be got any Objects.

Parameters:
components - the Objects from ExoContainer.
See Also:
EntityTransformerFactory.newTransformer(Class).
Method Detail

addTransformerParameters

public void addTransformerParameters(Map<String,String> trfParams)
Parameters:
trfParams - the new parameters for transformer. Can be null if ResourceContainer does not set any parameters.

writeTo

public abstract void writeTo(Object entity,
                             OutputStream entityDataStream)
                      throws IOException
Write entity to OutputStream.

Parameters:
entity - the Object which should be writed
entityDataStream - the OutputStream
Throws:
IOException - Input/Output Exception


Copyright © 2009 eXo Platform SAS. All Rights Reserved.