|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WebDavStore
Interface for simple implementation of any store for the WebdavServlet
based on the BasicWebdavStore from Oliver Zeigermann, that was part of the Webdav Construction Kit from slide
| Nested Class Summary | |
|---|---|
static class |
WebDavStore.MoveResourceStatus
|
static class |
WebDavStore.PutResourceStatus
Sets / stores the content of the resource specified by resourceUri. |
| Method Summary | |
|---|---|
RequestContext |
begin(HttpServletRequest req,
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)
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 |
BinaryLargeObject |
getResourceContent(RequestContext requestContext,
Resource res)
Gets the content of the resource specified by resourceUri. |
Lock |
lock(RequestContext requestContext,
String path,
String owner,
String scope,
String type,
int depth,
int timeout)
Tries to lock the resource at "path". |
WebDavStore.MoveResourceStatus |
moveResource(RequestContext requestContext,
Resource res,
String sourcePath,
String destinationPath)
Moves the resource from sourcePath to destinationPath |
WebDavStore.PutResourceStatus |
putResource(RequestContext transaction,
String path,
InputStream content,
String contentType)
|
void |
removeResource(RequestContext requestContext,
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. |
void |
setLockTimeout(RequestContext requestContext,
String id,
int timeout)
Set timeout for specified lock. |
boolean |
unlock(RequestContext requestContext,
String id)
Unlocks all resources at "path" (and all subfolders if existing) that have the same owner. |
| Method Detail |
|---|
RequestContext begin(HttpServletRequest req,
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 available
WebdavExceptionvoid commit(RequestContext requestContext)
requestContext - indicates that the method is within the scope of a WebDAV
transaction
WebdavException - if something goes wrong on the store levelvoid rollback(RequestContext requestContext)
requestContext - indicates that the method is within the scope of a WebDAV
transaction
WebdavException - if something goes wrong on the store level
void createCollection(RequestContext requestContext,
String path)
folderUri.
requestContext - indicates that the method is within the scope of a WebDAV
transactionpath - URI of the folder
WebdavException - if something goes wrong on the store level
BinaryLargeObject getResourceContent(RequestContext requestContext,
Resource res)
resourceUri.
requestContext - indicates that the method is within the scope of a WebDAV
transactionso - content of the resource
WebdavException - if something goes wrong on the store level
WebDavStore.PutResourceStatus putResource(RequestContext transaction,
String path,
InputStream content,
String contentType)
Collection<Resource> getChildren(RequestContext requestContext,
Resource res)
folderUri.
requestContext - indicates that the method is within the scope of a WebDAV
transactionpath - URI of the collection
WebdavException - if something goes wrong on the store level
void removeResource(RequestContext requestContext,
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 folder
WebdavException - if something goes wrong on the store level
WebDavStore.MoveResourceStatus 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 - URI
String getMimeType(Resource so)
Lock lock(RequestContext requestContext,
String path,
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 id)
requestContext - id - id to the resource to unlock
void setLockTimeout(RequestContext requestContext,
String id,
int timeout)
requestContext - id - timeout -
List<Lock> getLocksByPath(RequestContext requestContext,
String path)
requestContext - path - Path to requested resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||