|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.runtime.directive.Directive
com.atlassian.confluence.setup.velocity.ParamDirective
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
ApplyDecoratorDirective
Field Summary |
Fields inherited from class org.apache.velocity.runtime.directive.Directive |
rsvc |
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants |
BLOCK, LINE |
Constructor Summary | |
ParamDirective()
|
Method Summary | |
String |
getName()
Returns the name of the directive. |
int |
getType()
Tells velocity that this is a block-type directive. |
void |
init(org.apache.velocity.runtime.RuntimeServices services,
org.apache.velocity.context.InternalContextAdapter adapter,
org.apache.velocity.runtime.parser.node.Node node)
The directive is initialized. |
boolean |
render(org.apache.velocity.context.InternalContextAdapter adapter,
Writer writer,
org.apache.velocity.runtime.parser.node.Node node)
Add the actual parameter |
Methods inherited from class org.apache.velocity.runtime.directive.Directive |
getColumn, getLine, setLocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ParamDirective()
Method Detail |
public String getName()
public int getType()
public void init(org.apache.velocity.runtime.RuntimeServices services, org.apache.velocity.context.InternalContextAdapter adapter, org.apache.velocity.runtime.parser.node.Node node) throws Exception
services
- Velocity runtime services.adapter
- context.node
- within the directive.
Exception
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
adapter
- the context.writer
- a writer instance to which to write the decorated text.node
- the node within our block.
IOException
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
org.apache.velocity.exception.MethodInvocationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |