Class FilterHandler
java.lang.Object
org.bedework.caldav.server.filter.FilterHandler
- All Implemented Interfaces:
org.bedework.util.logging.Logged
Class to represent a calendar-query filter
<!ELEMENT filter comp-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.
<!ELEMENT comp-filter (is-not-defined | (time-range?,
prop-filter*, comp-filter*))>
<!ATTLIST comp-filter name CDATA #REQUIRED>
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.
<!ELEMENT prop-filter ((is-not-defined |
((time-range | text-match)?,
param-filter*))>
<!ATTLIST prop-filter name CDATA #REQUIRED>
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")
<!ELEMENT param-filter (is-defined | text-match) >
<!ATTLIST param-filter name CDATA #REQUIRED>
- Author:
- Mike Douglass douglm @ rpi.edu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bedework.util.logging.BwLoggerCollection<org.bedework.webdav.servlet.shared.WebdavNsNode>postFilter(Collection<org.bedework.webdav.servlet.shared.WebdavNsNode> nodes) Carry out any postfiltering on the collection of initialised nodes,query(CaldavBwNode wdnode, List<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, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Constructor Details
-
FilterHandler
Constructor- Parameters:
f- a filter
-
-
Method Details
-
query
public Collection<CalDAVEvent<?>> query(CaldavBwNode wdnode, List<String> retrieveList, RetrievalMode retrieveRecur) throws org.bedework.webdav.servlet.shared.WebdavException Use 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 Collection<org.bedework.webdav.servlet.shared.WebdavNsNode> postFilter(Collection<org.bedework.webdav.servlet.shared.WebdavNsNode> nodes) throws org.bedework.webdav.servlet.shared.WebdavException Carry 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
-