org.niggle.templates.velocityimpl
Class VelocityPage

java.lang.Object
  |
  +--org.niggle.templates.velocityimpl.VelocityPage
All Implemented Interfaces:
Page

Deprecated. Use FreeMarker instead.

public class VelocityPage
extends java.lang.Object
implements Page

An implementation of the org.niggle.templates.Page interface that uses the Velocity template engine.

Author:
Jonathan Revusky

Constructor Summary
VelocityPage(org.apache.velocity.Template template, org.apache.velocity.context.Context context, java.util.Locale locale, java.lang.ClassLoader cl)
          Deprecated. Creates a new VelocityPage.
 
Method Summary
 void expose(java.lang.String key, boolean b)
          Deprecated. Expose internal data, publishing it to make it available to the page Template.
 void expose(java.lang.String key, java.lang.Object item)
          Deprecated. Expose internal data, publishing it to make it available to the page template.
 void exposeResourceBundle(java.lang.String lookupName)
          Deprecated. expose an instance of java.util.ResourceBundle as a template hash variable
 java.util.Locale getLocale()
          Deprecated.  
 void outputPage(javax.servlet.http.HttpServletResponse response)
          Deprecated. Prepare the cooked output, filling in the parameters with data values, and send it to the end user via the servlet's response stream.
 void setHeader(java.lang.String param, java.lang.String value)
          Deprecated. Set a header in the servlet response.
 void setStatic(boolean isStatic)
          Deprecated. sets a technical hint as to whether the page should be cached.
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VelocityPage

public VelocityPage(org.apache.velocity.Template template,
                    org.apache.velocity.context.Context context,
                    java.util.Locale locale,
                    java.lang.ClassLoader cl)
             throws java.io.IOException
Deprecated. 
Creates a new VelocityPage.

Parameters:
template - the template to use.
context - the WebMacro context
cl - The classloader for looking up resources.
Method Detail

outputPage

public void outputPage(javax.servlet.http.HttpServletResponse response)
                throws java.io.IOException
Deprecated. 
Description copied from interface: Page
Prepare the cooked output, filling in the parameters with data values, and send it to the end user via the servlet's response stream.

Specified by:
outputPage in interface Page
Parameters:
response - handle to where the output should go.
Throws:
java.io.IOException

toString

public java.lang.String toString()
Deprecated. 
Overrides:
toString in class java.lang.Object
Returns:
the processed HTML as a String

expose

public void expose(java.lang.String key,
                   java.lang.Object item)
Deprecated. 
Description copied from interface: Page
Expose internal data, publishing it to make it available to the page template.

Specified by:
expose in interface Page
Parameters:
key - name of the field in the template
item - source of the data to populate the template

expose

public void expose(java.lang.String key,
                   boolean b)
Deprecated. 
Description copied from interface: Page
Expose internal data, publishing it to make it available to the page Template.

Specified by:
expose in interface Page
Parameters:
key - name of the field in the template
b - sets to boolean value according to: b ? "true" : ""

exposeResourceBundle

public void exposeResourceBundle(java.lang.String lookupName)
Deprecated. 
Description copied from interface: Page
expose an instance of java.util.ResourceBundle as a template hash variable

Specified by:
exposeResourceBundle in interface Page

getLocale

public java.util.Locale getLocale()
Deprecated. 

setStatic

public void setStatic(boolean isStatic)
Deprecated. 
Description copied from interface: Page
sets a technical hint as to whether the page should be cached. (By default this is false.)

Specified by:
setStatic in interface Page

setHeader

public void setHeader(java.lang.String param,
                      java.lang.String value)
Deprecated. 
Description copied from interface: Page
Set a header in the servlet response.

Specified by:
setHeader in interface Page