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 java.lang.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 651469 2008-04-25 00:46:13Z nbubna $
Author:
Nathan Bubna

Field Summary
private  java.lang.Object data
          Deprecated.  
private  java.lang.String key
          Deprecated.  
static java.lang.String TYPE_BOOLEAN
          Deprecated.  
private  int type_id
          Deprecated.  
private static int TYPE_ID_BOOLEAN
          Deprecated.  
private static int TYPE_ID_NUMBER
          Deprecated.  
private static int TYPE_ID_STRING
          Deprecated.  
static java.lang.String TYPE_NUMBER
          Deprecated.  
static java.lang.String TYPE_STRING
          Deprecated.  
 
Constructor Summary
DataInfo()
          Deprecated.  
 
Method Summary
 java.lang.String getClassname()
          Deprecated.  
 java.lang.Object getInstance(java.lang.Object initData)
          Deprecated. Returns the data.
 java.lang.String getKey()
          Deprecated. Accessors
 void setKey(java.lang.String key)
          Deprecated. Mutators
 void setType(java.lang.String type)
          Deprecated.  
 void setValue(java.lang.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 java.lang.String TYPE_STRING
Deprecated. 
See Also:
Constant Field Values

TYPE_NUMBER

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

TYPE_BOOLEAN

public static final java.lang.String TYPE_BOOLEAN
Deprecated. 
See Also:
Constant Field Values

TYPE_ID_STRING

private static final int TYPE_ID_STRING
Deprecated. 
See Also:
Constant Field Values

TYPE_ID_NUMBER

private static final int TYPE_ID_NUMBER
Deprecated. 
See Also:
Constant Field Values

TYPE_ID_BOOLEAN

private static final int TYPE_ID_BOOLEAN
Deprecated. 
See Also:
Constant Field Values

key

private java.lang.String key
Deprecated. 

type_id

private int type_id
Deprecated. 

data

private java.lang.Object data
Deprecated. 
Constructor Detail

DataInfo

public DataInfo()
Deprecated. 
Method Detail

setKey

public void setKey(java.lang.String key)
Deprecated. 
Mutators


setType

public void setType(java.lang.String type)
Deprecated. 

setValue

public void setValue(java.lang.String value)
Deprecated. 

getKey

public java.lang.String getKey()
Deprecated. 
Accessors

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

getClassname

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

getInstance

public java.lang.Object getInstance(java.lang.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 (c) 2003-2007 Apache Software Foundation