Class ApplyDecoratorDirective
- java.lang.Object
-
- org.apache.velocity.runtime.directive.Directive
-
- com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective
-
- All Implemented Interfaces:
Cloneable,org.apache.velocity.runtime.directive.DirectiveConstants
public final class ApplyDecoratorDirective extends org.apache.velocity.runtime.directive.DirectiveAn ApplyDecorator directive for Sitemesh.Example use:
#applyDecorator("mydecorator" "inline title")
The body goes here. #end
The title attribute is optional.
- See Also:
ParamDirective
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApplyDecoratorDirective.DirectiveStack
-
Constructor Summary
Constructors Constructor Description ApplyDecoratorDirective()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(String paramName, Object paramValue)StringgetName()Returns the name of the directive.intgetType()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)The directive is initialized.booleanrender(org.apache.velocity.context.InternalContextAdapter adapter, Writer writer, org.apache.velocity.runtime.parser.node.Node node)Does the actual decoration.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of the directive.- Specified by:
getNamein classorg.apache.velocity.runtime.directive.Directive- Returns:
- name of the directive
-
getType
public int getType()
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)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.MethodInvocationExceptionDoes the actual decoration.- 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
-
-