Class LocalCardCollection
- java.lang.Object
-
- net.fortuna.ical4j.connector.local.AbstractLocalObjectCollection<net.fortuna.ical4j.vcard.VCard>
-
- net.fortuna.ical4j.connector.local.LocalCardCollection
-
- All Implemented Interfaces:
CardCollection,ObjectCollection<net.fortuna.ical4j.vcard.VCard>
public class LocalCardCollection extends AbstractLocalObjectCollection<net.fortuna.ical4j.vcard.VCard> implements CardCollection
-
-
Constructor Summary
Constructors Constructor Description LocalCardCollection(File root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCard(net.fortuna.ical4j.vcard.VCard card)net.fortuna.ical4j.vcard.VCardgetCard(String uid)net.fortuna.ical4j.vcard.VCard[]getComponents()Returns all objects stored in the collection.net.fortuna.ical4j.vcard.VCardremoveCard(String uid)Remove an existing card from the collection.-
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.ObjectCollection
getDescription, getDisplayName
-
-
-
-
Constructor Detail
-
LocalCardCollection
public LocalCardCollection(File root)
-
-
Method Detail
-
addCard
public void addCard(net.fortuna.ical4j.vcard.VCard card) throws ObjectStoreException, ConstraintViolationException- Specified by:
addCardin interfaceCardCollection- Parameters:
card- a vCard object instance- Throws:
ObjectStoreException- where an unexpected error occursConstraintViolationException- where the specified object is not valid
-
getCard
public net.fortuna.ical4j.vcard.VCard getCard(String uid) throws ObjectNotFoundException
- Throws:
ObjectNotFoundException
-
removeCard
public net.fortuna.ical4j.vcard.VCard removeCard(String uid) throws ObjectNotFoundException, FailedOperationException
Description copied from interface:CardCollectionRemove an existing card from the collection.- Specified by:
removeCardin interfaceCardCollection- Parameters:
uid- the uid of the existing card- Returns:
- the card object that was removed from the collection
- Throws:
ObjectNotFoundExceptionFailedOperationException
-
getComponents
public net.fortuna.ical4j.vcard.VCard[] getComponents() throws ObjectStoreExceptionDescription copied from interface:ObjectCollectionReturns all objects stored in the collection.- Specified by:
getComponentsin interfaceObjectCollection<net.fortuna.ical4j.vcard.VCard>- Returns:
- an array of collection objects
- Throws:
ObjectStoreException- where an unexpected error occurs
-
-