类 ImportTool
java.lang.Object
org.apache.velocity.tools.generic.SafeConfig
org.apache.velocity.tools.generic.ImportTool
- 所有已实现的接口:
Serializable
@DefaultKey("import")
@ValidScope("request")
public class ImportTool
extends SafeConfig
implements Serializable
General-purpose text-importing tool for templates.
Usage: just call $import.read("http://www.foo.com/bleh.jsp?sneh=bar") to insert the contents of the named resource into the template.
Toolbox configuration:
<tools>
<toolbox scope="request">
<tool class="org.apache.velocity.tools.view.ImportTool"/>
</toolbox>
</tools>
- 从以下版本开始:
- VelocityTools 3.0
- 版本:
- $Id$
- 作者:
- Marino A. Jonsson
- 另请参阅:
-
字段概要
字段从类继承的字段 org.apache.velocity.tools.generic.SafeConfig
LOCK_CONFIG_KEY, log, LOGGER_NAME_KEY, SAFE_MODE_KEY, USE_CLASS_LOGGER_KEY -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidconfigure(ValueParser values) ConfigurationReturns the supplied URL rendered as a String.protected voidinitializeImportSupport(ValueParser config) Importsupport initializationReturns the supplied resource rendered as a String.从类继承的方法 org.apache.velocity.tools.generic.SafeConfig
configure, getLog, initLogger, isConfigLocked, isSafeMode, setLockConfig, setSafeMode
-
字段详细资料
-
importSupport
ImportSupport utility which provides underlying i/o
-
-
构造器详细资料
-
ImportTool
public ImportTool()
-
-
方法详细资料
-
initializeImportSupport
Importsupport initialization- 参数:
config- configuration values
-
configure
Configuration- 覆盖:
configure在类中SafeConfig- 参数:
values- configuration values
-
read
Returns the supplied resource rendered as a String.- 参数:
resource- the URL to import- 返回:
- the URL as a string
-
fetch
Returns the supplied URL rendered as a String.- 参数:
url- the URL to import- 返回:
- the URL as a string
-