Package org.apache.velocity.tools.view
Class DataInfo
- java.lang.Object
-
- org.apache.velocity.tools.view.DataInfo
-
- All Implemented Interfaces:
ToolInfo
@Deprecated public class DataInfo extends Object implements ToolInfo
Deprecated.UseDataToolInfo 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$
- Author:
- Nathan Bubna
-
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE_BOOLEANDeprecated.static StringTYPE_NUMBERDeprecated.static StringTYPE_STRINGDeprecated.
-
Constructor Summary
Constructors Constructor Description DataInfo()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetClassname()Deprecated.ObjectgetInstance(Object initData)Deprecated.Returns the data.StringgetKey()Deprecated.AccessorsvoidsetKey(String key)Deprecated.MutatorsvoidsetType(String type)Deprecated.voidsetValue(String value)Deprecated.
-
-
-
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
-
-
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
-
getClassname
public String getClassname()
Deprecated.- Specified by:
getClassnamein interfaceToolInfo- 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:
getInstancein interfaceToolInfo- Parameters:
initData- an object that may be used to initialize the instance- Returns:
- an instance of the tool
-
-