Class VelocityRepresentation

java.lang.Object
is.galia.resource.VelocityRepresentation
All Implemented Interfaces:
Representation

public class VelocityRepresentation extends Object implements Representation
Representation for Velocity templates.
  • Constructor Details

    • VelocityRepresentation

      public VelocityRepresentation(String templateName)
      Parameters:
      templateName - Template pathname, with leading slash.
    • VelocityRepresentation

      public VelocityRepresentation(String templateName, Map<String,Object> templateVars)
      Parameters:
      templateName - Template pathname, with leading slash.
      templateVars - Template variables, which will all be escaped.
    • VelocityRepresentation

      public VelocityRepresentation(String templateName, Map<String,Object> escapableTemplateVars, Map<String,Object> nonEscapableTemplateVars)
      Parameters:
      templateName - Template pathname, with leading slash.
      escapableTemplateVars - Template variables, which will be escaped.
      nonEscapableTemplateVars - Template variables, which will not be escaped.
  • Method Details

    • write

      public void write(OutputStream outputStream) throws IOException
      Description copied from interface: Representation
      Writes some kind of data (image data, HTML, JSON, etc.) to the given response stream for transmission to the client.
      Specified by:
      write in interface Representation
      Parameters:
      outputStream - Stream to write to, which should not be closed.
      Throws:
      IOException