public class ToolManager extends Object
FactoryConfiguration
as well as configuration via a tools.xml or tools.properties file in
either the classpath or the local file system.Modifier and Type | Field and Description |
---|---|
protected ToolboxFactory |
factory |
protected org.apache.velocity.app.VelocityEngine |
velocity |
Constructor and Description |
---|
ToolManager()
Constructs an instance already configured to use the
ConfigurationUtils.getAutoLoaded() configuration
and any configuration specified via a "org.apache.velocity.tools"
system property. |
ToolManager(boolean includeDefaults) |
ToolManager(boolean autoConfig,
boolean includeDefaults) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToolboxes(ToolContext context) |
void |
autoConfigure(boolean includeDefaults) |
void |
configure(FactoryConfiguration config) |
void |
configure(String path) |
ToolContext |
createContext() |
ToolContext |
createContext(Map<String,Object> toolProps) |
protected Toolbox |
createToolbox(String scope) |
protected void |
debug(String msg,
Object... args) |
protected FactoryConfiguration |
findConfig(String path) |
protected Toolbox |
getApplicationToolbox() |
org.apache.velocity.runtime.log.Log |
getLog() |
protected Toolbox |
getRequestToolbox() |
ToolboxFactory |
getToolboxFactory()
Returns the underlying
ToolboxFactory being used. |
boolean |
getUserCanOverwriteTools() |
org.apache.velocity.app.VelocityEngine |
getVelocityEngine() |
protected boolean |
hasApplicationTools() |
protected boolean |
hasRequestTools() |
protected boolean |
hasTools(String scope) |
protected void |
prepareContext(ToolContext context) |
void |
setToolboxFactory(ToolboxFactory factory)
Sets the underlying ToolboxFactory being used.
|
void |
setUserCanOverwriteTools(boolean overwrite) |
void |
setVelocityEngine(org.apache.velocity.app.VelocityEngine engine)
Sets the underlying VelocityEngine being used.
|
protected org.apache.velocity.app.VelocityEngine velocity
protected ToolboxFactory factory
public ToolManager()
ConfigurationUtils.getAutoLoaded()
configuration
and any configuration specified via a "org.apache.velocity.tools"
system property.public ToolManager(boolean includeDefaults)
public ToolManager(boolean autoConfig, boolean includeDefaults)
public void autoConfigure(boolean includeDefaults)
public void configure(FactoryConfiguration config)
public void configure(String path)
protected FactoryConfiguration findConfig(String path)
public ToolboxFactory getToolboxFactory()
ToolboxFactory
being used.public void setToolboxFactory(ToolboxFactory factory)
public void setVelocityEngine(org.apache.velocity.app.VelocityEngine engine)
public org.apache.velocity.app.VelocityEngine getVelocityEngine()
public void setUserCanOverwriteTools(boolean overwrite)
public boolean getUserCanOverwriteTools()
public org.apache.velocity.runtime.log.Log getLog()
public ToolContext createContext()
public ToolContext createContext(Map<String,Object> toolProps)
protected void prepareContext(ToolContext context)
protected void addToolboxes(ToolContext context)
protected boolean hasTools(String scope)
protected boolean hasRequestTools()
protected Toolbox getRequestToolbox()
protected boolean hasApplicationTools()
protected Toolbox getApplicationToolbox()
Copyright © 2002–2014 Apache Software Foundation. All rights reserved.