com.jalios.jcms.webdav.file
Class FileWebdavFileSystem

java.lang.Object
  extended by com.jalios.jcms.webdav.WebdavFileSystem
      extended by com.jalios.jcms.webdav.file.FileWebdavFileSystem

public class FileWebdavFileSystem
extends WebdavFileSystem

A File Representation of a Webdav FileSystem The root directory will be defined by servlet configuration parameter "RootPath"

Since:
jcms-5.5.0
Version:
$Revision: 27753 $
Author:
Jean-Philippe Encausse

Field Summary
protected  String basePath
           
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.webdav.WebdavFileSystem
resourceLocks
 
Constructor Summary
FileWebdavFileSystem(WebdavContext ctxt)
           
 
Method Summary
 boolean doCopy(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
          This method perform copy from one Webdav Resource to an Other
 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
 boolean doMove(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
          This method perform move from one Webdav Resource to an Other
 String getAbsolutePath(String path, WebdavContext ctxt)
          Work like getAbsoluteUri() but with FileSystem Path
 String getRelativePath(String path, WebdavContext ctxt)
          Work like getRelativeUri() but with FileSystem Path
 WebdavResource getResource(String uri, WebdavContext ctxt)
          Lookup the resource represented by the given URI.
 WebdavLock newLock(WebdavResource resource, WebdavContext ctxt)
          This method will return a new WebdavLock implementation
 
Methods inherited from class com.jalios.jcms.webdav.WebdavFileSystem
afterDoDelete, afterDoMove, doLock, doPut, doUnlock, getAbsoluteUri, getDescendantLocks, getLocks, getRelativeUri, hasInternalLock, init, isInternallyLocked, isListing, isReadOnly, matchesIfHeaderCondition, normalize, putLock, putLocks, refreshLock, removeLock, removeLocks, silentFilterResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

basePath

protected String basePath
Constructor Detail

FileWebdavFileSystem

public FileWebdavFileSystem(WebdavContext ctxt)
Method Detail

getAbsolutePath

public String getAbsolutePath(String path,
                              WebdavContext ctxt)
Work like getAbsoluteUri() but with FileSystem Path

Parameters:
path - the file path
ctxt - the Webdav Context
Returns:
The absolute path
See Also:
WebdavFileSystem.getAbsoluteUri(String, WebdavContext)

getRelativePath

public String getRelativePath(String path,
                              WebdavContext ctxt)
Work like getRelativeUri() but with FileSystem Path

Parameters:
path - the absolute path
ctxt - the Webdav Context
Returns:
The relative path
See Also:
WebdavFileSystem.getRelativeUri(String, WebdavContext)

getResource

public WebdavResource getResource(String uri,
                                  WebdavContext ctxt)
Description copied from class: WebdavFileSystem
Lookup the resource represented by the given URI. The resource must be a relative URI to the path folders starting and ending by '/'. ie /my/path/resource.ext -> /my/path/resource.ext
ie /my/path/ -> /my/path/

Specified by:
getResource in class WebdavFileSystem
Parameters:
uri - the resource URI
ctxt - the Webdav Context
Returns:
WebdavResource the resource representing the given URI
See Also:
WebdavFileSystem.getResource(String, WebdavContext)

doCopy

public boolean doCopy(WebdavResource source,
                      WebdavResource target,
                      boolean overwrite,
                      boolean recursive,
                      WebdavContext ctxt)
Description copied from class: WebdavFileSystem
This method perform copy from one Webdav Resource to an Other

Overrides:
doCopy in class WebdavFileSystem
Parameters:
source - a Webdav Resource
target - a Webdav Resource
overwrite - a boolean indicate to overite or not the resource
recursive - is it a recursive copy
ctxt - the Webdav Context
Returns:
boolean true if the copy has been done otherwise false
See Also:
WebdavFileSystem.doCopy(WebdavResource, WebdavResource, boolean, boolean, WebdavContext)

doMove

public boolean doMove(WebdavResource source,
                      WebdavResource target,
                      boolean overwrite,
                      boolean recursive,
                      WebdavContext ctxt)
Description copied from class: WebdavFileSystem
This method perform move from one Webdav Resource to an Other

Overrides:
doMove in class WebdavFileSystem
Parameters:
source - a Webdav Resource
target - a Webdav Resource
overwrite - a boolean indicate to overite or not the resource
recursive - is it a recursive copy
ctxt - the Webdav Context
Returns:
boolean true if the move has been done otherwise false
See Also:
WebdavFileSystem.doMove(WebdavResource, WebdavResource, boolean, boolean, WebdavContext)

doCreate

public boolean doCreate(WebdavResource resource,
                        boolean overwrite,
                        boolean isFolder,
                        WebdavContext ctxt)
Description copied from class: WebdavFileSystem
This method perform create from one Webdav Resource

Specified by:
doCreate in class WebdavFileSystem
Parameters:
resource - the Webdav Resource
overwrite - a boolean indicate to ovewrite the resource
isFolder - create a File or a Folder
Returns:
boolean true if the create has been done otherwise false
See Also:
WebdavFileSystem.doCreate(WebdavResource, boolean, boolean, WebdavContext)

doDelete

public boolean doDelete(WebdavResource resource,
                        boolean recursive,
                        WebdavContext ctxt)
Description copied from class: WebdavFileSystem
This method perform delete from one Webdav Resource

Overrides:
doDelete in class WebdavFileSystem
Parameters:
resource - the Webdav Resource
recursive - is it a recursive delete
Returns:
boolean true if the delete has been done otherwise false
See Also:
WebdavFileSystem.doDelete(WebdavResource, boolean, WebdavContext)

newLock

public WebdavLock newLock(WebdavResource resource,
                          WebdavContext ctxt)
Description copied from class: WebdavFileSystem
This method will return a new WebdavLock implementation

Specified by:
newLock in class WebdavFileSystem
Parameters:
resource - the Webdav Resource
ctxt - the Webdav Context
Returns:
a new WebdavLock
See Also:
WebdavFileSystem.newLock(WebdavResource, WebdavContext)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.