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: TemplateInfo.java 1706239 2015-10-01 13:18:35Z tv $
  Author:
    Dave Bryson, Jason van Zyl, Henning P. Schmiedehausen

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `LAYOUT_TEMPLATE` Constants for tempStorage hash map.
    `static String` | `NAVIGATION_TEMPLATE` Constants for tempStorage hash map.
    `static String` | `SERVICE_NAME` Constants for tempStorage hash map.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TemplateInfo(RunData data)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getLayoutTemplate()` Get the value of layout.
    `String` | `getNavigationTemplate()` Get the value of navigationTemplate.
    `String` | `getScreenTemplate()` Get the value of screen for the RunData parameters.
    `String` | `getService()` Get the value of service.
    `String` | `getString(String name)` Return a String from the temp hash map.
    `String[]` | `getStringArray(String name)` Return a String[] from the temp hash map.
    `Object` | `getTemp(String name)` Get an object from temporary storage.
    `Object` | `getTemp(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.
    `Object` | `getTemplateContext(String name)` Get the value of Template context.
    `Object` | `removeTemp(String name)` Remove an object from the temporary storage.
    `void` | `setLayoutTemplate(String v)` Set the value of layout.
    `void` | `setNavigationTemplate(String v)` Set the value of navigationTemplate.
    `void` | `setScreenTemplate(String v)` Set the value of screen.
    `void` | `setService(String v)` Set the value of service.
    `void` | `setTemp(String name, Object value)` Put an object into temporary storage.
    `void` | `setTemplateContext(String name, 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 String NAVIGATION_TEMPLATE

      Constants for tempStorage hash map.
      See Also:
        Constant Field Values

    - #### LAYOUT_TEMPLATE

          public static final String LAYOUT_TEMPLATE

      Constants for tempStorage hash map.
      See Also:
        Constant Field Values

    - #### SERVICE_NAME

          public static final String SERVICE_NAME

      Constants for tempStorage hash map.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TemplateInfo

          public TemplateInfo(RunData data)

      Constructor
      Parameters:
        `data` - A Turbine RunData object.

  - ### Method Detail

    - #### getNavigationTemplate

          public String getNavigationTemplate()

      Get the value of navigationTemplate.
      Returns:
        A String with the value of navigationTemplate.

    - #### setNavigationTemplate

          public void setNavigationTemplate(String v)

      Set the value of navigationTemplate.
      Parameters:
        `v` - Value to assign to navigationTemplate.

    - #### getScreenTemplate

          public 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(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 String getLayoutTemplate()

      Get the value of layout.
      Returns:
        A String with the value of layout.

    - #### setLayoutTemplate

          public void setLayoutTemplate(String v)

      Set the value of layout.
      Parameters:
        `v` - Value to assign to layout.

    - #### getTemplateContext

          public 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.

    - #### setTemplateContext

          public 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.

    - #### getService

          public String getService()

      Get the value of service.
      Returns:
        A String with the value of service.

    - #### setService

          public void setService(String v)

      Set the value of service.
      Parameters:
        `v` - Value to assign to service.

    - #### getTemp

          public Object getTemp(String name)

      Get an object from temporary storage.
      Parameters:
        `name` - A String with the name of the object.
      Returns:
        An Object.

    - #### getTemp

          public 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.

    - #### setTemp

          public 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.

    - #### getStringArray

          public 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[].

    - #### getString

          public 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.

    - #### removeTemp

          public 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 `null` if the name was not a key.

    - #### getTempKeys

          public Object[] getTempKeys()

      Returns all the available names in the temporary storage.
      Returns:
        A object array with the keys.

Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.