public abstract class WebdavFileSystem
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
protected java.util.Map<java.lang.String,java.util.Set<WebdavLock>> | 
resourceLocks  | 
static java.lang.String | 
REVISION  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
WebdavFileSystem(WebdavContext ctxt)
Initialise the webdav FileSystem setting baseUri from ContextPath 
 and ServletPath 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
afterDoDelete(WebdavResource resource,
             WebdavContext ctxt)
Must be called by Sub Implementation to resolve
 properties and locks problem. 
 | 
void | 
afterDoMove(WebdavResource source,
           WebdavResource target,
           boolean overwrite,
           boolean recursive,
           WebdavContext ctxt)
Must be called by Sub Implementation to resolve
 properties and locks problem. 
 | 
boolean | 
doCopy(WebdavResource source,
      WebdavResource target,
      boolean overwrite,
      boolean recursive,
      WebdavContext ctxt)
This method perform copy from one Webdav Resource to an Other 
 | 
abstract boolean | 
doCreate(WebdavResource resource,
        boolean overwrite,
        boolean isFolder,
        WebdavContext ctxt)
This method perform create from one Webdav Resource 
 | 
boolean | 
doDelete(WebdavResource resource,
        boolean recursive,
        WebdavContext ctxt)
This method perform delete from one Webdav Resource 
 | 
WebdavLock | 
doLock(WebdavResource resource,
      WebdavContext ctxt)
This method will parse header to identify
 and create lock or locks on the given resource
 If Errors append or Lock only need a refresh then
 return false otherwise return true. 
 | 
boolean | 
doMove(WebdavResource source,
      WebdavResource target,
      boolean overwrite,
      boolean recursive,
      WebdavContext ctxt)
This method perform move from one Webdav Resource to an Other 
 | 
boolean | 
doPut(WebdavResource resource,
     boolean overwrite,
     WebdavContext ctxt)
This method will do a create/overwrite a File or a Folder 
 | 
boolean | 
doUnlock(WebdavResource resource,
        WebdavContext ctxt)
This method will unlock the given resource lock
 defined in the if header. 
 | 
java.lang.String | 
getAbsoluteUri(java.lang.String path,
              WebdavContext ctxt)
This method will convert a relative path to an absolute uri
 ie /my/folder/resource.ext -> http://www.example.com/jcms/webapp/webdav/my/folder/resource.ext 
 | 
java.util.Collection<WebdavLock> | 
getDescendantLocks(WebdavResource resource,
                  WebdavContext ctxt)
This method will return locks of descendant on the given resource 
 | 
java.util.Collection<WebdavLock> | 
getLocks(WebdavResource resource,
        WebdavContext ctxt)
This method will return all locks on the given resource and on all the parent collection. 
 | 
java.lang.String | 
getRelativeUri(java.lang.String uri,
              WebdavContext ctxt)
This method will convert an absolute uri to a relative uri. 
 | 
abstract WebdavResource | 
getResource(java.lang.String uri,
           WebdavContext ctxt)
Lookup the resource represented by the given URI. 
 | 
boolean | 
hasInternalLock(WebdavResource res,
               WebdavContext ctxt)
This method is called for other mecanism outside of Webdav 
 | 
void | 
init()
Called after authentication for each request. 
 | 
boolean | 
isInternallyLocked(WebdavResource res,
                  WebdavContext ctxt)
This method is called for other mecanism outside of Webdav 
 | 
boolean | 
isListing(WebdavContext ctxt)
This method check if the FileSystem allow listing. 
 | 
boolean | 
isReadOnly(WebdavContext ctxt)
Check if the FileSystem is ReadOnly. 
 | 
boolean | 
matchesIfHeaderCondition(WebdavContext ctxt)
Check that the current resource matches the if header condition if any. 
 | 
abstract WebdavLock | 
newLock(WebdavResource resource,
       WebdavContext ctxt)
This method will return a new WebdavLock implementation 
 | 
java.lang.String | 
normalize(java.lang.String path)
Return a context-relative path, beginning with a "/", that represents
 the canonical version of the specified path after ".." and "." elements
 are resolved out. 
 | 
WebdavLock | 
putLock(WebdavLock lock,
       WebdavResource resource,
       WebdavContext ctxt)
This method will put a lock on single given resource 
 | 
WebdavLock | 
putLocks(WebdavLock lock,
        WebdavResource resource,
        WebdavContext ctxt)
This method will put a lock on the given resource and its children 
 | 
WebdavLock | 
refreshLock(WebdavResource resource,
           WebdavContext ctxt)
This method will refresh a lock on the given resource
 and returned the refreshed lock if any or null otherwise. 
 | 
boolean | 
removeLock(WebdavLock lock,
          WebdavResource resource,
          WebdavContext ctxt)
This method will remove tokens on the given resource and its children
 If there is no more tokens then remove the lock. 
 | 
boolean | 
removeLocks(WebdavResource resource,
           WebdavContext ctxt)
This method will remove all lock for a given resource and its children 
 (shared lock will also be removed) 
 | 
