public class CatWebdavFileSystem extends WebdavFileSystem
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
protected Data |
root |
protected static org.apache.oro.text.regex.Pattern |
silentFilterPattern |
resourceLocks
Constructor and Description |
---|
CatWebdavFileSystem(WebdavContext ctxt) |
Modifier and Type | Method and Description |
---|---|
void |
addFileDocument(java.util.Set<Data> childrenSet,
Member loggedMember,
Workspace workspace,
Category category) |
boolean |
canBeReadBy(Data data,
Member loggedMember) |
boolean |
canReadData(Data data,
boolean recursive,
WebdavContext ctxt)
Check if the data can be read given the current context
|
protected boolean |
checkSetNewWorkspace(Workspace oldWS,
Workspace newWS,
java.util.Set<Category> pubCatSet) |
boolean |
copyFolder(WebdavResource src,
WebdavResource tgt,
boolean overwrite,
boolean recursive,
WebdavContext ctxt) |
boolean |
copyMoveFile(WebdavResource src,
WebdavResource tgt,
boolean move,
WebdavContext ctxt)
This method Copy/Move a resource to a given target location
|
boolean |
createFile(WebdavResource res,
WebdavContext ctxt)
Create a resource child of a given folder with the given name
If child already exists in JCMS then recaterize it
|
boolean |
createFolder(WebdavResource res,
WebdavContext ctxt)
Create a given target folder
|
boolean |
deleteFile(WebdavResource res,
WebdavContext ctxt)
Delete a given target file
|
boolean |
deleteFolder(WebdavResource res,
WebdavContext ctxt)
Delete a given target folder
|
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
|
long |
getContentLength(Data data,
WebdavContext ctxt)
This method return the length of the ressource
|
java.lang.String |
getContentType(Data data,
WebdavContext ctxt)
This method return the content type of the ressource
|
java.util.Collection<Data> |
getDataChildrenSet(Data parent,
WebdavContext ctxt) |
Data |
getDataFromName(java.lang.String name,
Data parent,
boolean onlyFolders,
WebdavContext ctxt)
Return the Data represented by the given short uri
|
Data |
getDataFromUri(java.lang.String uri,
WebdavContext ctxt)
Retrieve the Data from the given URI
Starting from the given root.
|
java.lang.String |
getNameFromData(Data data,
WebdavContext ctxt)
This method return the short name of the given data
(Category or FileDocument) for this implementation
|
WebdavResource |
getResource(java.lang.String uri,
WebdavContext ctxt)
Lookup the resource represented by the given URI.
|
java.io.InputStream |
getResourceStream(Data data,
WebdavContext ctxt)
This method return the resource input stream
|
Workspace |
getWorkspaceFromURI(java.lang.String uri,
WebdavContext ctxt)
This method return the Workspace
bind to the given URI.
|
void |
init()
Called after authentication for each request.
|
boolean |
isExisting(Data data,
WebdavContext ctxt)
This method return true if the Data is existing
|
boolean |
isFile(Data data,
WebdavContext ctxt)
This method return true if the Data is a File
|
boolean |
isFolder(Data data,
WebdavContext ctxt)
This method return true if the Data is a Folder
|
boolean |
isReadable(WebdavResource res,
boolean recursive,
WebdavContext ctxt)
Check if the resource is Readable
|
boolean |
isReadOnly(WebdavContext ctxt)
Check if the FileSystem is ReadOnly.
|
boolean |
isWritable(WebdavResource res,
boolean recursive,
boolean overwrite,
WebdavContext ctxt)
Check if the resource is Writable
|
boolean |
moveFolder(WebdavResource src,
WebdavResource tgt,
boolean overwrite,
boolean recursive,
WebdavContext ctxt)
This method will move a given source to target location
If target folder already exists then:
- Copy all children of the target under source
- Then copy all children of source under target
- Then remove source
|
WebdavLock |
newLock(WebdavResource resource,
WebdavContext ctxt)
This method will return a new WebdavLock implementation
|
boolean |
renameFile(WebdavResource src,
WebdavResource tgt,
WebdavContext ctxt)
Rename the given WebdavResource file to the given
target resource
|
boolean |
renameFolder(WebdavResource src,
WebdavResource tgt,
WebdavContext ctxt)
Rename the given WebdavResource folder to the given
target resource
|
boolean |
setResourceStream(Data data,
java.io.File tmp,
WebdavContext ctxt)
Update/Override the FileDocument
|
protected boolean |
silentFilterResource(WebdavResource resource,
WebdavContext ctxt)
Return true if the resource should be silently ignored.
|
afterDoDelete, afterDoMove, doLock, doPut, doUnlock, getAbsoluteUri, getDescendantLocks, getLocks, getRelativeUri, hasInternalLock, isInternallyLocked, isListing, matchesIfHeaderCondition, normalize, putLock, putLocks, refreshLock, removeLock, removeLocks
public static final java.lang.String REVISION
protected Data root
protected static final org.apache.oro.text.regex.Pattern silentFilterPattern
public CatWebdavFileSystem(WebdavContext ctxt)
public void init()
WebdavFileSystem
init
in class WebdavFileSystem
WebdavFileSystem.init()
public WebdavResource getResource(java.lang.String uri, WebdavContext ctxt)
WebdavFileSystem
getResource
in class WebdavFileSystem
uri
- the resource URIctxt
- the Webdav ContextWebdavFileSystem.getResource(String, WebdavContext)
public boolean doCopy(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
WebdavFileSystem
doCopy
in class WebdavFileSystem
source
- a Webdav Resourcetarget
- a Webdav Resourceoverwrite
- a boolean indicate to overite or not the resourcerecursive
- is it a recursive copyctxt
- the Webdav ContextWebdavFileSystem.doCopy(WebdavResource, WebdavResource, boolean, boolean, WebdavContext)
public boolean doMove(WebdavResource source, WebdavResource target, boolean overwrite, boolean recursive, WebdavContext ctxt)
WebdavFileSystem
doMove
in class WebdavFileSystem
source
- a Webdav Resourcetarget
- a Webdav Resourceoverwrite
- a boolean indicate to overite or not the resourcerecursive
- is it a recursive copyctxt
- the Webdav ContextWebdavFileSystem.doMove(WebdavResource, WebdavResource, boolean, boolean, WebdavContext)
public boolean doCreate(WebdavResource resource, boolean overwrite, boolean isFolder, WebdavContext ctxt)
WebdavFileSystem
doCreate
in class WebdavFileSystem
resource
- the Webdav Resourceoverwrite
- a boolean indicate to ovewrite the resourceisFolder
- create a File or a FolderWebdavFileSystem.doCreate(WebdavResource, boolean, boolean, WebdavContext)
public boolean doDelete(WebdavResource resource, boolean recursive, WebdavContext ctxt)
WebdavFileSystem
doDelete
in class WebdavFileSystem
resource
- the Webdav Resourcerecursive
- is it a recursive deleteWebdavFileSystem.doDelete(WebdavResource, boolean, WebdavContext)
public boolean isReadOnly(WebdavContext ctxt)
WebdavFileSystem
isReadOnly
in class WebdavFileSystem
ctxt
- the Webdav Contextpublic Data getDataFromUri(java.lang.String uri, WebdavContext ctxt)
uri
- the relative urictxt
- the Webdav Contextpublic Data getDataFromName(java.lang.String name, Data parent, boolean onlyFolders, WebdavContext ctxt)
name
- the short uri nameparent
- the Parent DataonlyFolders
- if true only folders data are returnedctxt
- the Webdav Contextpublic java.lang.String getNameFromData(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Contextpublic boolean canReadData(Data data, boolean recursive, WebdavContext ctxt)
data
- the given Datarecursive
- check parent and childrenctxt
- the Webdav Contextpublic boolean isExisting(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Contextpublic boolean isFolder(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Contextpublic boolean isFile(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Contextpublic long getContentLength(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Contextpublic java.lang.String getContentType(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Contextpublic java.util.Collection<Data> getDataChildrenSet(Data parent, WebdavContext ctxt)
public void addFileDocument(java.util.Set<Data> childrenSet, Member loggedMember, Workspace workspace, Category category)
public Workspace getWorkspaceFromURI(java.lang.String uri, WebdavContext ctxt)
uri
- the resource URIctxt
- the WebdavContextpublic java.io.InputStream getResourceStream(Data data, WebdavContext ctxt) throws java.io.IOException
data
- the given Datactxt
- the Webdav Contextjava.io.IOException
public boolean setResourceStream(Data data, java.io.File tmp, WebdavContext ctxt) throws java.io.FileNotFoundException
data
- the given Datatmp
- the temporary downloaded filectxt
- the Webdav Contextjava.io.FileNotFoundException
protected boolean silentFilterResource(WebdavResource resource, WebdavContext ctxt)
WebdavFileSystem
silentFilterResource
in class WebdavFileSystem
resource
- the WebdavResourcectxt
- the WebdavContextpublic boolean createFolder(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the Webdav Contextpublic boolean createFile(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the Webdav Contextpublic boolean deleteFolder(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the Webdav Contextpublic boolean deleteFile(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the WebdavContextpublic boolean renameFile(WebdavResource src, WebdavResource tgt, WebdavContext ctxt)
src
- a Webdav Resourcetgt
- a Webdav Resourcectxt
- a Webdav Contextpublic boolean renameFolder(WebdavResource src, WebdavResource tgt, WebdavContext ctxt)
src
- a Webdav Resourcetgt
- a Webdav Resourcectxt
- a Webdav Contextpublic boolean copyFolder(WebdavResource src, WebdavResource tgt, boolean overwrite, boolean recursive, WebdavContext ctxt)
src
- Source Foldertgt
- Target Folderoverwrite
- boolean to overwrite targetrecursive
- boolean to do a recursive movectxt
- the Webdav Contextpublic boolean moveFolder(WebdavResource src, WebdavResource tgt, boolean overwrite, boolean recursive, WebdavContext ctxt)
src
- Source Foldertgt
- Target Folderoverwrite
- boolean to overwrite targetrecursive
- boolean to do a recursive movectxt
- the Webdav Contextpublic boolean copyMoveFile(WebdavResource src, WebdavResource tgt, boolean move, WebdavContext ctxt)
src
- the webdav sourcetgt
- the webdav targetmove
- the action to doctxt
- the Webdav Contextprotected boolean checkSetNewWorkspace(Workspace oldWS, Workspace newWS, java.util.Set<Category> pubCatSet)
public boolean isReadable(WebdavResource res, boolean recursive, WebdavContext ctxt)
res
- the Webdav Resourcerecursive
- recursive checkctxt
- the Webdav Contextpublic boolean isWritable(WebdavResource res, boolean recursive, boolean overwrite, WebdavContext ctxt)
res
- the Webdav Resourcerecursive
- recursive checkoverwrite
- overwrite flagctxt
- the Webdav Contextpublic WebdavLock newLock(WebdavResource resource, WebdavContext ctxt)
WebdavFileSystem
newLock
in class WebdavFileSystem
resource
- the Webdav Resourcectxt
- the Webdav ContextWebdavFileSystem.newLock(WebdavResource, WebdavContext)
Copyright © 2001-2010 Jalios SA. All Rights Reserved.