org.apache.wicket.markup.head.filter
Class AbstractHeaderResponseFilter

java.lang.Object
  extended by org.apache.wicket.markup.head.filter.AbstractHeaderResponseFilter
All Implemented Interfaces:
FilteringHeaderResponse.IHeaderResponseFilter
Direct Known Subclasses:
CssAcceptingHeaderResponseFilter, CssAndPageAcceptingHeaderResponseFilter, JavaScriptAcceptingHeaderResponseFilter

public abstract class AbstractHeaderResponseFilter
extends Object
implements FilteringHeaderResponse.IHeaderResponseFilter

A default implementation of IHeaderResponseFilter that returns true for everything. It is defined as abstract because you are not supposed to use it directly, but use it as a base and override any methods that you need to return something other than true from (whether that's always false or conditional logic).

Author:
Jeremy Thomerson

Constructor Summary
AbstractHeaderResponseFilter(String name)
          Create a response filter.
 
Method Summary
 boolean accepts(HeaderItem item)
          Determines whether a given HeaderItem should be rendered in the bucket represented by this filter.
protected  boolean acceptsWrapped(HeaderItem item)
           
 String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHeaderResponseFilter

public AbstractHeaderResponseFilter(String name)
Create a response filter.

Parameters:
name -
Method Detail

getName

public String getName()
Specified by:
getName in interface FilteringHeaderResponse.IHeaderResponseFilter
Returns:
name of the filter (used by the container that renders these resources)

accepts

public boolean accepts(HeaderItem item)
Description copied from interface: FilteringHeaderResponse.IHeaderResponseFilter
Determines whether a given HeaderItem should be rendered in the bucket represented by this filter.

Specified by:
accepts in interface FilteringHeaderResponse.IHeaderResponseFilter
Parameters:
item - the item to be rendered
Returns:
true if it should be bucketed with other things in this filter

acceptsWrapped

protected boolean acceptsWrapped(HeaderItem item)


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.