|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.webdav.WebdavFileSystem
public abstract class WebdavFileSystem
This class is an Abstract representation of a WebdavFileSystem. It's purpose is to handle all specific webdav concept and control before delegating to a a sub repository implementation doing more control and real commande.
Field Summary | |
---|---|
protected String |
baseUri
|
protected Map |
resourceLocks
|
static String |
REVISION
|
Constructor Summary | |
---|---|
protected |
WebdavFileSystem(WebdavContext ctxt)
Initialise the webdav FileSystem setting baseUri from ContextPath and ServletPath |
Method Summary | |
---|---|
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. |
String |
getAbsoluteUri(String uri,
WebdavContext ctxt)
This method will convert a relative uri to an absolute uri ie /my/folder/resource.ext -> /webapp/webdav/my/folder/resource.ext |
Collection |
getDescendantLocks(WebdavResource resource,
WebdavContext ctxt)
This method will return locks of descendant on the given resource |
WebdavLock |
getLock(WebdavResource resource,
WebdavContext ctxt)
This method will return lock on the given resource |
Collection |
getLocks(WebdavResource resource,
WebdavContext ctxt)
This method will return locks on the given resource and all it' s children |
String |
getRelativeUri(String uri,
WebdavContext ctxt)
This method will convert an absolute uri to a relative uri ie /webapp/webdav/my/folder/resource.ext -> /my/folder/resource.ext |
abstract WebdavResource |
getResource(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. |
abstract WebdavLock |
newLock(WebdavResource resource,
WebdavContext ctxt)
This method will return a new WebdavLock implementation |
String |
normalize(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 |
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 resouece should be silently ignored. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected String baseUri
protected Map resourceLocks
Constructor Detail |
---|
protected WebdavFileSystem(WebdavContext ctxt)
ctxt
- the Webdav ContextMethod Detail |
---|
public void init()
public boolean isReadOnly(WebdavContext ctxt)
ctxt
- the Webdav Context
public boolean isListing(WebdavContext ctxt)
ctxt
- the Webdav Context
public String getRelativeUri(String uri, WebdavContext ctxt)
uri
- the absolute urictxt
- the Webdav Context
public String getAbsoluteUri(String uri, WebdavContext ctxt)
uri
- the absolute urictxt
- the Webdav Context
public String normalize(String path)
null
instead. If path starts with
http:// then clean behaviour to let http://
path
- Path to be normalized
public abstract WebdavResource getResource(String uri, WebdavContext ctxt)
uri
- the resource URIctxt
- the Webdav Context
public 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 Context
public 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 Context
public 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 overite 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, IOException
resource
- the WebdavResourceoverwrite
- a boolean indicate to overite the resourcectxt
- the Webdav Context
javax.servlet.ServletException
IOException
protected boolean silentFilterResource(WebdavResource resource, WebdavContext ctxt)
resource
- the WebdavResourcectxt
- the WebdavContext
public WebdavLock doLock(WebdavResource resource, WebdavContext ctxt)
resource
- the WebdavResource to lockctxt
- the WebdavContext
public boolean doUnlock(WebdavResource resource, WebdavContext ctxt)
resource
- the WebdavResource to lockctxt
- the WebdavContext
public 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 Context
public WebdavLock getLock(WebdavResource resource, WebdavContext ctxt)
resource
- the Webdav Resourcectxt
- the Webdav Context
public Collection getLocks(WebdavResource resource, WebdavContext ctxt)
resource
- the Webdav Resourcectxt
- the Webdav Context
public Collection getDescendantLocks(WebdavResource resource, WebdavContext ctxt)
resource
- the Webdav Resourcectxt
- the Webdav Context
public WebdavLock putLock(WebdavLock lock, WebdavResource resource, WebdavContext ctxt)
lock
- the WebdavLockresource
- the Webdav Resourcectxt
- the Webdav Context
public WebdavLock putLocks(WebdavLock lock, WebdavResource resource, WebdavContext ctxt)
lock
- the WebdavLockresource
- the Webdav Resourcectxt
- the Webdav Context
public boolean removeLock(WebdavLock lock, WebdavResource resource, WebdavContext ctxt)
lock
- the WebdavLockresource
- the Webdav Resourcectxt
- the Webdav Context
public boolean removeLocks(WebdavResource resource, WebdavContext ctxt)
resource
- the Webdav Resourcectxt
- the Webdav Context
public WebdavLock refreshLock(WebdavResource resource, WebdavContext ctxt)
resource
- the Webdav Resourcectxt
- the Webdav Context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |