Class CalDavCalendarCollection

    • Method Detail

      • getEvents

        public Calendar[] getEvents()
        Returns:
        and array of calendar objects
      • getTasks

        public Calendar[] getTasks()
        Returns:
        and array of calendar objects
      • getComponentsByType

        public Calendar[] getComponentsByType​(String componentType)
        Parameters:
        componentType - the type of component
        Returns:
        and array of calendar objects
      • getDescription

        public String getDescription()
        Provides a human-readable description of the calendar collection.
        Specified by:
        getDescription in interface ObjectCollection<Calendar>
        Returns:
        the collection description
      • getMaxAttendeesPerInstance

        public Integer getMaxAttendeesPerInstance()
        Provides a numeric value indicating the maximum number of ATTENDEE properties in any instance of a calendar object resource stored in a calendar collection.
        Specified by:
        getMaxAttendeesPerInstance in interface CalendarCollection
        Returns:
        a numeric value indicating the maximum number of ATTENDEE properties in any instance of a calendar object resource stored in a calendar collection.
      • getMaxDateTime

        public String getMaxDateTime()
        Provides a DATE-TIME value indicating the latest date and time (in UTC) that the server is willing to accept for any DATE or DATE-TIME value in a calendar object resource stored in a calendar collection.
        Specified by:
        getMaxDateTime in interface CalendarCollection
        Returns:
        a DATE-TIME value indicating the latest date and time (in UTC) that the server is willing to accept for any DATE or DATE-TIME value in a calendar object resource stored in a calendar collection.
      • getMaxInstances

        public Integer getMaxInstances()
        Provides a numeric value indicating the maximum number of recurrence instances that a calendar object resource stored in a calendar collection can generate.
        Specified by:
        getMaxInstances in interface CalendarCollection
        Returns:
        a numeric value indicating the maximum number of recurrence instances that a calendar object resource stored in a calendar collection can generate.
      • getMaxResourceSize

        public long getMaxResourceSize()
        Provides a numeric value indicating the maximum size of a resource in octets that the server is willing to accept when a calendar object resource is stored in a calendar collection. 0 = no limits.
        Specified by:
        getMaxResourceSize in interface CalendarCollection
        Returns:
        a numeric value indicating the maximum size of a resource in octets that the server is willing to accept when a calendar object resource is stored in a calendar collection.
      • getMinDateTime

        public String getMinDateTime()
        Provides a DATE-TIME value indicating the earliest date and time (in UTC) that the server is willing to accept for any DATE or DATE-TIME value in a calendar object resource stored in a calendar collection.
        Specified by:
        getMinDateTime in interface CalendarCollection
        Returns:
        a DATE-TIME value indicating the earliest date and time (in UTC) that the server is willing to accept for any DATE or DATE-TIME value in a calendar object resource stored in a calendar collection.
      • getSupportedComponentTypes

        public String[] getSupportedComponentTypes()
        Get the list of calendar components (VEVENT, VTODO, etc.) that this collection supports.
        Specified by:
        getSupportedComponentTypes in interface CalendarCollection
        Returns:
        an array of component names indicating the type of components supported by the collection.
      • getTimeZone

        public Calendar getTimeZone()
        The CALDAV:calendar-timezone property is used to specify the time zone the server should rely on to resolve "date" values and "date with local time" values (i.e., floating time) to "date with UTC time" values.
        Specified by:
        getTimeZone in interface CalendarCollection
        Returns:
        an iCalendar object with exactly one VTIMEZONE component.
      • getColor

        public String getColor()
      • getOrder

        public int getOrder()
      • addCalendar

        public void addCalendar​(String uri,
                                Calendar calendar)
                         throws ObjectStoreException
        Stores the specified calendar in this collection, using the specified URI.
        Parameters:
        uri - the URI (relative to this collection's path) where the calendar is to be stored
        calendar - a calendar object instance to be added to the collection
        Throws:
        ObjectStoreException - when an unexpected error occurs (implementation-specific)
      • getCalendarFromUri

        public Calendar getCalendarFromUri​(String uri)
                                    throws ObjectNotFoundException
        Returns the calendar object located at the specified URI.
        Parameters:
        uri - the URI (relative to this collection's path) where the calendar is to be found
        Returns:
        a calendar object or null if no calendar exists under the specified URI
        Throws:
        ObjectNotFoundException
      • getObjectsByFilter

        public Calendar[] getObjectsByFilter​(Element filter,
                                             Element calData)
                                      throws IOException,
                                             org.apache.jackrabbit.webdav.DavException,
                                             ParserConfigurationException,
                                             ParserException
        Returns a list of calendar objects by calling a REPORT method with a filter. You must pass a XML element as the argument, the element must contain the filter. For example, if you wish to filter objects to only get VEVENT objects you can build a filter like this: org.w3c.dom.Element calData = DomUtil.createElement(document, CalDavConstants.PROPERTY_CALENDAR_DATA, CalDavConstants.CALDAV_NAMESPACE); org.w3c.dom.Element calFilter = DomUtil.createElement(document, CalDavConstants.PROPERTY_COMP_FILTER, CalDavConstants.CALDAV_NAMESPACE); calFilter.setAttribute(CalDavConstants.ATTRIBUTE_NAME, Calendar.VCALENDAR); org.w3c.dom.Element eventFilter = DomUtil.createElement(document, CalDavConstants.PROPERTY_COMP_FILTER, CalDavConstants.CALDAV_NAMESPACE); eventFilter.setAttribute(CalDavConstants.ATTRIBUTE_NAME, Component.VEVENT); calFilter.appendChild(eventFilter); collection.getObjectsByFilter(calFilter); Check the examples in rfc4791
        Parameters:
        filter -
        Returns:
        Throws:
        IOException
        org.apache.jackrabbit.webdav.DavException
        ParserConfigurationException
        ParserException
      • doFreeBusyQuery

        public Calendar[] doFreeBusyQuery()
        TODO: implement free-busy-query
        Returns:
      • propertiesForFetch

        public static final org.apache.jackrabbit.webdav.property.DavPropertyNameSet propertiesForFetch()