| org.restlet.resource.OutputRepresentation org.restlet.ext.velocity.TemplateRepresentation
TemplateRepresentation | public class TemplateRepresentation extends OutputRepresentation (Code) | | Velocity template representation. Useful for dynamic string-based
representations.
See Also: Velocity home page author: Jerome Louvel (contact@noelios.com) |
TemplateRepresentation | public TemplateRepresentation(String templateName, MediaType mediaType)(Code) | | Constructor.
Parameters: templateName - The Velocity template's name. The full path is resolved bythe configuration. Parameters: mediaType - The representation's media type. |
TemplateRepresentation | public TemplateRepresentation(String templateName, Map<String, Object> dataModel, MediaType mediaType)(Code) | | Constructor.
Parameters: templateName - The Velocity template's name. The full path is resolved bythe configuration. Parameters: dataModel - The Velocity template's data model. Parameters: mediaType - The representation's media type. |
getDataModel | public Map<String, Object> getDataModel()(Code) | | Returns the template's data model.
The template's data model. |
getEngine | public VelocityEngine getEngine()(Code) | | Returns the Velocity engine.
The Velocity engine. |
setDataModel | public Map<String, Object> setDataModel(Map<String, Object> dataModel)(Code) | | Sets the template's data model.
Parameters: dataModel - The template's data model. The template's data model. |
write | public void write(OutputStream outputStream) throws IOException(Code) | | Writes the datum as a stream of bytes.
Parameters: outputStream - The stream to use when writing. |
|
|