public class WebDavStore extends Object implements WebDavStore
WebDavStore.ResourceContent, WebDavStore.Status| Modifier and Type | Field and Description | 
|---|---|
| protected javax.jdo.PersistenceManagerFactory | pmf | 
| Constructor and Description | 
|---|
| WebDavStore(javax.jdo.PersistenceManagerFactory pmf) | 
| 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 res)Gets mime type of stored object. | 
| protected String | getParentPath(String path) | 
| static javax.jdo.PersistenceManager | getPersistenceManager(javax.servlet.http.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} | 
| WebDavStore.ResourceContent | getResourceContent(RequestContext requestContext,
                  Resource res) | 
| Lock | lock(RequestContext requestContext,
    String path,
    String id,
    String owner,
    String scope,
    String type,
    int depth,
    int timeout)Tries to lock the resource at "path". | 
| WebDavStore.Status | moveResource(RequestContext requestContext,
            Resource sourceRes,
            String sourcePath,
            String destinationPath)Moves the resource from sourcePath to destinationPath | 
| WebDavStore.Status | putResource(RequestContext requestContext,
           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. | 
public WebDavStore(javax.jdo.PersistenceManagerFactory pmf)
pmf - public static javax.jdo.PersistenceManager getPersistenceManager(javax.servlet.http.HttpServletRequest req,
                                                 javax.jdo.PersistenceManagerFactory pmf)
req - pmf - public RequestContext begin(javax.servlet.http.HttpServletRequest req, javax.servlet.http.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)
WebDavStorecommit in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
      transactionpublic 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 folderpublic Collection<Resource> getChildren(RequestContext requestContext, Resource res, Date timeRangeStart, Date timeRangeEnd)
WebDavStorefolderUri.getChildren in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
      transactiontimeRangeStart - include children starting fromtimeRangeEnd - include children end atpublic WebDavStore.ResourceContent getResourceContent(RequestContext requestContext, Resource res)
getResourceContent in interface WebDavStorepublic Resource getResourceByPath(RequestContext requestContext, String path)
getResourceByPath in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
      transactionpath - URIpublic WebDavStore.Status removeResource(RequestContext requestContext, String path, Resource res)
WebDavStoreuri.removeResource in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
      transactionpath - URI of the object, i.e. content resource or folderpublic WebDavStore.Status moveResource(RequestContext requestContext, Resource sourceRes, String sourcePath, String destinationPath)
WebDavStoremoveResource in interface WebDavStorepublic void rollback(RequestContext requestContext)
WebDavStorerollback in interface WebDavStorerequestContext - indicates that the method is within the scope of a WebDAV
      transactionpublic String getMimeType(Resource res)
WebDavStoregetMimeType in interface WebDavStorepublic WebDavStore.Status putResource(RequestContext requestContext, String path, InputStream content, String contentType)
putResource in interface WebDavStorepublic List<Lock> getLocksByPath(RequestContext requestContext, String path)
WebDavStoregetLocksByPath in interface WebDavStorepath - Path to requested resourcepublic Lock lock(RequestContext requestContext, String path, String id, String owner, String scope, String type, int depth, int timeout) throws LockFailedException
WebDavStorelock in interface WebDavStorepath - what resource to lockowner - the owner of the lockdepth - depthtimeout - Lock Duration in seconds.LockFailedExceptionpublic boolean unlock(RequestContext requestContext, String path, String id)
WebDavStoreunlock in interface WebDavStoreid - id to the resource to unlockThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.