Class LocalCalendarCollection
- java.lang.Object
-
- net.fortuna.ical4j.connector.local.AbstractLocalObjectCollection<Calendar>
-
- net.fortuna.ical4j.connector.local.LocalCalendarCollection
-
- All Implemented Interfaces:
CalendarCollection,ObjectCollection<Calendar>
public class LocalCalendarCollection extends AbstractLocalObjectCollection<Calendar> implements CalendarCollection
-
-
Constructor Summary
Constructors Constructor Description LocalCalendarCollection(File root)
-
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()MediaType[]getSupportedMediaTypes()voidmerge(Calendar calendar)Merges the specified calendar object with this collecton.CalendarremoveCalendar(String uid)-
Methods inherited from class net.fortuna.ical4j.connector.local.AbstractLocalObjectCollection
getDescription, getDisplayName, getRoot, getSupportedComponentTypes, getTimeZone, setDescription, setDisplayName, setSupportedComponents, setTimeZone
-
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.CalendarCollection
getSupportedComponentTypes, getTimeZone
-
Methods inherited from interface net.fortuna.ical4j.connector.ObjectCollection
getDescription, getDisplayName
-
-
-
-
Constructor Detail
-
LocalCalendarCollection
public LocalCalendarCollection(File root)
-
-
Method Detail
-
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).
-
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.
-
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.
-
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.
-
addCalendar
public void addCalendar(Calendar calendar) throws ObjectStoreException, ConstraintViolationException
Description copied from interface:CalendarCollectionStores 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)
-
getCalendar
public Calendar getCalendar(String uid) throws ObjectNotFoundException
Description copied from interface:CalendarCollectionReturns 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
-
removeCalendar
public Calendar removeCalendar(String uid) throws FailedOperationException, 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:
FailedOperationExceptionObjectNotFoundException
-
merge
public void merge(Calendar calendar) throws FailedOperationException, ObjectStoreException
Description copied from interface:CalendarCollectionMerges 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
-
export
public Calendar export() throws ObjectStoreException
Description copied from interface:CalendarCollectionExports 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
-
getComponents
public Calendar[] getComponents() throws ObjectStoreException
Description copied from interface:ObjectCollectionReturns all objects stored in the collection.- Specified by:
getComponentsin interfaceObjectCollection<Calendar>- Returns:
- an array of collection objects
- Throws:
ObjectStoreException- where an unexpected error occurs
-
-