Class VelocityAutotagRuntime
java.lang.Object
org.apache.velocity.runtime.directive.Directive
org.apache.tiles.request.velocity.autotag.VelocityAutotagRuntime
- All Implemented Interfaces:
Cloneable
,AutotagRuntime<Request>
,org.apache.velocity.runtime.directive.DirectiveConstants
public class VelocityAutotagRuntime
extends org.apache.velocity.runtime.directive.Directive
implements AutotagRuntime<Request>
A Runtime for implementing Velocity Directives.
-
Field Summary
Fields inherited from class org.apache.velocity.runtime.directive.Directive
log, rsvc
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants
BLOCK, LINE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new ModelBody instance to match the request.Creates a new Request instance.getName()
<T> T
getParameter
(String name, Class<T> type, T defaultValue) Extracts a parameter from the tag.int
getType()
boolean
Methods inherited from class org.apache.velocity.runtime.directive.Directive
checkArgs, getColumn, getLine, getScopeName, getTemplate, getTemplateName, init, isScopeProvided, makeScope, postRender, preRender, setLocation, setLocation
-
Constructor Details
-
VelocityAutotagRuntime
public VelocityAutotagRuntime()
-
-
Method Details
-
createRequest
Description copied from interface:AutotagRuntime
Creates a new Request instance.- Specified by:
createRequest
in interfaceAutotagRuntime<Request>
- Returns:
- The Request.
-
createModelBody
Creates a new ModelBody instance to match the request.- Specified by:
createModelBody
in interfaceAutotagRuntime<Request>
- Returns:
- The ModelBody.
-
getParameter
Extracts a parameter from the tag.- Specified by:
getParameter
in interfaceAutotagRuntime<Request>
- Parameters:
name
- The name of the parameter.defaultValue
- The default value if none is specified.- Returns:
- The value of the parameter.
-
getName
- Specified by:
getName
in classorg.apache.velocity.runtime.directive.Directive
-
getType
public int getType()- Specified by:
getType
in classorg.apache.velocity.runtime.directive.Directive
-
render
public boolean render(org.apache.velocity.context.InternalContextAdapter context, Writer writer, org.apache.velocity.runtime.parser.node.Node node) - Specified by:
render
in classorg.apache.velocity.runtime.directive.Directive
-