org.velocityweb.dispatcher
Class LeafDispatcher

java.lang.Object
  extended byorg.velocityweb.dispatcher.Dispatcher
      extended byorg.velocityweb.dispatcher.LeafDispatcher
Direct Known Subclasses:
QueryDispatcher, UpdateDispatcher

public abstract class LeafDispatcher
extends Dispatcher

leaf dispatcher, belong to one dispatcher group, or not

Author:
Jacklondon Chen

Field Summary
protected  java.lang.String templateHtmlCharsetName
          HTML tempalte file charset name
 
Constructor Summary
LeafDispatcher()
           
 
Method Summary
 boolean forward(java.lang.Class dispatcherClass, javax.servlet.http.HttpServletRequest request, WebAppContext webContext)
          forward to another dispathcer
 java.lang.String getHtmlTemplateFileName()
          get HTML tempalte file name for this dispatcher
 java.lang.String getPageTitle()
          get page title
 java.lang.String getTemplateHtmlCharsetName()
          get HTML tempalte file charset name
 int getTransactionIsolation()
          get transaction isolation of connection, this work for design pattern TRANSACTION-PER-REQUEST
abstract  boolean process(javax.servlet.http.HttpServletRequest request, WebAppContext webContext)
          process logic for this dispatcher
 void setHtmlTemplateFileName(java.lang.String htmlTemplateFileName)
          set HTML tempalte file name for this dispatcher
 void setPageTitle(java.lang.String pageTitle)
          set page title
 void setTemplateHtmlCharsetName(java.lang.String templateHtmlCharsetName)
          set HTML tempalte file charset name
 void setTransactionIsolation(int transactionIsolation)
          set transaction isolation of connection, this work for design pattern TRANSACTION-PER-REQUEST
 
Methods inherited from class org.velocityweb.dispatcher.Dispatcher
getMenuName, getPageLayout, getUrlId, setPageLayout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

templateHtmlCharsetName

protected java.lang.String templateHtmlCharsetName
HTML tempalte file charset name

Constructor Detail

LeafDispatcher

public LeafDispatcher()
Method Detail

getTransactionIsolation

public int getTransactionIsolation()
get transaction isolation of connection, this work for design pattern TRANSACTION-PER-REQUEST

Returns:
transaction isolation of connection

setTransactionIsolation

public void setTransactionIsolation(int transactionIsolation)
set transaction isolation of connection, this work for design pattern TRANSACTION-PER-REQUEST

Parameters:
transactionIsolation -

process

public abstract boolean process(javax.servlet.http.HttpServletRequest request,
                                WebAppContext webContext)
                         throws java.lang.Exception
process logic for this dispatcher

Throws:
java.lang.Exception

getHtmlTemplateFileName

public java.lang.String getHtmlTemplateFileName()
get HTML tempalte file name for this dispatcher

Returns:
HTML tempalte file name

setHtmlTemplateFileName

public void setHtmlTemplateFileName(java.lang.String htmlTemplateFileName)
set HTML tempalte file name for this dispatcher

Parameters:
htmlTemplateFileName -

getTemplateHtmlCharsetName

public java.lang.String getTemplateHtmlCharsetName()
get HTML tempalte file charset name

Returns:
Returns the templateHtmlCharsetName.

setTemplateHtmlCharsetName

public void setTemplateHtmlCharsetName(java.lang.String templateHtmlCharsetName)
set HTML tempalte file charset name

Parameters:
templateHtmlCharsetName - The templateHtmlCharsetName to set.

getPageTitle

public java.lang.String getPageTitle()
get page title

Returns:
page title

setPageTitle

public void setPageTitle(java.lang.String pageTitle)
set page title

Parameters:
pageTitle -

forward

public boolean forward(java.lang.Class dispatcherClass,
                       javax.servlet.http.HttpServletRequest request,
                       WebAppContext webContext)
                throws java.lang.Exception
forward to another dispathcer

Parameters:
dispatcherClass -
request -
webContext -
Returns:
true if forward success
Throws:
java.lang.Exception