protected boolean | 
silentFilterResource(WebdavResource resource,
                    WebdavContext ctxt)
Return true if the resource should be silently ignored. 
 | 
public static final java.lang.String REVISION
protected java.util.Map<java.lang.String,java.util.Set<WebdavLock>> resourceLocks
protected WebdavFileSystem(WebdavContext ctxt)
ctxt - the Webdav Contextpublic void init()
public boolean isReadOnly(WebdavContext ctxt)
ctxt - the Webdav Contextpublic boolean isListing(WebdavContext ctxt)
ctxt - the Webdav Contextpublic java.lang.String getRelativeUri(java.lang.String uri,
                                       WebdavContext ctxt)
Examples :
uri - the absolute urictxt - the Webdav Contextpublic java.lang.String getAbsoluteUri(java.lang.String path,
                                       WebdavContext ctxt)
path - the path to convert to absolutectxt - the Webdav Contextpublic java.lang.String normalize(java.lang.String path)
null instead. If path starts with
 http:// then clean behaviour to let http://path - Path to be normalizedpublic abstract WebdavResource getResource(java.lang.String uri, WebdavContext ctxt)
uri - the resource URIctxt - the Webdav Contextpublic boolean doCopy(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
source - a Webdav Resourcetarget - a Webdav Resourceoverwrite - a boolean indicate to overite or not the resourcerecursive - is it a recursive copyctxt - the Webdav Contextpublic boolean doMove(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
source - a Webdav Resourcetarget - a Webdav Resourceoverwrite - a boolean indicate to overite or not the resourcerecursive - is it a recursive copyctxt - the Webdav Contextpublic void afterDoMove(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
source - the source WebdavResourcetarget - the target WebdavResourceoverwrite - a boolean indicate to overite or not the resourcerecursive - is it a recursive copyctxt - the Webdav Contextpublic abstract boolean doCreate(WebdavResource resource, boolean overwrite, boolean isFolder, WebdavContext ctxt)
resource - the Webdav Resourceoverwrite - a boolean indicate to ovewrite the resourceisFolder - create a File or a Folderctxt - public boolean doDelete(WebdavResource resource, boolean recursive, WebdavContext ctxt)
resource - the Webdav Resourcerecursive - is it a recursive deletectxt - public void afterDoDelete(WebdavResource resource, WebdavContext ctxt)
resource - the Webdav Resourcectxt - the Webdav Contextpublic boolean doPut(WebdavResource resource, boolean overwrite, WebdavContext ctxt) throws javax.servlet.ServletException, java.io.IOException
resource - the WebdavResourceoverwrite - a boolean indicate to overite the resourcectxt - the Webdav Contextjavax.servlet.ServletExceptionjava.io.IOExceptionpublic boolean matchesIfHeaderCondition(WebdavContext ctxt)
ctxt - the current WebdavContextprotected boolean silentFilterResource(WebdavResource resource, WebdavContext ctxt)
resource - the WebdavResourcectxt - the WebdavContextpublic WebdavLock doLock(WebdavResource resource, WebdavContext ctxt)
resource - the WebdavResource to lockctxt - the WebdavContextpublic boolean doUnlock(WebdavResource resource, WebdavContext ctxt)
resource - the WebdavResource to lockctxt - the WebdavContextpublic boolean hasInternalLock(WebdavResource res, WebdavContext ctxt)
res - the WebdavResourcectxt - the Webdav Contextpublic boolean isInternallyLocked(WebdavResource res, WebdavContext ctxt)
res - the WebdavResourcectxt - the Webdav Contextpublic abstract WebdavLock newLock(WebdavResource resource, WebdavContext ctxt)
resource - the Webdav Resourcectxt - the Webdav Contextpublic java.util.Collection<WebdavLock> getLocks(WebdavResource resource, WebdavContext ctxt)
resource - the Webdav Resourcectxt - the Webdav Contextpublic java.util.Collection<WebdavLock> getDescendantLocks(WebdavResource resource, WebdavContext ctxt)
resource - the Webdav Resourcectxt - the Webdav Contextpublic WebdavLock putLock(WebdavLock lock, WebdavResource resource, WebdavContext ctxt)
lock - the WebdavLockresource - the Webdav Resourcectxt - the Webdav Contextpublic WebdavLock putLocks(WebdavLock lock, WebdavResource resource, WebdavContext ctxt)
lock - the WebdavLockresource - the Webdav Resourcectxt - the Webdav Contextpublic boolean removeLock(WebdavLock lock, WebdavResource resource, WebdavContext ctxt)
lock - the WebdavLockresource - the Webdav Resourcectxt - the Webdav Contextpublic boolean removeLocks(WebdavResource resource, WebdavContext ctxt)
resource - the Webdav Resourcectxt - the Webdav Contextpublic WebdavLock refreshLock(WebdavResource resource, WebdavContext ctxt)
resource - the Webdav Resourcectxt - the Webdav ContextCopyright © 2001-2018 Jalios SA. All Rights Reserved.