|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencrx.application.webdav.WebDavStore
public class WebDavStore
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opencrx.application.uses.net.sf.webdav.WebDavStore |
|---|
WebDavStore.MoveResourceStatus, WebDavStore.PutResourceStatus |
| Field Summary | |
|---|---|
protected javax.jdo.PersistenceManagerFactory |
pmf
|
| Constructor Summary | |
|---|---|
WebDavStore(javax.jdo.PersistenceManagerFactory pmf)
|
|
| 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 res)
Gets mime type of stored object. |
protected String |
getParentPath(String path)
|
static javax.jdo.PersistenceManager |
getPersistenceManager(HttpServletRequest req,
javax.jdo.PersistenceManagerFactory pmf)
|
Resource |
getResourceByPath(RequestContext requestContext,
String path)
Path is of the form: {provider.id} "/" {segment.id} "/user/" {user.id} "/profile/" {profile.name} "/" {feed.name} ["/" {folder.name} ]* "/" {document.name} |
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 sourceRes,
String sourcePath,
String destinationPath)
Moves the resource from sourcePath to destinationPath |
WebDavStore.PutResourceStatus |
putResource(RequestContext requestContext,
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.jdo.PersistenceManagerFactory pmf
| Constructor Detail |
|---|
public WebDavStore(javax.jdo.PersistenceManagerFactory pmf)
| Method Detail |
|---|
public static javax.jdo.PersistenceManager getPersistenceManager(HttpServletRequest req,
javax.jdo.PersistenceManagerFactory pmf)
public RequestContext begin(HttpServletRequest req,
HttpServletResponse resp)
WebDavStoreWebDavStore.commit(RequestContext transaction) or
WebDavStore.rollback(RequestContext transaction). If only non-read methods
have been called, the request will be terminated by a
WebDavStore.commit(RequestContext transaction). This method will be
called by (@link WebdavStoreAdapter} at the beginning of each request.
begin in interface WebDavStorepublic void commit(RequestContext requestContext)
WebDavStore
commit in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
transaction
public void createCollection(RequestContext requestContext,
String path)
WebDavStorefolderUri.
createCollection in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
transactionpath - URI of the folder
public Collection<Resource> getChildren(RequestContext requestContext,
Resource res)
WebDavStorefolderUri.
getChildren in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
transaction
public BinaryLargeObject getResourceContent(RequestContext requestContext,
Resource res)
WebDavStoreresourceUri.
getResourceContent in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
transaction
public Resource getResourceByPath(RequestContext requestContext,
String path)
getResourceByPath in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
transactionpath - URI
public void removeResource(RequestContext requestContext,
Resource res)
WebDavStoreuri.
removeResource in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
transaction
public WebDavStore.MoveResourceStatus moveResource(RequestContext requestContext,
Resource sourceRes,
String sourcePath,
String destinationPath)
WebDavStore
moveResource in interface WebDavStorepublic void rollback(RequestContext requestContext)
WebDavStore
rollback in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
transactionpublic String getMimeType(Resource res)
WebDavStore
getMimeType in interface WebDavStoreprotected String getParentPath(String path)
public WebDavStore.PutResourceStatus putResource(RequestContext requestContext,
String path,
InputStream content,
String contentType)
putResource in interface WebDavStore
public List<Lock> getLocksByPath(RequestContext requestContext,
String path)
WebDavStore
getLocksByPath in interface WebDavStorepath - Path to requested resource
public Lock lock(RequestContext requestContext,
String path,
String owner,
String scope,
String type,
int depth,
int timeout)
throws LockFailedException
WebDavStore
lock in interface WebDavStorepath - what resource to lockowner - the owner of the lockdepth - depthtimeout - Lock Duration in seconds.
LockFailedException
public void setLockTimeout(RequestContext requestContext,
String id,
int timeout)
WebDavStore
setLockTimeout in interface WebDavStore
public boolean unlock(RequestContext requestContext,
String id)
WebDavStore
unlock in interface WebDavStoreid - id to the resource to unlock
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||