public interface WebDavStore
based on the BasicWebdavStore from Oliver Zeigermann, that was part of the Webdav Construction Kit from slide
Modifier and Type | Interface and Description |
---|---|
static interface |
WebDavStore.ResourceContent
Gets the content of the resource specified by
resourceUri . |
static class |
WebDavStore.Status
Sets / stores the content of the resource specified by
resourceUri . |
Modifier and Type | Method and Description |
---|---|
RequestContext |
begin(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Indicates that a new request or transaction with this store involved has
been started.
|
void |
commit(RequestContext requestContext)
Indicates that all changes done inside this request shall be made
permanent and any transactions, connections and other temporary resources
shall be terminated.
|
void |
createCollection(RequestContext requestContext,
String path)
Creates a folder at the position specified by
folderUri . |
Collection<Resource> |
getChildren(RequestContext requestContext,
Resource res,
Date timeRangeStart,
Date timeRangeEnd)
Gets the names of the children of the folder specified by
folderUri . |
List<Lock> |
getLocksByPath(RequestContext requestContext,
String path)
Gets the LockedObject on specified path.
|
String |
getMimeType(Resource so)
Gets mime type of stored object.
|
Resource |
getResourceByPath(RequestContext requestContext,
String path)
Gets the storedObject specified by
uri |
WebDavStore.ResourceContent |
getResourceContent(RequestContext requestContext,
Resource res) |
Lock |
lock(RequestContext requestContext,
String path,
String token,
String owner,
String scope,
String type,
int depth,
int timeout)
Tries to lock the resource at "path".
|
WebDavStore.Status |
moveResource(RequestContext requestContext,
Resource res,
String sourcePath,
String destinationPath)
Moves the resource from sourcePath to destinationPath
|
WebDavStore.Status |
putResource(RequestContext transaction,
String path,
InputStream content,
String contentType) |
WebDavStore.Status |
removeResource(RequestContext requestContext,
String path,
Resource res)
Removes the object specified by
uri . |
void |
rollback(RequestContext requestContext)
Indicates that all changes done inside this request shall be undone and
any transactions, connections and other temporary resources shall be
terminated.
|
boolean |
unlock(RequestContext requestContext,
String path,
String id)
Unlocks all resources at "path" (and all subfolders if existing) that
have the same owner.
|
RequestContext begin(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
commit(RequestContext transaction)
or
rollback(RequestContext transaction)
. If only non-read methods
have been called, the request will be terminated by a
commit(RequestContext transaction)
. This method will be
called by (@link WebdavStoreAdapter} at the beginning of each request.principal
- the principal that started this request or null
if
there is non availableWebdavException
void commit(RequestContext requestContext)
requestContext
- indicates that the method is within the scope of a WebDAV
transactionWebdavException
- if something goes wrong on the store levelvoid rollback(RequestContext requestContext)
requestContext
- indicates that the method is within the scope of a WebDAV
transactionWebdavException
- if something goes wrong on the store levelvoid createCollection(RequestContext requestContext, String path)
folderUri
.requestContext
- indicates that the method is within the scope of a WebDAV
transactionpath
- URI of the folderWebdavException
- if something goes wrong on the store levelWebDavStore.ResourceContent getResourceContent(RequestContext requestContext, Resource res)
WebDavStore.Status putResource(RequestContext transaction, String path, InputStream content, String contentType)
Collection<Resource> getChildren(RequestContext requestContext, Resource res, Date timeRangeStart, Date timeRangeEnd)
folderUri
.requestContext
- indicates that the method is within the scope of a WebDAV
transactionpath
- URI of the collectiontimeRangeStart
- include children starting fromtimeRangeEnd
- include children end atWebdavException
- if something goes wrong on the store levelWebDavStore.Status removeResource(RequestContext requestContext, String path, Resource res)
uri
.requestContext
- indicates that the method is within the scope of a WebDAV
transactionpath
- URI of the object, i.e. content resource or folderWebdavException
- if something goes wrong on the store levelWebDavStore.Status moveResource(RequestContext requestContext, Resource res, String sourcePath, String destinationPath)
requestContext
- res
- sourcePath
- destinationPath
- Resource getResourceByPath(RequestContext requestContext, String path)
uri
requestContext
- indicates that the method is within the scope of a WebDAV
transactionpath
- URILock lock(RequestContext requestContext, String path, String token, String owner, String scope, String type, int depth, int timeout) throws LockFailedException
requestContext
- path
- what resource to lockowner
- the owner of the lockexclusive
- if the lock should be exclusive (or shared)depth
- depthtimeout
- Lock Duration in seconds.LockFailedException
boolean unlock(RequestContext requestContext, String path, String id)
requestContext
- id
- id to the resource to unlockList<Lock> getLocksByPath(RequestContext requestContext, String path)
requestContext
- path
- Path to requested resourceThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.