Package org.apache.velocity.tools.view
Class DataInfo
java.lang.Object
org.apache.velocity.tools.view.DataInfo
- All Implemented Interfaces:
ToolInfo
Deprecated.
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 651469 2008-04-25 00:46:13Z nbubna $
- Author:
- Nathan Bubna
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object
Deprecated.private String
Deprecated.static final String
Deprecated.private int
Deprecated.private static final int
Deprecated.private static final int
Deprecated.private static final int
Deprecated.static final String
Deprecated.static final String
Deprecated. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TYPE_STRING
Deprecated.- See Also:
-
TYPE_NUMBER
Deprecated.- See Also:
-
TYPE_BOOLEAN
Deprecated.- See Also:
-
TYPE_ID_STRING
private static final int TYPE_ID_STRINGDeprecated.- See Also:
-
TYPE_ID_NUMBER
private static final int TYPE_ID_NUMBERDeprecated.- See Also:
-
TYPE_ID_BOOLEAN
private static final int TYPE_ID_BOOLEANDeprecated.- See Also:
-
key
Deprecated. -
type_id
private int type_idDeprecated. -
data
Deprecated.
-
-
Constructor Details
-
DataInfo
public DataInfo()Deprecated.
-
-
Method Details
-
setKey
Deprecated.Mutators -
setType
Deprecated. -
setValue
Deprecated. -
getKey
Deprecated.Accessors -
getClassname
Deprecated.- Specified by:
getClassname
in interfaceToolInfo
- Returns:
- the fully qualified classname for the tool
-
getInstance
Deprecated.Returns the data. Always returns the same object since the data is a constant. Initialization data is ignored.- Specified by:
getInstance
in interfaceToolInfo
- Parameters:
initData
- an object that may be used to initialize the instance- Returns:
- an instance of the tool
-
Data