jodd.lagarto.htmlstapler
Class HtmlStaplerFilter

java.lang.Object
  extended by jodd.lagarto.filter.LagartoServletFilter
      extended by jodd.lagarto.filter.SimpleLagartoServletFilter
          extended by jodd.lagarto.htmlstapler.HtmlStaplerFilter
All Implemented Interfaces:
javax.servlet.Filter

public class HtmlStaplerFilter
extends SimpleLagartoServletFilter

HtmlStapler filter. Part of the parameters are here, the other part is in the bundle manager.


Nested Class Summary
 
Nested classes/interfaces inherited from class jodd.lagarto.filter.SimpleLagartoServletFilter
SimpleLagartoServletFilter.LagartoParsingProcessor
 
Field Summary
protected  HtmlStaplerBundlesManager bundlesManager
           
protected  int cacheMaxAge
           
protected  boolean enabled
           
protected  boolean resetOnStart
           
protected  HtmlStaplerBundlesManager.Strategy staplerStrategy
           
protected  boolean stripHtml
           
protected  boolean useGzip
           
 
Constructor Summary
HtmlStaplerFilter()
           
 
Method Summary
protected  HtmlStaplerBundlesManager createBundleManager(javax.servlet.ServletContext servletContext, HtmlStaplerBundlesManager.Strategy strategy)
          Creates HtmlStaplerBundlesManager instance.
protected  SimpleLagartoServletFilter.LagartoParsingProcessor createParsingProcessor()
          Returns custom parsing processor.
 void init(javax.servlet.FilterConfig filterConfig)
           
protected  boolean processActionPath(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, java.lang.String actionPath)
          Manually process the action path and returns true if path is consumed.
protected  void readFilterConfigParameters(javax.servlet.FilterConfig filterConfig, java.lang.Object target, java.lang.String... parameters)
          Reads filter config parameters and set into destination target.
protected  void sendBundleFile(javax.servlet.http.HttpServletResponse resp, java.io.File bundleFile)
          Outputs bundle file to the response.
 
Methods inherited from class jodd.lagarto.filter.SimpleLagartoServletFilter
parse
 
Methods inherited from class jodd.lagarto.filter.LagartoServletFilter
acceptActionPath, destroy, doFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundlesManager

protected HtmlStaplerBundlesManager bundlesManager

enabled

protected boolean enabled

stripHtml

protected boolean stripHtml

resetOnStart

protected boolean resetOnStart

useGzip

protected boolean useGzip

cacheMaxAge

protected int cacheMaxAge

staplerStrategy

protected HtmlStaplerBundlesManager.Strategy staplerStrategy
Constructor Detail

HtmlStaplerFilter

public HtmlStaplerFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Overrides:
init in class LagartoServletFilter
Throws:
javax.servlet.ServletException

readFilterConfigParameters

protected void readFilterConfigParameters(javax.servlet.FilterConfig filterConfig,
                                          java.lang.Object target,
                                          java.lang.String... parameters)
Reads filter config parameters and set into destination target.


createBundleManager

protected HtmlStaplerBundlesManager createBundleManager(javax.servlet.ServletContext servletContext,
                                                        HtmlStaplerBundlesManager.Strategy strategy)
Creates HtmlStaplerBundlesManager instance.


createParsingProcessor

protected SimpleLagartoServletFilter.LagartoParsingProcessor createParsingProcessor()
Description copied from class: SimpleLagartoServletFilter
Returns custom parsing processor. Returns null when content does not have to be parsed.

Specified by:
createParsingProcessor in class SimpleLagartoServletFilter

processActionPath

protected boolean processActionPath(javax.servlet.http.HttpServletRequest servletRequest,
                                    javax.servlet.http.HttpServletResponse servletResponse,
                                    java.lang.String actionPath)
                             throws java.io.IOException
Description copied from class: LagartoServletFilter
Manually process the action path and returns true if path is consumed. When path is consumed, filter chain is not continued. By default, it returns false.

Overrides:
processActionPath in class LagartoServletFilter
Throws:
java.io.IOException

sendBundleFile

protected void sendBundleFile(javax.servlet.http.HttpServletResponse resp,
                              java.io.File bundleFile)
                       throws java.io.IOException
Outputs bundle file to the response.

Throws:
java.io.IOException


Copyright © 2003-2012 Jodd Team