Class ViewToolInfo

  • All Implemented Interfaces:
    ToolInfo
    Direct Known Subclasses:
    ServletToolInfo

    @Deprecated
    public class ViewToolInfo
    extends Object
    implements ToolInfo
    Deprecated.
    ToolInfo 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 Detail

      • LOG

        protected static final org.apache.commons.logging.Log LOG
        Deprecated.
    • Constructor Detail

      • ViewToolInfo

        public ViewToolInfo()
        Deprecated.
    • Method Detail

      • getApplicationClass

        protected Class getApplicationClass​(String name)
                                     throws ClassNotFoundException
        Deprecated.
        Return the Class object 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
        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
      • 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:
        getInstance in interface ToolInfo
        Parameters:
        initData - an object that may be used to initialize the instance
        Returns:
        an instance of the tool