Package com.jalios.jcms.webdav.file
Class FileWebdavFileSystem
- java.lang.Object
-
- com.jalios.jcms.webdav.WebdavFileSystem
-
- 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
Fields Modifier and Type Field Description protected java.lang.String
basePath
static java.lang.String
REVISION
-
Fields inherited from class com.jalios.jcms.webdav.WebdavFileSystem
resourceLocks
-
-
Constructor Summary
Constructors Constructor Description FileWebdavFileSystem(WebdavContext ctxt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doCopy(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
This method perform copy from one Webdav Resource to an Otherboolean
doCreate(WebdavResource resource, boolean overwrite, boolean isFolder, WebdavContext ctxt)
This method perform create from one Webdav Resourceboolean
doDelete(WebdavResource resource, boolean recursive, WebdavContext ctxt)
This method perform delete from one Webdav Resourceboolean
doMove(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
This method perform move from one Webdav Resource to an Otherjava.lang.String
getAbsolutePath(java.lang.String path, WebdavContext ctxt)
Work like getAbsoluteUri() but with FileSystem Pathjava.lang.String
getRelativePath(java.lang.String path, WebdavContext ctxt)
Work like getRelativeUri() but with FileSystem PathWebdavResource
getResource(java.lang.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
-
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
basePath
protected java.lang.String basePath
-
-
Constructor Detail
-
FileWebdavFileSystem
public FileWebdavFileSystem(WebdavContext ctxt)
-
-
Method Detail
-
getAbsolutePath
public java.lang.String getAbsolutePath(java.lang.String path, WebdavContext ctxt)
Work like getAbsoluteUri() but with FileSystem Path- Parameters:
path
- the file pathctxt
- the Webdav Context- Returns:
- The absolute path
- See Also:
WebdavFileSystem.getAbsoluteUri(String, WebdavContext)
-
getRelativePath
public java.lang.String getRelativePath(java.lang.String path, WebdavContext ctxt)
Work like getRelativeUri() but with FileSystem Path- Parameters:
path
- the absolute pathctxt
- the Webdav Context- Returns:
- The relative path
- See Also:
WebdavFileSystem.getRelativeUri(String, WebdavContext)
-
getResource
public WebdavResource getResource(java.lang.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 classWebdavFileSystem
- Parameters:
uri
- the resource URIctxt
- 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 classWebdavFileSystem
- Parameters:
source
- a Webdav Resourcetarget
- a Webdav Resourceoverwrite
- a boolean indicate to overite or not the resourcerecursive
- is it a recursive copyctxt
- 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 classWebdavFileSystem
- Parameters:
source
- a Webdav Resourcetarget
- a Webdav Resourceoverwrite
- a boolean indicate to overite or not the resourcerecursive
- is it a recursive copyctxt
- 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 classWebdavFileSystem
- Parameters:
resource
- the Webdav Resourceoverwrite
- a boolean indicate to ovewrite the resourceisFolder
- 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 classWebdavFileSystem
- Parameters:
resource
- the Webdav Resourcerecursive
- 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 classWebdavFileSystem
- Parameters:
resource
- the Webdav Resourcectxt
- the Webdav Context- Returns:
- a new WebdavLock
- See Also:
WebdavFileSystem.newLock(WebdavResource, WebdavContext)
-
-