Package net.fortuna.ical4j.connector.dav
Class AbstractDavObjectStore<C extends ObjectCollection<?>>
- java.lang.Object
-
- net.fortuna.ical4j.connector.dav.AbstractDavObjectStore<C>
-
- Type Parameters:
C- the supported collection type Created: [20/11/2008]
- All Implemented Interfaces:
ObjectStore<C>
- Direct Known Subclasses:
CalDavCalendarStore,CardDavStore
public abstract class AbstractDavObjectStore<C extends ObjectCollection<?>> extends Object implements ObjectStore<C>
-
-
Field Summary
Fields Modifier and Type Field Description protected PathResolverpathResolverServer implementation-specific path resolution.
-
Constructor Summary
Constructors Constructor Description AbstractDavObjectStore(URL url, PathResolver pathResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconnect()Connect to a object store anonymously.booleanconnect(String bearerAuth)booleanconnect(String username, char[] password)Connect to a object store using the specified credentials.voiddisconnect()DefaultDavClientgetClient()URLgetHostURL()StringgetPath()protected StringgetUserName()This method is needed to "propfind" the user's principals.booleanisConnected()booleanisSupportCalendarProxy()List<SupportedFeature>supportedFeatures()Returns a list of supported features, based on the DAV header in the response of the connect call.-
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.ObjectStore
addCollection, addCollection, getCollection, getCollections, removeCollection
-
-
-
-
Field Detail
-
pathResolver
protected final PathResolver pathResolver
Server implementation-specific path resolution.
-
-
Constructor Detail
-
AbstractDavObjectStore
public AbstractDavObjectStore(URL url, PathResolver pathResolver)
- Parameters:
url- the URL of a CalDAV server instancepathResolver- the path resolver for the CalDAV server type
-
-
Method Detail
-
getPath
public final String getPath()
- Returns:
- the path
-
connect
public final boolean connect() throws ObjectStoreExceptionConnect to a object store anonymously.- Specified by:
connectin interfaceObjectStore<C extends ObjectCollection<?>>- Returns:
- true if connection is successful, otherwise false
- Throws:
ObjectStoreException- where an unexpected error occurs
-
connect
public final boolean connect(String bearerAuth) throws ObjectStoreException
- Throws:
ObjectStoreException
-
connect
public final boolean connect(String username, char[] password) throws ObjectStoreException
Connect to a object store using the specified credentials.- Specified by:
connectin interfaceObjectStore<C extends ObjectCollection<?>>- Parameters:
username- connection usernamepassword- connection password- Returns:
- true if connection is successful, otherwise false
- Throws:
FailedOperationExceptionIOExceptionObjectStoreException- where an unexpected error occurs
-
disconnect
public final void disconnect()
- Specified by:
disconnectin interfaceObjectStore<C extends ObjectCollection<?>>
-
isConnected
public final boolean isConnected()
- Specified by:
isConnectedin interfaceObjectStore<C extends ObjectCollection<?>>- Returns:
- true if connected to the server, otherwise false
-
getUserName
protected String getUserName()
This method is needed to "propfind" the user's principals.- Returns:
- the username stored in the HTTP credentials
-
getClient
public DefaultDavClient getClient()
-
getHostURL
public URL getHostURL()
-
supportedFeatures
public List<SupportedFeature> supportedFeatures()
Returns a list of supported features, based on the DAV header in the response of the connect call.- Returns:
-
isSupportCalendarProxy
public boolean isSupportCalendarProxy()
-
-