Package org.apache.velocity.tools.view
Class ViewToolInfo
- java.lang.Object
-
- org.apache.velocity.tools.view.ViewToolInfo
-
- All Implemented Interfaces:
ToolInfo
- Direct Known Subclasses:
ServletToolInfo
@Deprecated public class ViewToolInfo extends Object implements ToolInfo
Deprecated.UseToolInfoToolInfo implementation for view tools. New instances are returned for every call to getInstance(obj), and tools that have an init(Object) method are initialized with the given object before being returned. And tools that have a configure(Map) method will be configured before being returned if there are parameters specified for the tool.- Version:
- $Id$
- Author:
- Nathan Bubna, Henning P. Schmiedehausen
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.LogLOGDeprecated.
-
Constructor Summary
Constructors Constructor Description ViewToolInfo()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ClassgetApplicationClass(String name)Deprecated.Return theClassobject for the specified fully qualified class name, from this web application's class loader.StringgetClassname()Deprecated.ObjectgetInstance(Object initData)Deprecated.Returns a new instance of the tool.StringgetKey()Deprecated.AccessorsMapgetParameters()Deprecated.Get parameters for this tool.voidsetClassname(String classname)Deprecated.If an instance of the tool cannot be created from the classname passed to this method, it will throw an exception.voidsetKey(String key)Deprecated.MutatorsvoidsetParameter(String name, String value)Deprecated.Set/add new parameter for this tool.voidsetParameters(Map parameters)Deprecated.Set parameter map for this tool.
-
-
-
Method Detail
-
getApplicationClass
protected Class getApplicationClass(String name) throws ClassNotFoundException
Deprecated.Return theClassobject for the specified fully qualified class name, from this web application's class loader. If no class loader is set for the current thread, then the class loader that loaded this class will be used.- Parameters:
name- Fully qualified class name to be loaded- Returns:
- Class object
- Throws:
ClassNotFoundException- if the class cannot be found- Since:
- VelocityTools 1.1
-
setKey
public void setKey(String key)
Deprecated.Mutators
-
setClassname
public void setClassname(String classname) throws Exception
Deprecated.If an instance of the tool cannot be created from the classname passed to this method, it will throw an exception.- Parameters:
classname- the fully qualified java.lang.Class name of the tool- Throws:
Exception
-
setParameters
public void setParameters(Map parameters)
Deprecated.Set parameter map for this tool.- Since:
- VelocityTools 1.1
-
setParameter
public void setParameter(String name, String value)
Deprecated.Set/add new parameter for this tool.- Since:
- VelocityTools 1.1
-
getKey
public String getKey()
Deprecated.Accessors
-
getClassname
public String getClassname()
Deprecated.- Specified by:
getClassnamein interfaceToolInfo- Returns:
- the fully qualified classname for the tool
-
getParameters
public Map getParameters()
Deprecated.Get parameters for this tool.- Since:
- VelocityTools 1.1
-
getInstance
public Object getInstance(Object initData)
Deprecated.Returns a new instance of the tool. If the tool has an init(Object) method, the new instance will be initialized using the given data. If parameters have been specified and the tool has a configure(Map) method, the tool will be passed the parameters also.- Specified by:
getInstancein interfaceToolInfo- Parameters:
initData- an object that may be used to initialize the instance- Returns:
- an instance of the tool
-
-