org.springframework.extensions.webscripts.atom
Class AtomWriter

java.lang.Object
  extended by org.springframework.extensions.webscripts.atom.AtomWriter
All Implemented Interfaces:
FormatWriter<org.apache.abdera.model.Base>

public class AtomWriter
extends Object
implements FormatWriter<org.apache.abdera.model.Base>

Convert mimetypes to Atom classes.

Author:
davidc

Field Summary
protected  AbderaService abderaService
           
 
Constructor Summary
AtomWriter()
           
 
Method Summary
 String getDestinationMimetype()
          Gets the mimetype to convert to
 Class<? extends org.apache.abdera.model.Base> getSourceClass()
          Gets the source Java class to convert from
 void setAbderaService(AbderaService abderaService)
          Sets the Abdera Service
 void setClass(Class<? extends org.apache.abdera.model.Base> clazz)
          Sets the Class to convert to
 void setMimetype(String mimetype)
          Sets the mimetype to convert from
 void setWriter(String writerName)
          Sets the Atom Writer
 void write(org.apache.abdera.model.Base object, OutputStream output)
          Converts Java object to mimetype
 void write(org.apache.abdera.model.Base object, Writer output)
          Converts Java object to mimetype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

abderaService

protected AbderaService abderaService
Constructor Detail

AtomWriter

public AtomWriter()
Method Detail

setAbderaService

public void setAbderaService(AbderaService abderaService)
Sets the Abdera Service

Parameters:
abderaService -

setClass

public void setClass(Class<? extends org.apache.abdera.model.Base> clazz)
Sets the Class to convert to

Parameters:
clazz -

setMimetype

public void setMimetype(String mimetype)
Sets the mimetype to convert from

Parameters:
mimetype -

setWriter

public void setWriter(String writerName)
Sets the Atom Writer

Parameters:
writerName -

getSourceClass

public Class<? extends org.apache.abdera.model.Base> getSourceClass()
Description copied from interface: FormatWriter
Gets the source Java class to convert from

Specified by:
getSourceClass in interface FormatWriter<org.apache.abdera.model.Base>
Returns:
Java class

getDestinationMimetype

public String getDestinationMimetype()
Description copied from interface: FormatWriter
Gets the mimetype to convert to

Specified by:
getDestinationMimetype in interface FormatWriter<org.apache.abdera.model.Base>
Returns:
mimetype

write

public void write(org.apache.abdera.model.Base object,
                  Writer output)
Description copied from interface: FormatWriter
Converts Java object to mimetype

Specified by:
write in interface FormatWriter<org.apache.abdera.model.Base>

write

public void write(org.apache.abdera.model.Base object,
                  OutputStream output)
Description copied from interface: FormatWriter
Converts Java object to mimetype

Specified by:
write in interface FormatWriter<org.apache.abdera.model.Base>


Copyright © 2009 SpringSource, Inc. All Rights Reserved.