org.jboss.seam.rest.templating.velocity
Class VelocityProvider
java.lang.Object
org.jboss.seam.rest.templating.velocity.VelocityProvider
- All Implemented Interfaces:
- TemplatingProvider
@ApplicationScoped
public class VelocityProvider
- extends Object
- implements TemplatingProvider
Renders response using Apache Velocity.
- Author:
- Jozef Hartinger
VelocityProvider
public VelocityProvider()
init
public void init(ServletContext servletContext)
- Description copied from interface:
TemplatingProvider
- Initialization callback. The method is guaranteed to be invoked before calling the writeTo() method.
- Specified by:
init
in interface TemplatingProvider
writeTo
public void writeTo(Object o,
ResponseTemplate annotation,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream os)
throws IOException
- Description copied from interface:
TemplatingProvider
- Produces the response.
- Specified by:
writeTo
in interface TemplatingProvider
- Parameters:
o
- object returned by the JAX-RS methodannotation
- @ResponseTemplate annotation instanceannotations
- annotations available on the JAX-RS methodmediaType
- requested media typehttpHeaders
- request HTTP headersos
- HTTP response output stream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011 Seam Framework. All Rights Reserved.