org.apache.velocity.tools.view
Class DataInfo

java.lang.Object
  extended by org.apache.velocity.tools.view.DataInfo
All Implemented Interfaces:
ToolInfo

Deprecated. Use Data

@Deprecated
public class DataInfo
extends Object
implements ToolInfo

ToolInfo implementation to handle "primitive" data types. It currently supports String, Number, and Boolean data.

An example of data elements specified in your toolbox.xml might be:

  <data type="string">
    <key>app_name</key>
    <value>FooWeb Deluxe</value>
  </data>
  <data type="number">
    <key>app_version</key>
    <value>4.2</value>
  </data>
  <data type="boolean">
    <key>debug</key>
    <value>true</value>
  </data>
  <data type="number">
    <key>screen_width</key>
    <value>400</value>
  </data>
 

Version:
$Id: DataInfo.java 961796 2010-07-08 15:18:15Z apetrelli $
Author:
Nathan Bubna

Field Summary
static String TYPE_BOOLEAN
          Deprecated.  
static String TYPE_NUMBER
          Deprecated.  
static String TYPE_STRING
          Deprecated.  
 
Constructor Summary
DataInfo()
          Deprecated.  
 
Method Summary
 String getClassname()
          Deprecated.  
 Object getInstance(Object initData)
          Deprecated. Returns the data.
 String getKey()
          Deprecated. Accessors
 void setKey(String key)
          Deprecated. Mutators
 void setType(String type)
          Deprecated.  
 void setValue(String value)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_STRING

public static final String TYPE_STRING
Deprecated. 
See Also:
Constant Field Values

TYPE_NUMBER

public static final String TYPE_NUMBER
Deprecated. 
See Also:
Constant Field Values

TYPE_BOOLEAN

public static final String TYPE_BOOLEAN
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

DataInfo

public DataInfo()
Deprecated. 
Method Detail

setKey

public void setKey(String key)
Deprecated. 
Mutators


setType

public void setType(String type)
Deprecated. 

setValue

public void setValue(String value)
Deprecated. 

getKey

public String getKey()
Deprecated. 
Accessors

Specified by:
getKey in interface ToolInfo
Returns:
the context key for the tool

getClassname

public String getClassname()
Deprecated. 
Specified by:
getClassname in interface ToolInfo
Returns:
the fully qualified classname for the tool

getInstance

public Object getInstance(Object initData)
Deprecated. 
Returns the data. Always returns the same object since the data is a constant. Initialization data is ignored.

Specified by:
getInstance in interface ToolInfo
Parameters:
initData - an object that may be used to initialize the instance
Returns:
an instance of the tool


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.