org.apache.turbine.util.template
Class TemplateInfo

java.lang.Object
  extended byorg.apache.turbine.util.template.TemplateInfo

public class TemplateInfo
extends java.lang.Object

This is a wrapper for Template specific information. It's part of the RunData object and can extract the information it needs to do the job directly from the data.getParameters().

Version:
$Id: TemplateInfo.java 534527 2007-05-02 16:10:59Z tv $
Author:
Dave Bryson, Jason van Zyl, Henning P. Schmiedehausen

Field Summary
static java.lang.String LAYOUT_TEMPLATE
           
static java.lang.String NAVIGATION_TEMPLATE
           
static java.lang.String SERVICE_NAME
           
 
Constructor Summary
TemplateInfo(RunData data)
          Constructor
 
Method Summary
 java.lang.String getLayoutTemplate()
          Get the value of layout.
 java.lang.String getNavigationTemplate()
          Get the value of navigationTemplate.
 java.lang.String getScreenTemplate()
          Get the value of screen for the RunData parameters.
 java.lang.String getService()
          Get the value of service.
 java.lang.String getString(java.lang.String name)
          Return a String from the temp hash map.
 java.lang.String[] getStringArray(java.lang.String name)
          Return a String[] from the temp hash map.
 java.lang.Object getTemp(java.lang.String name)
          Get an object from temporary storage.
 java.lang.Object getTemp(java.lang.String name, java.lang.Object def)
          Get an object from temporary storage, or a default value.
 java.lang.Object[] getTempKeys()
           
 java.lang.Object getTemplateContext(java.lang.String name)
          Get the value of Template context.
 java.lang.Object removeTemp(java.lang.String name)
          Remove an object from the temporary storage.
 void setLayoutTemplate(java.lang.String v)
          Set the value of layout.
 void setNavigationTemplate(java.lang.String v)
          Set the value of navigationTemplate.
 void setScreenTemplate(java.lang.String v)
          Set the value of screen.
 void setService(java.lang.String v)
          Set the value of service.
 void setTemp(java.lang.String name, java.lang.Object value)
          Put an object into temporary storage.
 void setTemplateContext(java.lang.String name, java.lang.Object v)
          Set the value of context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAVIGATION_TEMPLATE

public static final java.lang.String NAVIGATION_TEMPLATE
See Also:
Constant Field Values

LAYOUT_TEMPLATE

public static final java.lang.String LAYOUT_TEMPLATE
See Also:
Constant Field Values

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

TemplateInfo

public TemplateInfo(RunData data)
Constructor

Method Detail

getNavigationTemplate

public java.lang.String getNavigationTemplate()
Get the value of navigationTemplate.

Returns:
A String with the value of navigationTemplate.

setNavigationTemplate

public void setNavigationTemplate(java.lang.String v)
Set the value of navigationTemplate.

Parameters:
v - Value to assign to navigationTemplate.

getScreenTemplate

public java.lang.String getScreenTemplate()
Get the value of screen for the RunData parameters. This information comes from PathInfo or a QueryString.

Returns:
A String with the value of screen.

setScreenTemplate

public void setScreenTemplate(java.lang.String v)
Set the value of screen. This is really just a method to hide using the RunData Parameter.

Parameters:
v - Value to assign to screen.

getLayoutTemplate

public java.lang.String getLayoutTemplate()
Get the value of layout.

Returns:
A String with the value of layout.

setLayoutTemplate

public void setLayoutTemplate(java.lang.String v)
Set the value of layout.

Parameters:
v - Value to assign to layout.

getTemplateContext

public java.lang.Object getTemplateContext(java.lang.String name)
Get the value of Template context. This will be cast to the proper Context by its Service.

Parameters:
name - The name of the template context.
Returns:
An Object with the Value of context.

setTemplateContext

public void setTemplateContext(java.lang.String name,
                               java.lang.Object v)
Set the value of context.

Parameters:
name - The name of the template context.
v - Value to assign to context.

getService

public java.lang.String getService()
Get the value of service.

Returns:
A String with the value of service.

setService

public void setService(java.lang.String v)
Set the value of service.

Parameters:
v - Value to assign to service.

getTemp

public java.lang.Object getTemp(java.lang.String name)
Get an object from temporary storage.

Parameters:
name - A String with the name of the object.
Returns:
An Object.

getTemp

public java.lang.Object getTemp(java.lang.String name,
                                java.lang.Object def)
Get an object from temporary storage, or a default value.

Parameters:
name - A String with the name of the object.
def - An Object, the default value.
Returns:
An Object.

setTemp

public void setTemp(java.lang.String name,
                    java.lang.Object value)
Put an object into temporary storage.

Parameters:
name - A String with the name of the object.
value - An Object, the value.

getStringArray

public java.lang.String[] getStringArray(java.lang.String name)
Return a String[] from the temp hash map.

Parameters:
name - A String with the name of the object.
Returns:
A String[].

getString

public java.lang.String getString(java.lang.String name)
Return a String from the temp hash map.

Parameters:
name - A String with the name of the object.
Returns:
A String.

removeTemp

public java.lang.Object removeTemp(java.lang.String name)
Remove an object from the temporary storage.

Parameters:
name - A String with the name of the object.
Returns:
The object that was removed or null if the name was not a key.

getTempKeys

public java.lang.Object[] getTempKeys()


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.