Class FilterHandler
java.lang.Object
org.bedework.caldav.server.filter.FilterHandler
- All Implemented Interfaces:
org.bedework.util.logging.Logged
public class FilterHandler
extends java.lang.Object
implements org.bedework.util.logging.Logged
Class to represent a calendar-query filter
10.3.1 CALDAV:comp-filter XML Element
Name:
comp-filter
Namespace:
urn:ietf:params:xml:ns:caldav
Purpose:
Limits the search to only the chosen component types.
Description:
The "name" attribute is an iCalendar component type (e.g., "VEVENT").
When this element is present, the server should only return a component
if it matches the filter, which is to say:
A component of the type specified by the "name" attribute
exists, and the CALDAV:comp-filter is empty, OR
it contains at least one recurrence instance scheduled to overlap a
given time range if a CALDAV:time-range XML element is specified, and
that any CALDAV:prop-filter and CALDAV:comp-filter child elements
also match.
10.3.2 CALDAV:prop-filter XML Element
Name:
prop-filter
Namespace:
urn:ietf:params:xml:ns:caldav
Purpose:
Limits the search to specific properties.
Description:
The "name" attribute MUST contain an iCalendar property name
(e.g., "ATTENDEE"). When the 'prop-filter' executes, a property matches if:
A property of the type specified by the "name" attribute
exists, and the CALDAV:prop-filter is empty, OR it matches the
CALDAV:time-range XML element or CALDAV:text-match conditions
if specified, and that any CALDAV:param-filter child elements
also match.
or:
A property of the type specified by the "name" attribute does
not exist, and the CALDAV:is-not-defined element is specified.
10.3.3 CALDAV:param-filter XML Element
Name:
param-filter
Namespace:
urn:ietf:params:xml:ns:caldav
Purpose:
Limits the search to specific parameters.
Description:
The "param-filter" element limits the search result to the set of resources containing properties with parameters that meet the parameter filter rules. When this filter executes, a parameter matches if:
("is-defined matches" OR "text-match matches")
- Author:
- Mike Douglass douglm @ rpi.edu
-
Constructor Summary
Constructors Constructor Description FilterHandler(ietf.params.xml.ns.caldav.FilterType f)Constructor -
Method Summary
Modifier and Type Method Description org.bedework.util.logging.BwLoggergetLogger()java.util.Collection<org.bedework.webdav.servlet.shared.WebdavNsNode>postFilter(java.util.Collection<org.bedework.webdav.servlet.shared.WebdavNsNode> nodes)Carry out any postfiltering on the collection of initialised nodes,java.util.Collection<CalDAVEvent<?>>query(CaldavBwNode wdnode, java.util.List<java.lang.String> retrieveList, RetrievalMode retrieveRecur)Use the given query to return a collection of nodes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
-
Constructor Details
-
FilterHandler
public FilterHandler(ietf.params.xml.ns.caldav.FilterType f)Constructor- Parameters:
f- a filter
-
-
Method Details
-
query
public java.util.Collection<CalDAVEvent<?>> query(CaldavBwNode wdnode, java.util.List<java.lang.String> retrieveList, RetrievalMode retrieveRecur) throws org.bedework.webdav.servlet.shared.WebdavExceptionUse the given query to return a collection of nodes. An exception will be raised if the entire query fails for some reason (access, etc). An empty collection will be returned if no objects match.- Parameters:
wdnode- WebdavNsNode defining root of searchretrieveList- If non-null limit required fields.retrieveRecur- How we retrieve recurring events- Returns:
- Collection of event objects (null or empty for no result)
- Throws:
org.bedework.webdav.servlet.shared.WebdavException- on error
-
postFilter
public java.util.Collection<org.bedework.webdav.servlet.shared.WebdavNsNode> postFilter(java.util.Collection<org.bedework.webdav.servlet.shared.WebdavNsNode> nodes) throws org.bedework.webdav.servlet.shared.WebdavExceptionCarry out any postfiltering on the collection of initialised nodes,- Parameters:
nodes- Collection of initialised CaldavBwNode- Returns:
- Collection of filtered nodes (empty for no result)
- Throws:
org.bedework.webdav.servlet.shared.WebdavException- on error
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-