org.apache.velocity.site.doxia.util
Class VelocityTool

java.lang.Object
  extended by org.apache.velocity.site.doxia.util.VelocityTool

public class VelocityTool
extends java.lang.Object

This is a wrapper object for a Class to be used as a Velocity Tool.

Version:
$Revision: 526751 $
Author:
Henning P. Schmiedehausen

Constructor Summary
VelocityTool()
           
 
Method Summary
 java.lang.Object getInstance()
          Returns the instance object for this tool.
 java.lang.String getToolClass()
          Returns the tool class.
 java.lang.String getToolName()
          Returns the tool name.
 void setToolClass(java.lang.String toolClass)
          Sets the tool class.
 void setToolName(java.lang.String toolName)
          Sets the tool name to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityTool

public VelocityTool()
Method Detail

getToolClass

public java.lang.String getToolClass()
Returns the tool class.

Returns:
The tool class.

setToolClass

public void setToolClass(java.lang.String toolClass)
Sets the tool class.

Parameters:
toolClass - The new tool class to use. Should not be null.

getToolName

public java.lang.String getToolName()
Returns the tool name.

Returns:
The tool name.

setToolName

public void setToolName(java.lang.String toolName)
Sets the tool name to use.

Parameters:
toolName - The new tool name to use. Should not be null.

getInstance

public java.lang.Object getInstance()
Returns the instance object for this tool.

Returns:
An instance object of the configured tool to be used in a Velocity Context. If an error occured while instantiating, this method returns a String object containing the error message.


Copyright © 2006-2007 The Apache Software Foundation. All Rights Reserved.