com.day.cq.wcm.api
Class PageFilter

java.lang.Object
  extended by com.day.cq.wcm.api.PageFilter
All Implemented Interfaces:
Filter<Page>

public class PageFilter
extends Object
implements Filter<Page>

Implements a simple page filter that checks for invalid and hidden pages.


Constructor Summary
PageFilter()
          creates a default filter that excludes invalid and hidden pages.
PageFilter(boolean includeInvalid, boolean includeHidden)
          creates a filter.
PageFilter(javax.servlet.ServletRequest req)
          creates a default filter that excludes hidden pages.
PageFilter(WCMMode mode)
          creates a default filter that excludes hidden pages.
 
Method Summary
 boolean includes(Page page)
          Checks if the given element is included in this filter.
 boolean isIncludeHidden()
          Checks if hidden pages are included
 boolean isIncludeInvalid()
          Checks if invalid pages are included.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageFilter

public PageFilter()
creates a default filter that excludes invalid and hidden pages.


PageFilter

public PageFilter(WCMMode mode)
creates a default filter that excludes hidden pages. invalid pages are only excluded if the WCM mode is WCMMode.DISABLED.

Parameters:
mode - the WCM mode

PageFilter

public PageFilter(javax.servlet.ServletRequest req)
creates a default filter that excludes hidden pages. invalid pages are only excluded if the WCM mode is WCMMode.DISABLED.

Parameters:
req - request to read the WCM mode from

PageFilter

public PageFilter(boolean includeInvalid,
                  boolean includeHidden)
creates a filter.

Parameters:
includeInvalid - if true invalid pages are included.
includeHidden - if true hidden pages are included.
Method Detail

includes

public boolean includes(Page page)
Checks if the given element is included in this filter.

Specified by:
includes in interface Filter<Page>
Parameters:
page - the element to check
Returns:
true if the element is included; false otherwise.

isIncludeInvalid

public boolean isIncludeInvalid()
Checks if invalid pages are included.

Returns:
true if invalid pages are included.

isIncludeHidden

public boolean isIncludeHidden()
Checks if hidden pages are included

Returns:
true if hidden pages are included.


Copyright © 2008 Day Management AG. All Rights Reserved.