org.apache.velocity.tools
Class ToolManager
java.lang.Object
org.apache.velocity.tools.ToolManager
public class ToolManager
- extends java.lang.Object
Manages tools for non-web applications. This simplifies the process
of getting a tool-populated Velocity context for merging with templates.
It allows for both direct configuration by passing in a FactoryConfiguration
as well as configuration via a tools.xml or tools.properties file in
either the classpath or the local file system.
- Version:
- $Id: ToolManager.java 511959 2007-02-26 19:24:39Z nbubna $
- Author:
- Nathan Bubna
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
engine
private org.apache.velocity.app.VelocityEngine engine
factory
private ToolboxFactory factory
application
private Toolbox application
ToolManager
public ToolManager()
- Constructs an instance already configured to use the
FactoryConfiguration.getDefault()
configuration.
ToolManager
public ToolManager(boolean startWithDefault)
configure
public void configure(FactoryConfiguration config)
configure
public void configure(java.lang.String path)
setVelocityEngine
public void setVelocityEngine(org.apache.velocity.app.VelocityEngine engine)
createContext
public ToolContext createContext()
createContext
public ToolContext createContext(java.util.Map<java.lang.String,java.lang.Object> toolProps)
addToolboxes
protected void addToolboxes(ToolContext context)
hasRequestTools
protected boolean hasRequestTools()
getRequestToolbox
protected Toolbox getRequestToolbox()
hasApplicationTools
protected boolean hasApplicationTools()
getApplicationToolbox
protected Toolbox getApplicationToolbox()
getConfiguration
protected FactoryConfiguration getConfiguration(java.lang.String path)
getInputStream
protected java.io.InputStream getInputStream(java.lang.String path)
getFileInputStream
protected java.io.InputStream getFileInputStream(java.lang.String path)
Copyright (c) 2003-2007 Apache Software Foundation