This project has retired. For details please refer to its Attic page.
BodyBlockDirective (Tiles 2 2.2.2 API)

org.apache.tiles.velocity.template
Class BodyBlockDirective

Package class diagram package BodyBlockDirective
java.lang.Object
  extended by org.apache.velocity.runtime.directive.Directive
      extended by org.apache.tiles.velocity.template.BodyBlockDirective
All Implemented Interfaces:
Cloneable, org.apache.velocity.runtime.directive.DirectiveConstants
Direct Known Subclasses:
AddAttributeDirective, PutAttributeDirective

public abstract class BodyBlockDirective
extends org.apache.velocity.runtime.directive.Directive

Base abstract directive for those models who need to evaluate and use a body.

Since:
2.2.2
Version:
$Rev: 902965 $ $Date: 2010-01-25 21:12:46 +0100 (lun, 25 gen 2010) $

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
BodyBlockDirective()
           
 
Method Summary
protected abstract  void end(org.apache.velocity.context.InternalContextAdapter context, Writer writer, Map<String,Object> params, String body, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
          Ends the directive, after evaluating the body.
 int getType()
          
 boolean render(org.apache.velocity.context.InternalContextAdapter context, Writer writer, org.apache.velocity.runtime.parser.node.Node node)
          
protected abstract  void start(org.apache.velocity.context.InternalContextAdapter context, Writer writer, Map<String,Object> params, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
          Starts the directive, before evaluating the body.
 
Methods inherited from class org.apache.velocity.runtime.directive.Directive
getColumn, getLine, getName, getTemplateName, init, setLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BodyBlockDirective

public BodyBlockDirective()
Method Detail

getType

public int getType()

Specified by:
getType in class org.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)
               throws IOException

Specified by:
render in class org.apache.velocity.runtime.directive.Directive
Throws:
IOException

start

protected abstract void start(org.apache.velocity.context.InternalContextAdapter context,
                              Writer writer,
                              Map<String,Object> params,
                              HttpServletRequest request,
                              HttpServletResponse response,
                              ServletContext servletContext)
Starts the directive, before evaluating the body.

Parameters:
context - The Velocity context.
writer - The writer user to write the result.
params - The parameters got from the first node of the directive.
request - The HTTP request.
response - The HTTP response.
servletContext - The servlet context.
Since:
2.2.2

end

protected abstract void end(org.apache.velocity.context.InternalContextAdapter context,
                            Writer writer,
                            Map<String,Object> params,
                            String body,
                            HttpServletRequest request,
                            HttpServletResponse response,
                            ServletContext servletContext)
                     throws IOException
Ends the directive, after evaluating the body.

Parameters:
context - The Velocity context.
writer - The writer user to write the result.
params - The parameters got from the first node of the directive.
body - The body contained in this directive, as a string.
request - The HTTP request.
response - The HTTP response.
servletContext - The servlet context.
Throws:
IOException - If something goes wrong when finishing this directive.
Since:
2.2.2


Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.