org.barracudamvc.core.event.helper
Class BlockIterateHandler

java.lang.Object
  extended by org.barracudamvc.core.event.DefaultBaseEventListener
      extended by org.barracudamvc.core.event.helper.BlockIterateHandler
All Implemented Interfaces:
EventListener, BaseEventListener

public abstract class BlockIterateHandler
extends DefaultBaseEventListener


Field Summary
protected  BlockIterator bi
           
protected  Map biCache
           
protected  Stack itStack
           
protected  Node nextNode
           
protected  Node stubNode
           
protected  ViewContext vc
           
protected  DOMWriter writer
           
 
Fields inherited from class org.barracudamvc.core.event.DefaultBaseEventListener
idStr, localLogger
 
Constructor Summary
BlockIterateHandler()
           
 
Method Summary
 DOMWriter getDOMWriter()
           
abstract  BlockIterator getIterator(String key)
          this is where you provide iterators for blocks as they are encountered in the template
abstract  Class getTemplateClass()
          you must override this method to specify what template you wish to process
 ViewContext getViewContext()
           
 void handleViewEvent(ViewEventContext vec)
          Handle the ViewEvent
 void handleViewEvent(ViewEventContext vec, Document page)
          Handle the ViewEvent
 void initHandler()
          you can override this method to handle any initializion needs for the handler.
 void printChildNodes(DOMWriter dw, Node node, Writer out, int depth, boolean isHtml)
           
 void printNode(DOMWriter writer, Node node, Writer out, int depth, boolean isHtml)
           
 void setViewContext(ViewContext ivc)
           
 
Methods inherited from class org.barracudamvc.core.event.DefaultBaseEventListener
getListenerID, handleControlEvent, handleEvent, handleOtherEvent, isHandled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itStack

protected Stack itStack

biCache

protected Map biCache

vc

protected ViewContext vc

bi

protected BlockIterator bi

writer

protected DOMWriter writer

nextNode

protected Node nextNode

stubNode

protected Node stubNode
Constructor Detail

BlockIterateHandler

public BlockIterateHandler()
Method Detail

setViewContext

public void setViewContext(ViewContext ivc)

getViewContext

public ViewContext getViewContext()

getDOMWriter

public DOMWriter getDOMWriter()

initHandler

public void initHandler()
you can override this method to handle any initializion needs for the handler. Its invoked after the view context info has been set up


getTemplateClass

public abstract Class getTemplateClass()
you must override this method to specify what template you wish to process


getIterator

public abstract BlockIterator getIterator(String key)
this is where you provide iterators for blocks as they are encountered in the template


handleViewEvent

public void handleViewEvent(ViewEventContext vec)
                     throws EventException,
                            javax.servlet.ServletException,
                            IOException
Handle the ViewEvent

Overrides:
handleViewEvent in class DefaultBaseEventListener
Parameters:
vec - the ViewEventContext
Throws:
EventException
javax.servlet.ServletException
IOException

handleViewEvent

public void handleViewEvent(ViewEventContext vec,
                            Document page)
                     throws EventException,
                            javax.servlet.ServletException,
                            IOException
Handle the ViewEvent

Throws:
EventException
javax.servlet.ServletException
IOException

printNode

public void printNode(DOMWriter writer,
                      Node node,
                      Writer out,
                      int depth,
                      boolean isHtml)
               throws RenderException,
                      IOException
Throws:
RenderException
IOException

printChildNodes

public void printChildNodes(DOMWriter dw,
                            Node node,
                            Writer out,
                            int depth,
                            boolean isHtml)
                     throws RenderException,
                            IOException
Throws:
RenderException
IOException


Copyright © 2006 BarracudaMVC.org All Rights Reserved.