org.exoplatform.services.rest.transformer
Class InputEntityTransformer

java.lang.Object
  extended by org.exoplatform.services.rest.transformer.InputEntityTransformer
All Implemented Interfaces:
GenericEntityTransformer, GenericInputEntityTransformer
Direct Known Subclasses:
DeserializableTransformer, JAXBInputTransformer, Json2BeanInputTransformer, PassthroughInputTransformer, StringInputTransformer, XMLInputTransformer

public abstract class InputEntityTransformer
extends Object
implements GenericInputEntityTransformer

Basic implementations of GenericInputEntityTransformer.

Version:
$Id: $
Author:
Andrey Parfonov

Field Summary
protected  Class<?> entityType
          type of Objects which InputEntityTransformer can serve.
 
Constructor Summary
InputEntityTransformer(Object... components)
          With this constructor from ExoContainer can be got any Objects.
 
Method Summary
 Class<?> getType()
          Get the type of served Objects.
abstract  Object readFrom(InputStream entityDataStream)
          Build Objects from given InputStream.
 void setType(Class<?> entityType)
          Set the type of Objects which should be serve by InputEntityTransformer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityType

protected Class<?> entityType
type of Objects which InputEntityTransformer can serve.

Constructor Detail

InputEntityTransformer

public InputEntityTransformer(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

setType

public final void setType(Class<?> entityType)
Set the type of Objects which should be serve by InputEntityTransformer.

Parameters:
entityType - the type of entity.

getType

public final Class<?> getType()
Get the type of served Objects.

Returns:
type of served object.

readFrom

public abstract Object readFrom(InputStream entityDataStream)
                         throws IOException
Build Objects from given InputStream.

Parameters:
entityDataStream - from this InputStream Object should be red.
Returns:
Object builded Object.
Throws:
IOException - Input/Output Exception.


Copyright © 2009 eXo Platform SAS. All Rights Reserved.