gov.noaa.pmel.tmap
Class TemplateContext

java.lang.Object
  |
  +--VelocityContext
        |
        +--gov.noaa.pmel.tmap.TemplateContext
Direct Known Subclasses:
SessionTemplateContext

public class TemplateContext
extends VelocityContext

Extension of VelocityContext class that is used by LAS to store parameters that will be used by the LAS Velocity templates.
There are two contexts in LAS -- a session TemplateContext, which is available to every template in a given session, and a local TemplateContext which is only available to the current template. These contexts are merged into one TemplateContext before a template is parsed and evaluated.

Version:
$Version$
Author:
$Author: kobrien $
See Also:
Serialized Form

Field Summary
(package private) static java.util.Map mCompareMap
           
(package private) static java.util.Properties mLayoutMap
           
 
Constructor Summary
protected TemplateContext()
           
 
Method Summary
 java.lang.Integer getCompareState(java.lang.String template)
           
static TemplateContext getInstance()
           
 java.lang.String getLayoutManager(java.lang.String key)
           
 HttpServletRequest getServletRequest()
           
 HttpServletResponse getServletResponse()
           
 void mergeContext(TemplateContext in)
           
 void setCompareState(java.lang.String template, java.lang.Integer val)
           
 void setLayoutManager(java.lang.String template, java.lang.String managerTemplate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLayoutMap

static java.util.Properties mLayoutMap

mCompareMap

static java.util.Map mCompareMap
Constructor Detail

TemplateContext

protected TemplateContext()
                   throws ServletException,
                          java.sql.SQLException
Method Detail

getInstance

public static TemplateContext getInstance()
                                   throws ServletException,
                                          java.sql.SQLException
ServletException
java.sql.SQLException

mergeContext

public void mergeContext(TemplateContext in)

setCompareState

public void setCompareState(java.lang.String template,
                            java.lang.Integer val)

getCompareState

public java.lang.Integer getCompareState(java.lang.String template)

setLayoutManager

public void setLayoutManager(java.lang.String template,
                             java.lang.String managerTemplate)
                      throws ServletException,
                             java.sql.SQLException
ServletException
java.sql.SQLException

getLayoutManager

public java.lang.String getLayoutManager(java.lang.String key)

getServletRequest

public HttpServletRequest getServletRequest()

getServletResponse

public HttpServletResponse getServletResponse()