类 ToolManager
java.lang.Object
org.apache.velocity.tools.ToolManager
- 直接已知子类:
ViewToolManager
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.- 版本:
- $Id: ToolManager.java 511959 2007-02-26 19:24:39Z nbubna $
- 作者:
- Nathan Bubna
-
字段概要
字段修饰符和类型字段说明private Toolbox
protected ToolboxFactory
private boolean
protected org.apache.velocity.app.VelocityEngine
-
构造器概要
构造器构造器说明Constructs an instance already configured to use theConfigurationUtils.getAutoLoaded()
configuration and any configuration specified via a "org.apache.velocity.tools" system property.ToolManager
(boolean includeDefaults) ToolManager
(boolean autoConfig, boolean includeDefaults) -
方法概要
修饰符和类型方法说明protected void
addToolboxes
(ToolContext context) void
autoConfigure
(boolean includeDefaults) void
void
configure
(FactoryConfiguration config) createContext
(Map<String, Object> toolProps) protected Toolbox
createToolbox
(String scope) protected final void
protected FactoryConfiguration
findConfig
(String path) protected Toolbox
org.apache.velocity.runtime.log.Log
getLog()
protected Toolbox
Returns the underlyingToolboxFactory
being used.boolean
org.apache.velocity.app.VelocityEngine
protected boolean
protected boolean
protected boolean
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.
-
字段详细资料
-
velocity
protected org.apache.velocity.app.VelocityEngine velocity -
factory
-
application
-
userOverwrite
private boolean userOverwrite
-
-
构造器详细资料
-
ToolManager
public ToolManager()Constructs an instance already configured to use theConfigurationUtils.getAutoLoaded()
configuration and any configuration specified via a "org.apache.velocity.tools" system property. -
ToolManager
public ToolManager(boolean includeDefaults) -
ToolManager
public ToolManager(boolean autoConfig, boolean includeDefaults)
-
-
方法详细资料
-
autoConfigure
public void autoConfigure(boolean includeDefaults) -
configure
-
configure
-
findConfig
-
getToolboxFactory
Returns the underlyingToolboxFactory
being used. -
setToolboxFactory
Sets the underlying ToolboxFactory being used. If you use this, be sure that your ToolboxFactory is already properly configured. -
setVelocityEngine
public void setVelocityEngine(org.apache.velocity.app.VelocityEngine engine) Sets the underlying VelocityEngine being used. If you use this, be sure that your VelocityEngine is already properly configured and initialized. -
getVelocityEngine
public org.apache.velocity.app.VelocityEngine getVelocityEngine() -
setUserCanOverwriteTools
public void setUserCanOverwriteTools(boolean overwrite) -
getUserCanOverwriteTools
public boolean getUserCanOverwriteTools() -
getLog
public org.apache.velocity.runtime.log.Log getLog() -
debug
-
createContext
-
createContext
-
prepareContext
-
addToolboxes
-
hasTools
-
createToolbox
-
hasRequestTools
protected boolean hasRequestTools() -
getRequestToolbox
-
hasApplicationTools
protected boolean hasApplicationTools() -
getApplicationToolbox
-