Package net.fortuna.ical4j.connector.dav
Class AbstractDavObjectCollection<T>
- java.lang.Object
-
- net.fortuna.ical4j.connector.dav.AbstractDavObjectCollection<T>
-
- Type Parameters:
T
- the supported collection object type Created: [20/11/2008]
- All Implemented Interfaces:
ObjectCollection<T>
- Direct Known Subclasses:
CalDavCalendarCollection
,CardDavCollection
public abstract class AbstractDavObjectCollection<T> extends Object implements ObjectCollection<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.jackrabbit.webdav.property.DavPropertySet
properties
-
Constructor Summary
Constructors Constructor Description AbstractDavObjectCollection(AbstractDavObjectStore<?> store, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
boolean
exists()
String
getId()
String
getOwnerHref()
Href (link) to the owner of this collectionString
getOwnerName()
Name of the owner of this collection.String
getPath()
<P> P
getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName propertyName, Class<P> type)
Long
getQuotaAvailableBytes()
Indicates the maximum amount of additional storage available to be allocated to a resource.Long
getQuotaUsedBytes()
Contains the amount of storage counted against the quota on a resource.ResourceType[]
getResourceTypes()
Returns a list of the kinds of resource type for this collection.AbstractDavObjectStore<?>
getStore()
MediaType[]
getSupportedMediaTypes()
Returns a list of supported media types.boolean
isReadOnly()
void
setReadOnly(boolean isReadOnly)
-
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
getComponents, getDescription, getDisplayName
-
-
-
-
Constructor Detail
-
AbstractDavObjectCollection
public AbstractDavObjectCollection(AbstractDavObjectStore<?> store, String id)
- Parameters:
store
- the container store for the collectionid
- collection identifier
-
-
Method Detail
-
getStore
public final AbstractDavObjectStore<?> getStore()
- Returns:
- the store
-
getId
public final String getId()
- Returns:
- the id
-
getPath
public final String getPath()
- Returns:
- the absolute collection path
-
getResourceTypes
public ResourceType[] getResourceTypes()
Returns a list of the kinds of resource type for this collection. For example, for a collection that supports iCalendar object, "calendar" will be one of the resource types.
-
getSupportedMediaTypes
public MediaType[] getSupportedMediaTypes()
Returns a list of supported media types. For example, a CalDAV server will probably return 2.0 as the supported version and text/calendar as the content-type.
-
getQuotaAvailableBytes
public Long getQuotaAvailableBytes()
Indicates the maximum amount of additional storage available to be allocated to a resource.
-
getQuotaUsedBytes
public Long getQuotaUsedBytes()
Contains the amount of storage counted against the quota on a resource.
-
getOwnerHref
public String getOwnerHref()
Href (link) to the owner of this collection
-
getOwnerName
public String getOwnerName()
Name of the owner of this collection. Will be retrieved by the owner href
-
isReadOnly
public boolean isReadOnly()
-
setReadOnly
public void setReadOnly(boolean isReadOnly)
-
getProperty
public final <P> P getProperty(org.apache.jackrabbit.webdav.property.DavPropertyName propertyName, Class<P> type) throws IOException, ObjectStoreException, org.apache.jackrabbit.webdav.DavException
- Type Parameters:
P
- the property type- Parameters:
propertyName
- a property nametype
- the class for the property type returned (HACK!!)- Returns:
- the value for the specified property name
- Throws:
IOException
- if there is a communication errorObjectStoreException
- where an unexpected error occursorg.apache.jackrabbit.webdav.DavException
- where an error occurs calling the DAV method
-
delete
public final void delete() throws org.apache.http.client.HttpResponseException, IOException, ObjectStoreException
- Throws:
org.apache.http.client.HttpResponseException
- where an error occurs calling the HTTP methodIOException
- if there is a communication errorObjectStoreException
- where an unexpected error occurs
-
exists
public final boolean exists() throws org.apache.http.client.HttpResponseException, IOException, ObjectStoreException
- Returns:
- true if the collection exists, otherwise false
- Throws:
org.apache.http.client.HttpResponseException
- where an error occurs calling the HTTP methodIOException
- if there is a communication errorObjectStoreException
- where an unexpected error occurs
-
-