Package net.fortuna.ical4j.connector.jcr
Class JcrCalendarCollection
- java.lang.Object
-
- org.jcrom.AbstractJcrEntity
-
- net.fortuna.ical4j.connector.jcr.AbstractJcrObjectCollection<Calendar>
-
- net.fortuna.ical4j.connector.jcr.JcrCalendarCollection
-
- All Implemented Interfaces:
Serializable,CalendarCollection,ObjectCollection<Calendar>
public class JcrCalendarCollection extends AbstractJcrObjectCollection<Calendar> implements CalendarCollection
$Id$ Created on: 15/01/2009- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JcrCalendarCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCalendar(Calendar calendar)Stores the specified calendar in this collection.Calendarexport()Exports the entire collection as a single calendar object.CalendargetCalendar(String uid)Returns the calendar object with the specified UID.Calendar[]getComponents()Returns all objects stored in the collection.IntegergetMaxAttendeesPerInstance()StringgetMaxDateTime()IntegergetMaxInstances()longgetMaxResourceSize()StringgetMinDateTime()String[]getSupportedComponentTypes()MediaType[]getSupportedMediaTypes()CalendargetTimeZone()voidmerge(Calendar calendar)Merges the specified calendar object with this collecton.CalendarremoveCalendar(String uid)-
Methods inherited from class net.fortuna.ical4j.connector.jcr.AbstractJcrObjectCollection
getCollectionName, getDescription, getDisplayName, getNode, getStore, setCollectionName, setDescription, setDisplayName, setStore
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.fortuna.ical4j.connector.ObjectCollection
getDescription, getDisplayName
-
-
-
-
Method Detail
-
addCalendar
public void addCalendar(Calendar calendar) throws ObjectStoreException, ConstraintViolationException
Stores the specified calendar in this collection.- Specified by:
addCalendarin interfaceCalendarCollection- Parameters:
calendar- a calendar object instance to be added to the collection- Throws:
ObjectStoreException- when an unexpected error occurs (implementation-specific)ConstraintViolationException- if the specified calendar has no single unique identifier (UID)
-
export
public Calendar export() throws ObjectStoreException
Exports the entire collection as a single calendar object.- Specified by:
exportin interfaceCalendarCollection- Returns:
- a calendar object instance that contains all calendars in the collection
- Throws:
ObjectStoreException- where an unexpected error occurs
-
getCalendar
public Calendar getCalendar(String uid) throws ObjectNotFoundException
Returns the calendar object with the specified UID.- Specified by:
getCalendarin interfaceCalendarCollection- Parameters:
uid- the UID associated with the returned calendar- Returns:
- a calendar object or null if no calendar with the specified UID exists
- Throws:
ObjectNotFoundException
-
getComponents
public Calendar[] getComponents() throws ObjectStoreException
Returns all objects stored in the collection.- Specified by:
getComponentsin interfaceObjectCollection<Calendar>- Returns:
- an array of collection objects
- Throws:
ObjectStoreException- where an unexpected error occurs
-
getMaxAttendeesPerInstance
public Integer getMaxAttendeesPerInstance()
- Specified by:
getMaxAttendeesPerInstancein interfaceCalendarCollection- 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()
- Specified by:
getMaxDateTimein interfaceCalendarCollection- 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()
- Specified by:
getMaxInstancesin interfaceCalendarCollection- 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()
- Specified by:
getMaxResourceSizein interfaceCalendarCollection- 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()
- Specified by:
getMinDateTimein interfaceCalendarCollection- 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()
- Specified by:
getSupportedComponentTypesin interfaceCalendarCollection- Returns:
- an array of component names indicating the type of components supported by the collection.
-
getSupportedMediaTypes
public MediaType[] getSupportedMediaTypes()
- Specified by:
getSupportedMediaTypesin interfaceCalendarCollection- Returns:
- the media type supported for the calendar object resources contained in a given calendar collection (e.g., iCalendar version 2.0).
-
getTimeZone
public Calendar getTimeZone()
- Specified by:
getTimeZonein interfaceCalendarCollection- Returns:
- an iCalendar object with exactly one VTIMEZONE component.
-
removeCalendar
public Calendar removeCalendar(String uid) throws ObjectStoreException, ObjectNotFoundException
- Specified by:
removeCalendarin interfaceCalendarCollection- Parameters:
uid- the UID of the calendar to remove- Returns:
- the calendar that was successfully removed from the collection
- Throws:
ObjectStoreException- where an unexpected error occursObjectNotFoundException
-
merge
public void merge(Calendar calendar) throws FailedOperationException, ObjectStoreException
Merges the specified calendar object with this collecton. This is done by decomposing the calendar object into a set of objects per unique identifier (UID) and adding these objects to the collection.- Specified by:
mergein interfaceCalendarCollection- Parameters:
calendar- a calendar object instance to merge into the collection- Throws:
FailedOperationException- where the merge operation failsObjectStoreException
-
-