com.sun.jersey.spi.template
Interface TemplateProcessor


public interface TemplateProcessor

A processor for templates.

Author:
Paul.Sandoz@Sun.Com

Method Summary
 java.lang.String resolve(java.lang.String path)
          Resolve an abstract template path into a fully qualified concrete template path that identifies a template.
 void writeTo(java.lang.String resolvedPath, java.lang.Object model, java.io.OutputStream out)
          Process a template and write the result to an output stream.
 

Method Detail

resolve

java.lang.String resolve(java.lang.String path)
Resolve an abstract template path into a fully qualified concrete template path that identifies a template.

Parameters:
path - the abstract template path
Returns:
the fully qualified concrete template path, otherwise null if the abstract template path cannot be resolved.

writeTo

void writeTo(java.lang.String resolvedPath,
             java.lang.Object model,
             java.io.OutputStream out)
             throws java.io.IOException
Process a template and write the result to an output stream.

Parameters:
resolvedPath - the resolved path identifying a template. This is obtained by calling the resolve method with an abstract template path.
model - the model to be passed to the template.
out - the output stream to write the result of processing the template.
Throws:
java.io.IOException - if there was an error processing the template.


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.