net.fortuna.ical4j.connector.dav
public final class CardDavStore extends AbstractDavObjectStore<CardDavCollection> implements CardStore<CardDavCollection>
pathResolver
Constructor and Description |
---|
CardDavStore(String prodId,
URL url,
PathResolver pathResolver) |
Modifier and Type | Method and Description |
---|---|
CardDavCollection |
addCollection(String id)
Adds the specified collection to the store.
|
CardDavCollection |
addCollection(String id,
org.apache.jackrabbit.webdav.property.DavPropertySet properties) |
CardDavCollection |
addCollection(String id,
String displayName,
String description,
String[] supportedComponents,
net.fortuna.ical4j.model.Calendar timezone) |
protected String |
findAddressBookHomeSet() |
protected String |
findAddressBookHomeSet(String propfindUri)
This method try to find the calendar-home-set attribute in the user's DAV principals.
|
CardDavCollection |
getCollection(String id) |
List<CardDavCollection> |
getCollections()
This method will try to find all calendar collections available at the calendar-home-set URI of the user.
|
protected List<CardDavCollection> |
getCollectionsForHomeSet(CardDavStore store,
String urlForcalendarHomeSet) |
protected List<CardDavCollection> |
getDelegateCollections(org.apache.jackrabbit.webdav.property.DavProperty<?> proxyDavProperty) |
List<CardDavCollection> |
getDelegatedCollections()
Get the list of available delegated collections, Apple's iCal style
|
String |
getDisplayName() |
CalendarCollection |
merge(String id,
CalendarCollection calendar) |
CardDavCollection |
removeCollection(String id)
Removes the collection with specified id from the store.
|
void |
setDisplayName(String displayName) |
connect, connect, disconnect, getClient, getHostURL, getPath, getUserName, isConnected, isSupportCalendarProxy, supportedFeatures
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, connect, disconnect, isConnected
public CardDavStore(String prodId, URL url, PathResolver pathResolver)
prodId
- application product identifierurl
- the URL of a CardDav server instancepathResolver
- the path resolver for the CardDav server typepublic CardDavCollection addCollection(String id) throws ObjectStoreException
addCollection
in interface ObjectStore<CardDavCollection>
id
- a collection identifierObjectStoreException
- if a calendar with the specified id already
exists in the storepublic CardDavCollection addCollection(String id, org.apache.jackrabbit.webdav.property.DavPropertySet properties) throws ObjectStoreException
ObjectStoreException
public CardDavCollection getCollection(String id) throws ObjectStoreException, ObjectNotFoundException
getCollection
in interface ObjectStore<CardDavCollection>
id
- a collection identifierObjectNotFoundException
is thrown.ObjectStoreException
- where an unexpected error occursObjectNotFoundException
- if a collection with the specified identifier doesn't existpublic CalendarCollection merge(String id, CalendarCollection calendar)
protected String findAddressBookHomeSet() throws ParserConfigurationException, IOException, org.apache.jackrabbit.webdav.DavException
ParserConfigurationException
IOException
org.apache.jackrabbit.webdav.DavException
protected String findAddressBookHomeSet(String propfindUri) throws ParserConfigurationException, IOException, org.apache.jackrabbit.webdav.DavException
ParserConfigurationException
IOException
org.apache.jackrabbit.webdav.DavException
public List<CardDavCollection> getCollections() throws ObjectStoreException, ObjectNotFoundException
getCollections
in interface ObjectStore<CardDavCollection>
ParserConfigurationException
- where the parse is not configured correctlyIOException
- where a communications error occursorg.apache.jackrabbit.webdav.DavException
- where an error occurs calling the DAV methodObjectStoreException
ObjectNotFoundException
protected List<CardDavCollection> getCollectionsForHomeSet(CardDavStore store, String urlForcalendarHomeSet) throws IOException, org.apache.jackrabbit.webdav.DavException
IOException
org.apache.jackrabbit.webdav.DavException
protected List<CardDavCollection> getDelegateCollections(org.apache.jackrabbit.webdav.property.DavProperty<?> proxyDavProperty) throws ParserConfigurationException, IOException, org.apache.jackrabbit.webdav.DavException
ParserConfigurationException
IOException
org.apache.jackrabbit.webdav.DavException
public List<CardDavCollection> getDelegatedCollections() throws Exception
Exception
public CardDavCollection removeCollection(String id) throws ObjectStoreException, ObjectNotFoundException
removeCollection
in interface ObjectStore<CardDavCollection>
id
- a collection identifierObjectStoreException
- where an unexpected error occursObjectNotFoundException
- if a collection with the specified identifier doesn't existpublic String getDisplayName()
public void setDisplayName(String displayName)
public CardDavCollection addCollection(String id, String displayName, String description, String[] supportedComponents, net.fortuna.ical4j.model.Calendar timezone) throws ObjectStoreException
addCollection
in interface ObjectStore<CardDavCollection>
id
- a collection identifierdisplayName
- the collection namedescription
- the collection descriptionsupportedComponents
- supported collection objectstimezone
- collection timezoneObjectStoreException
- where an unexpected error occursCopyright © 2008-2013 Micronode. All Rights Reserved.