Package org.apache.turbine.util.template
Class TemplateInfo
- java.lang.Object
- 
- org.apache.turbine.util.template.TemplateInfo
 
- 
 public class TemplateInfo extends 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$
- Author:
- Dave Bryson, Jason van Zyl, Henning P. Schmiedehausen
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringLAYOUT_TEMPLATEConstants for tempStorage hash map.static StringNAVIGATION_TEMPLATEConstants for tempStorage hash map.static StringSERVICE_NAMEConstants for tempStorage hash map.
 - 
Constructor SummaryConstructors Constructor Description TemplateInfo(RunData data)Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLayoutTemplate()Get the value of layout.StringgetNavigationTemplate()Get the value of navigationTemplate.StringgetScreenTemplate()Get the value of screen for the RunData parameters.StringgetService()Get the value of service.StringgetString(String name)Return a String from the temp hash map.String[]getStringArray(String name)Return a String[] from the temp hash map.ObjectgetTemp(String name)Get an object from temporary storage.ObjectgetTemp(String name, Object def)Get an object from temporary storage, or a default value.Object[]getTempKeys()Returns all the available names in the temporary storage.ObjectgetTemplateContext(String name)Get the value of Template context.ObjectremoveTemp(String name)Remove an object from the temporary storage.voidsetLayoutTemplate(String v)Set the value of layout.voidsetNavigationTemplate(String v)Set the value of navigationTemplate.voidsetScreenTemplate(String v)Set the value of screen.voidsetService(String v)Set the value of service.voidsetTemp(String name, Object value)Put an object into temporary storage.voidsetTemplateContext(String name, Object v)Set the value of context.
 
- 
- 
- 
Field Detail- 
NAVIGATION_TEMPLATEpublic static final String NAVIGATION_TEMPLATE Constants for tempStorage hash map.- See Also:
- Constant Field Values
 
 - 
LAYOUT_TEMPLATEpublic static final String LAYOUT_TEMPLATE Constants for tempStorage hash map.- See Also:
- Constant Field Values
 
 - 
SERVICE_NAMEpublic static final String SERVICE_NAME Constants for tempStorage hash map.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
TemplateInfopublic TemplateInfo(RunData data) Constructor- Parameters:
- data- A Turbine RunData object.
 
 
- 
 - 
Method Detail- 
getNavigationTemplatepublic String getNavigationTemplate() Get the value of navigationTemplate.- Returns:
- A String with the value of navigationTemplate.
 
 - 
setNavigationTemplatepublic void setNavigationTemplate(String v) Set the value of navigationTemplate.- Parameters:
- v- Value to assign to navigationTemplate.
 
 - 
getScreenTemplatepublic 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.
 
 - 
setScreenTemplatepublic void setScreenTemplate(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.
 
 - 
getLayoutTemplatepublic String getLayoutTemplate() Get the value of layout.- Returns:
- A String with the value of layout.
 
 - 
setLayoutTemplatepublic void setLayoutTemplate(String v) Set the value of layout.- Parameters:
- v- Value to assign to layout.
 
 - 
getTemplateContextpublic Object getTemplateContext(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.
 
 - 
setTemplateContextpublic void setTemplateContext(String name, Object v) Set the value of context.- Parameters:
- name- The name of the template context.
- v- Value to assign to context.
 
 - 
getServicepublic String getService() Get the value of service.- Returns:
- A String with the value of service.
 
 - 
setServicepublic void setService(String v) Set the value of service.- Parameters:
- v- Value to assign to service.
 
 - 
getTemppublic Object getTemp(String name) Get an object from temporary storage.- Parameters:
- name- A String with the name of the object.
- Returns:
- An Object.
 
 - 
getTemppublic Object getTemp(String name, 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.
 
 - 
setTemppublic void setTemp(String name, Object value) Put an object into temporary storage.- Parameters:
- name- A String with the name of the object.
- value- An Object, the value.
 
 - 
getStringArraypublic String[] getStringArray(String name) Return a String[] from the temp hash map.- Parameters:
- name- A String with the name of the object.
- Returns:
- A String[].
 
 - 
getStringpublic String getString(String name) Return a String from the temp hash map.- Parameters:
- name- A String with the name of the object.
- Returns:
- A String.
 
 - 
removeTemppublic Object removeTemp(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 nullif the name was not a key.
 
 - 
getTempKeyspublic Object[] getTempKeys() Returns all the available names in the temporary storage.- Returns:
- A object array with the keys.
 
 
- 
 
-