org.codehaus.groovy.grails.web.sitemesh
Class GrailsPageFilter

java.lang.Object
  extended by com.opensymphony.module.sitemesh.filter.PageFilter
      extended by org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter
All Implemented Interfaces:
com.opensymphony.module.sitemesh.RequestConstants, Filter

public class GrailsPageFilter
extends com.opensymphony.module.sitemesh.filter.PageFilter

Extends the default page filter to overide the apply decorator behaviour if the page is a GSP

Since:
Apr 19, 2006
Author:
Graeme Rocher

Field Summary
 
Fields inherited from class com.opensymphony.module.sitemesh.filter.PageFilter
factory, filterConfig
 
Fields inherited from interface com.opensymphony.module.sitemesh.RequestConstants
DECORATOR, FILTER_APPLIED, PAGE, ROBOT, USING_STREAM
 
Constructor Summary
GrailsPageFilter()
           
 
Method Summary
protected  void applyDecorator(com.opensymphony.module.sitemesh.Page page, com.opensymphony.module.sitemesh.Decorator decorator, HttpServletRequest request, HttpServletResponse response)
           
 void destroy()
           
 void doFilter(ServletRequest rq, ServletResponse rs, FilterChain chain)
           
 void init(FilterConfig filterConfig)
           
protected  com.opensymphony.module.sitemesh.Page parsePage(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
          Continue in filter-chain, writing all content to buffer and parsing into returned Page object.
 
Methods inherited from class com.opensymphony.module.sitemesh.filter.PageFilter
getFilterConfig, setFilterConfig, writeDecorator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrailsPageFilter

public GrailsPageFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
Specified by:
init in interface Filter
Overrides:
init in class com.opensymphony.module.sitemesh.filter.PageFilter

destroy

public void destroy()
Specified by:
destroy in interface Filter
Overrides:
destroy in class com.opensymphony.module.sitemesh.filter.PageFilter

doFilter

public void doFilter(ServletRequest rq,
                     ServletResponse rs,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Overrides:
doFilter in class com.opensymphony.module.sitemesh.filter.PageFilter
Throws:
IOException
ServletException

parsePage

protected com.opensymphony.module.sitemesh.Page parsePage(HttpServletRequest request,
                                                          HttpServletResponse response,
                                                          FilterChain chain)
                                                   throws IOException,
                                                          ServletException
Continue in filter-chain, writing all content to buffer and parsing into returned Page object. If Page is not parseable, null is returned.

Overrides:
parsePage in class com.opensymphony.module.sitemesh.filter.PageFilter
Throws:
IOException
ServletException

applyDecorator

protected void applyDecorator(com.opensymphony.module.sitemesh.Page page,
                              com.opensymphony.module.sitemesh.Decorator decorator,
                              HttpServletRequest request,
                              HttpServletResponse response)
                       throws ServletException,
                              IOException
Overrides:
applyDecorator in class com.opensymphony.module.sitemesh.filter.PageFilter
Throws:
ServletException
IOException


Copyright (c) 2005-2006 The Grails project