Class ServletToolInfo
java.lang.Object
org.apache.velocity.tools.view.ViewToolInfo
org.apache.velocity.tools.view.servlet.ServletToolInfo
- All Implemented Interfaces:
ToolInfo
Deprecated.
ToolInfo implementation that holds scope information for tools used in a servlet environment. The ServletToolboxManager uses this to allow tool definitions to specify the scope/lifecycle of individual view tools.
Example of toolbox.xml definitions for servlet tools:
<tool> <key>link</key> <scope>request</scope> <class>org.apache.velocity.tools.struts.StrutsLinkTool</class> </tool> <tool> <key>math</key> <scope>application</scope> <class>org.apache.velocity.tools.generic.MathTool</class> </tool> <tool> <key>user</key> <scope>session</scope> <class>com.mycompany.tools.MyUserTool</class> </tool>
- Version:
- $Id: ServletToolInfo.java 564438 2007-08-10 00:15:18Z nbubna $
- Author:
- Nathan Bubna
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Deprecated.private String
Deprecated.private String
Deprecated.Fields inherited from class org.apache.velocity.tools.view.ViewToolInfo
LOG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
allowsRequestPath
(String requestedPath) Deprecated.Deprecated.getScope()
Deprecated.void
setRequestPath
(String path) Deprecated.void
Deprecated.Methods inherited from class org.apache.velocity.tools.view.ViewToolInfo
getApplicationClass, getClassname, getInstance, getKey, getParameters, setClassname, setKey, setParameter, setParameters
-
Field Details
-
scope
Deprecated. -
exactPath
private boolean exactPathDeprecated. -
path
Deprecated.
-
-
Constructor Details
-
ServletToolInfo
public ServletToolInfo()Deprecated.
-
-
Method Details
-
setScope
Deprecated. -
getScope
Deprecated.- Returns:
- the scope of the tool
-
setRequestPath
Deprecated.- Parameters:
path
- the full or partial request path restriction of the tool- Since:
- VelocityTools 1.3
-
getRequestPath
Deprecated.- Returns:
- request path restriction for this tool
- Since:
- VelocityTools 1.3
-
allowsRequestPath
Deprecated.- Parameters:
requestedPath
- the path of the current servlet request- Returns:
true
if the path of the specified request path matches the request path of this tool. If there is no request path restriction for this tool, it will always returntrue
.- Since:
- VelocityTools 1.3
-
ToolInfo