Class ParamDirective
java.lang.Object
org.apache.velocity.runtime.directive.Directive
com.atlassian.confluence.setup.velocity.ParamDirective
- All Implemented Interfaces:
Cloneable,org.apache.velocity.runtime.directive.DirectiveConstants
@Deprecated(forRemoval=true)
public final class ParamDirective
extends org.apache.velocity.runtime.directive.Directive
Deprecated, for removal: This API element is subject to removal in a future version.
A ParamDirective for Velocity to add parameters to a decorator directive. All the parameters provided
to the decorator are available in a Map called $params
Example use:
#applyDecorator( ... )
#decoratorParam("paramname" $foo)
#decoratorParam("otherparam" "bar")
#end
- See Also:
-
Field Summary
Fields inherited from class org.apache.velocity.runtime.directive.Directive
rsvcFields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants
BLOCK, LINE -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Deprecated, for removal: This API element is subject to removal in a future version.Returns the name of the directive.intgetType()Deprecated, for removal: This API element is subject to removal in a future version.Tells velocity that this is a block-type directive.voidinit(org.apache.velocity.runtime.RuntimeServices services, org.apache.velocity.context.InternalContextAdapter adapter, org.apache.velocity.runtime.parser.node.Node node) Deprecated, for removal: This API element is subject to removal in a future version.The directive is initialized.booleanrender(org.apache.velocity.context.InternalContextAdapter adapter, Writer writer, org.apache.velocity.runtime.parser.node.Node node) Deprecated, for removal: This API element is subject to removal in a future version.Add the actual parameterMethods inherited from class org.apache.velocity.runtime.directive.Directive
getColumn, getLine, getTemplateName, setLocation, setLocation
-
Constructor Details
-
ParamDirective
public ParamDirective()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getName
Deprecated, for removal: This API element is subject to removal in a future version.Returns the name of the directive.- Specified by:
getNamein classorg.apache.velocity.runtime.directive.Directive- Returns:
- name of the directive
-
getType
public int getType()Deprecated, for removal: This API element is subject to removal in a future version.Tells velocity that this is a block-type directive.- Specified by:
getTypein classorg.apache.velocity.runtime.directive.Directive- Returns:
- directive type
-
init
public void init(org.apache.velocity.runtime.RuntimeServices services, org.apache.velocity.context.InternalContextAdapter adapter, org.apache.velocity.runtime.parser.node.Node node) Deprecated, for removal: This API element is subject to removal in a future version.The directive is initialized.- Overrides:
initin classorg.apache.velocity.runtime.directive.Directive- Parameters:
services- Velocity runtime services.adapter- context.node- within the directive.
-
render
public boolean render(org.apache.velocity.context.InternalContextAdapter adapter, Writer writer, org.apache.velocity.runtime.parser.node.Node node) throws IOException, org.apache.velocity.exception.ResourceNotFoundException, org.apache.velocity.exception.ParseErrorException, org.apache.velocity.exception.MethodInvocationException Deprecated, for removal: This API element is subject to removal in a future version.Add the actual parameter- Specified by:
renderin classorg.apache.velocity.runtime.directive.Directive- Parameters:
adapter- the context.writer- a writer instance to which to write the decorated text.node- the node within our block.- Throws:
IOExceptionorg.apache.velocity.exception.ResourceNotFoundExceptionorg.apache.velocity.exception.ParseErrorExceptionorg.apache.velocity.exception.MethodInvocationException
-
ParamDirective