org.jboss.seam.rest.templating
Interface TemplatingProvider


public interface TemplatingProvider

Implementations of this interface represent integration points for various templating engines.

Author:
Jozef Hartinger

Method Summary
 void init(ServletContext servletContext)
          Initialization callback.
 void writeTo(Object result, ResponseTemplate annotation, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream os)
          Produces the response.
 

Method Detail

init

void init(ServletContext servletContext)
Initialization callback. The method is guaranteed to be invoked before calling the writeTo() method.

Parameters:
servletContext -

writeTo

void writeTo(Object result,
             ResponseTemplate annotation,
             Annotation[] annotations,
             MediaType mediaType,
             MultivaluedMap<String,Object> httpHeaders,
             OutputStream os)
             throws IOException
Produces the response.

Parameters:
result - object returned by the JAX-RS method
annotation - @ResponseTemplate annotation instance
annotations - annotations available on the JAX-RS method
mediaType - requested media type
httpHeaders - request HTTP headers
os - HTTP response output stream
Throws:
IOException


Copyright © 2011 Seam Framework. All Rights Reserved.