|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DAVStore
This interface has to be implemented when writing a data-store to be used in
conjunction with the DAVServlet.
| Method Summary | |
|---|---|
boolean |
addDeadProperty(java.net.URI uri, User user, DeadProperty prop)
sets a dead property for the object identified by the given URI. |
boolean |
canRead(java.net.URI resourceURI, User user)
checks whether the given user has read access to the specified URI. |
boolean |
canWrite(java.net.URI resourceURI, User user)
checks whether the given user has write access to the specified URI. |
void |
copy(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse res)
performs a recursive copy command. |
boolean |
createResourceCollection(java.net.URI uri, User user)
creates a new resource collection at the given URI. |
java.net.URI |
enforceTailingSlash(java.net.URI uri)
enforces a tailing slash (needed for collection URIs). |
java.lang.String |
getCharacterEncoding(java.net.URI resourceURI, User user)
returns the character encoding of the resource URI. |
java.util.Collection<java.net.URI> |
getChildren(java.net.URI uri, User user)
returns the children of the collection identified by the given URI. |
java.io.InputStream |
getContent(java.net.URI uri, User user)
returns an input stream for the resource identified by the given URI. |
long |
getContentLength(java.net.URI uri, User user)
returns the content-length of the resource identified by the given URI. |
java.lang.String |
getContentType(java.net.URI resourceURI, User user)
returns the content-type associated with the URI. |
long |
getCreationDate(java.net.URI uri, User user)
returns the creation date of the object identified by the given URI. |
org.jdom.Content |
getDAVProperty(java.net.URI uri, User user, DAVProperties prop)
returns the requested DAV property the object identified by the given URI. |
java.util.Collection<? extends DeadProperty> |
getDeadProperties()
returns all known dead properties. |
java.util.Collection<DeadProperty> |
getDeadProperties(java.net.URI uri)
returns all known dead properties for the given URI. |
DeadProperty |
getDeadProperty(java.net.URI uri, User user, DeadProperty prop)
returns the requested dead property for the object identified by the given URI. |
java.lang.String |
getETag(java.net.URI uri)
returns the ETag of the object identified by the given URI. |
long |
getLastModified(java.net.URI uri, User user)
returns the last modification date of the object identified by the given URI. |
java.net.URI |
getParentURI(java.net.URI resourceURI)
returns the URI of the parent or the URI itself, if it denotes the root. |
boolean |
isCollection(java.net.URI uri)
returns whether the given URI specifies a collection. |
boolean |
isResource(java.net.URI uri)
returns whether the given URI specifies a resource. |
void |
move(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse res)
performs a recursive move command. |
boolean |
objectExists(java.net.URI uri)
returns whether the given URI exists. |
void |
removeObject(java.net.URI uri, User user)
deletes a single object. |
void |
setContent(java.net.URI uri, User user,
java.io.InputStream content,
java.lang.String contentType,
java.lang.String characterEncoding, HttpDAVServletResponse res)
sets the content of a resource and optionally creates it, if it does not exist yet. |
java.net.URI |
translateDavURI(java.lang.String uri)
translates a DAV URI. |
java.net.URI |
translateStoreURI(java.net.URI uri)
translates a store URI. |
| Method Detail |
|---|
java.net.URI enforceTailingSlash(java.net.URI uri)
uri - the URI
java.net.URI translateDavURI(java.lang.String uri)
uri - the DAV URI
java.net.URI translateStoreURI(java.net.URI uri)
uri - the store URI
boolean canRead(java.net.URI resourceURI, User user)
resourceURI - the URIuser - the user
true, if the user has read access. Otherwise
false.boolean canWrite(java.net.URI resourceURI, User user)
If the given URI does not exist yet, the store checks whether the user has write access to the parent collection.
resourceURI - the URIuser - the user
true, if the user has write access. Otherwise
false.boolean createResourceCollection(java.net.URI uri, User user)
uri - the URIuser - the user
true, if the collection has been successfully
createdjava.util.Collection<java.net.URI> getChildren(java.net.URI uri, User user)
uri - the URIuser - the user
java.io.InputStream getContent(java.net.URI uri, User user)
throws java.io.IOException
uri - the URIuser - the user
java.io.IOException - on errors accessing the objectlong getContentLength(java.net.URI uri, User user)
uri - the URIuser - the user
long getCreationDate(java.net.URI uri, User user)
uri - the URIuser - the user
long getLastModified(java.net.URI uri, User user)
throws java.io.IOException
uri - the URIuser - the user
java.io.IOException - on errorsjava.lang.String getETag(java.net.URI uri)
uri - the URI
boolean addDeadProperty(java.net.URI uri, User user, DeadProperty prop)
throws java.io.IOException
uri - the URIuser - the userprop - the property to set
true, if and only if the property has been set.
Otherwise false.
java.io.IOException - on errors accessing the object
org.jdom.Content getDAVProperty(java.net.URI uri, User user, DAVProperties prop)
throws java.io.IOException
uri - the URIuser - the userprop - the requested property
java.io.IOException - on errors accessing the object
DeadProperty getDeadProperty(java.net.URI uri, User user, DeadProperty prop)
throws java.io.IOException
uri - the URIuser - the userprop - the prototype of the requested property
null, if no such
property exists
java.io.IOException - on errors accessing the objectjava.util.Collection<DeadProperty> getDeadProperties(java.net.URI uri)
uri - the URI
java.util.Collection<? extends DeadProperty> getDeadProperties()
boolean isCollection(java.net.URI uri)
uri - the URI
true, if the resource exists. Otherwise
false.boolean isResource(java.net.URI uri)
uri - the URI
true, if the URI exists. Otherwise
false.boolean objectExists(java.net.URI uri)
uri - the URI
true, if the URI exists. Otherwise
false.
void setContent(java.net.URI uri, User user,
java.io.InputStream content,
java.lang.String contentType,
java.lang.String characterEncoding, HttpDAVServletResponse res)
throws java.io.IOException
uri - the URIuser - the usercontent - the input streamcontentType - the content type specified by the clientcharacterEncoding - the character encoding specified by the clientres - for early sending of DAVStatus.CREATED (may be
null)
java.io.IOException - on errorsjava.lang.String getContentType(java.net.URI resourceURI, User user)
resourceURI - the URIuser - the user
java.lang.String getCharacterEncoding(java.net.URI resourceURI, User user)
resourceURI - the URIuser - the user
null, if no encoding is
known
void move(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse res)
throws java.io.IOException
sourceURI - the source URIdestinationURI - the destination URIuser - the userres - the multi-status response
java.io.IOException - on errors
void copy(java.net.URI sourceURI,
java.net.URI destinationURI, User user, MultiStatusResponse res)
throws java.io.IOException
sourceURI - the source URIdestinationURI - the destination URIuser - the userres - the multi-status response
java.io.IOException - on errors
void removeObject(java.net.URI uri, User user)
throws java.io.IOException
uri - the URIuser - the user
java.io.IOException - on errors removing the objectjava.net.URI getParentURI(java.net.URI resourceURI)
resourceURI - the URI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||