org.ujac.web.servlet
Class TemplateInterpreterHelper

java.lang.Object
  extended by org.ujac.web.servlet.TemplateInterpreterHelper

public class TemplateInterpreterHelper
extends Object

Name: TemplateInterpreterHelper
Description: Eases the usage of the TemplateInterpreter in servlet environments.

Author:
lauerc

Field Summary
static String ATTR_EXPRESSION_PROPERTIES
          Constant for the ExpressionInterpreter properties attribute name.
static String ATTR_FORMAT_HELPER
          Constant for the FormatHelper attribute name.
static String ATTR_TEMPLATE_INTERPRETER_FACTORY
          Constant for the TemplateInterpreter attribute name.
 
Constructor Summary
TemplateInterpreterHelper()
           
 
Method Summary
protected static void addDefaultProperties(Map properties)
          Adds default properties.
static TemplateContext createTemplateContext(HttpServletRequest request)
          Creates a new template context.
static TemplateContext createTemplateContext(PageContext pageContext)
          Creates a new template context.
static Map getExpressionProperties(HttpServletRequest request)
          Gets the ExpressionInterpreter properties for the given request.
static Map getExpressionProperties(PageContext pageContext)
          Gets the ExpressionInterpreter properties for the given request.
static FormatHelper getFormatHelper(HttpServletRequest request)
          Gets the FormatHelper instance for the given request.
static FormatHelper getFormatHelper(PageContext pageContext)
          Gets the ExpressionInterpreter instance for the given request.
static TemplateContext getTemplateContext(PageContext pageContext, Tag tag)
          Creates a new template context.
static TemplateInterpreter getTemplateInterpreter(HttpServletRequest request)
          Gets the TemplateInterpreter instance for the given request.
static TemplateInterpreter getTemplateInterpreter(PageContext pageContext)
          Gets the TemplateInterpreter instance for the given request.
static TemplateInterpreterFactory getTemplateInterpreterFactory(HttpServletRequest request)
          Gets the TemplateInterpreterFactory instance for the given request.
static TemplateInterpreterFactory getTemplateInterpreterFactory(PageContext pageContext)
          Gets the TemplateInterpreterFactory instance for the given request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_TEMPLATE_INTERPRETER_FACTORY

public static final String ATTR_TEMPLATE_INTERPRETER_FACTORY
Constant for the TemplateInterpreter attribute name.

See Also:
Constant Field Values

ATTR_FORMAT_HELPER

public static final String ATTR_FORMAT_HELPER
Constant for the FormatHelper attribute name.

See Also:
Constant Field Values

ATTR_EXPRESSION_PROPERTIES

public static final String ATTR_EXPRESSION_PROPERTIES
Constant for the ExpressionInterpreter properties attribute name.

See Also:
Constant Field Values
Constructor Detail

TemplateInterpreterHelper

public TemplateInterpreterHelper()
Method Detail

getTemplateInterpreterFactory

public static TemplateInterpreterFactory getTemplateInterpreterFactory(HttpServletRequest request)
Gets the TemplateInterpreterFactory instance for the given request.

Parameters:
request - The request at which the TemplateInterpreterFactory may be attached.
Returns:
The TemplateInterpreterFactory instance for the given request.

getTemplateInterpreterFactory

public static TemplateInterpreterFactory getTemplateInterpreterFactory(PageContext pageContext)
Gets the TemplateInterpreterFactory instance for the given request.

Parameters:
pageContext - The page context at which the TemplateInterpreterFactory may be attached.
Returns:
The TemplateInterpreterFactory instance for the given request.

getTemplateInterpreter

public static TemplateInterpreter getTemplateInterpreter(HttpServletRequest request)
Gets the TemplateInterpreter instance for the given request.

Parameters:
request - The request at which the TemplateInterpreter may be attached.
Returns:
The TemplateInterpreter instance for the given request.

getTemplateInterpreter

public static TemplateInterpreter getTemplateInterpreter(PageContext pageContext)
Gets the TemplateInterpreter instance for the given request.

Parameters:
pageContext - The page context at which the TemplateInterpreter may be attached.
Returns:
The TemplateInterpreter instance for the given request.

getFormatHelper

public static FormatHelper getFormatHelper(HttpServletRequest request)
Gets the FormatHelper instance for the given request.

Parameters:
request - The request at which the ExpressionInterpreter may be attached.
Returns:
The ExpressionInterpreter instance for the given request.

getFormatHelper

public static FormatHelper getFormatHelper(PageContext pageContext)
Gets the ExpressionInterpreter instance for the given request.

Parameters:
pageContext - The page context at which the ExpressionInterpreter may be attached.
Returns:
The ExpressionInterpreter instance for the given request.

getExpressionProperties

public static Map getExpressionProperties(HttpServletRequest request)
Gets the ExpressionInterpreter properties for the given request.

Parameters:
request - The request at which the properties may be attached.
Returns:
The ExpressionInterpreter properties for the given request.

getExpressionProperties

public static Map getExpressionProperties(PageContext pageContext)
Gets the ExpressionInterpreter properties for the given request.

Parameters:
pageContext - The page context at which the ExpressionInterpreter may be attached.
Returns:
The ExpressionInterpreter properties for the given request.

createTemplateContext

public static TemplateContext createTemplateContext(HttpServletRequest request)
Creates a new template context.

Parameters:
request - The request at which the properties may be attached.
Returns:
The ExpressionInterpreter properties for the given request.

createTemplateContext

public static TemplateContext createTemplateContext(PageContext pageContext)
Creates a new template context.

Parameters:
pageContext - The page context at which the ExpressionInterpreter may be attached.
Returns:
The ExpressionInterpreter properties for the given request.

getTemplateContext

public static TemplateContext getTemplateContext(PageContext pageContext,
                                                 Tag tag)
Creates a new template context.

Parameters:
pageContext - The page context at which the ExpressionInterpreter may be attached.
tag - The tag where to find the template context.
Returns:
The ExpressionInterpreter properties for the given request.

addDefaultProperties

protected static void addDefaultProperties(Map properties)
Adds default properties.

Parameters:
properties - The property map to maintain.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.