|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.webdav.WebdavFileSystem com.jalios.jcms.webdav.cat.CatWebdavFileSystem
public class CatWebdavFileSystem
A JCMS Representation of a Webdav FileSystem The root directory will be defined by servlet configuration parameter "RootPath"
Field Summary | |
---|---|
static String |
REVISION
|
protected Data |
root
|
protected static org.apache.oro.text.regex.Pattern |
silentFilterPattern
|
Fields inherited from class com.jalios.jcms.webdav.WebdavFileSystem |
---|
resourceLocks |
Constructor Summary | |
---|---|
CatWebdavFileSystem(WebdavContext ctxt)
|
Method Summary | |
---|---|
void |
addFileDocument(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,
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 |
String |
getContentType(Data data,
WebdavContext ctxt)
This method return the content type of the ressource |
Collection<Data> |
getDataChildrenSet(Data parent,
WebdavContext ctxt)
|
Data |
getDataFromName(String name,
Data parent,
boolean onlyFolders,
WebdavContext ctxt)
Return the Data represented by the given short uri |
Data |
getDataFromUri(String uri,
WebdavContext ctxt)
Retrieve the Data from the given URI Starting from the given root. |
String |
getNameFromData(Data data,
WebdavContext ctxt)
This method return the short name of the given data (Category or FileDocument) for this implementation |
WebdavResource |
getResource(String uri,
WebdavContext ctxt)
Lookup the resource represented by the given URI. |
InputStream |
getResourceStream(Data data,
WebdavContext ctxt)
This method return the resource input stream |
Workspace |
getWorkspaceFromURI(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,
File tmp,
WebdavContext ctxt)
Update/Override the FileDocument |
protected boolean |
silentFilterResource(WebdavResource resource,
WebdavContext ctxt)
Return true if the resource should be silently ignored. |
Methods inherited from class com.jalios.jcms.webdav.WebdavFileSystem |
---|
afterDoDelete, afterDoMove, doLock, doPut, doUnlock, getAbsoluteUri, getDescendantLocks, getLocks, getRelativeUri, hasInternalLock, isInternallyLocked, isListing, matchesIfHeaderCondition, normalize, putLock, putLocks, refreshLock, removeLock, removeLocks |
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 Data root
protected static final org.apache.oro.text.regex.Pattern silentFilterPattern
WebdavFileSystem.silentFilterResource(WebdavResource, WebdavContext)
Constructor Detail |
---|
public CatWebdavFileSystem(WebdavContext ctxt)
Method Detail |
---|
public void init()
WebdavFileSystem
init
in class WebdavFileSystem
WebdavFileSystem.init()
public WebdavResource getResource(String uri, WebdavContext ctxt)
WebdavFileSystem
getResource
in class WebdavFileSystem
uri
- the resource URIctxt
- the Webdav Context
WebdavFileSystem.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 Context
WebdavFileSystem.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 Context
WebdavFileSystem.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 Folder
WebdavFileSystem.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 delete
WebdavFileSystem.doDelete(WebdavResource, boolean, WebdavContext)
public boolean isReadOnly(WebdavContext ctxt)
WebdavFileSystem
isReadOnly
in class WebdavFileSystem
ctxt
- the Webdav Context
public Data getDataFromUri(String uri, WebdavContext ctxt)
uri
- the relative urictxt
- the Webdav Context
public Data getDataFromName(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 Context
public String getNameFromData(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Context
public boolean canReadData(Data data, boolean recursive, WebdavContext ctxt)
data
- the given Datarecursive
- check parent and childrenctxt
- the Webdav Context
public boolean canBeReadBy(Data data, Member loggedMember)
public boolean isExisting(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Context
public boolean isFolder(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Context
public boolean isFile(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Context
public long getContentLength(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Context
public String getContentType(Data data, WebdavContext ctxt)
data
- the given Datactxt
- the Webdav Context
public Collection<Data> getDataChildrenSet(Data parent, WebdavContext ctxt)
public void addFileDocument(Set<Data> childrenSet, Member loggedMember, Workspace workspace, Category category)
public Workspace getWorkspaceFromURI(String uri, WebdavContext ctxt)
uri
- the resource URIctxt
- the WebdavContext
public InputStream getResourceStream(Data data, WebdavContext ctxt) throws IOException
data
- the given Datactxt
- the Webdav Context
IOException
public boolean setResourceStream(Data data, File tmp, WebdavContext ctxt) throws FileNotFoundException
data
- the given Datatmp
- the temporary downloaded filectxt
- the Webdav Context
FileNotFoundException
protected boolean silentFilterResource(WebdavResource resource, WebdavContext ctxt)
WebdavFileSystem
silentFilterResource
in class WebdavFileSystem
resource
- the WebdavResourcectxt
- the WebdavContext
public boolean createFolder(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the Webdav Context
public boolean createFile(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the Webdav Context
public boolean deleteFolder(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the Webdav Context
public boolean deleteFile(WebdavResource res, WebdavContext ctxt)
res
- the Webdav Resourcectxt
- the WebdavContext
public boolean renameFile(WebdavResource src, WebdavResource tgt, WebdavContext ctxt)
src
- a Webdav Resourcetgt
- a Webdav Resourcectxt
- a Webdav Context
public boolean renameFolder(WebdavResource src, WebdavResource tgt, WebdavContext ctxt)
src
- a Webdav Resourcetgt
- a Webdav Resourcectxt
- a Webdav Context
public 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 Context
public 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 Context
public boolean copyMoveFile(WebdavResource src, WebdavResource tgt, boolean move, WebdavContext ctxt)
src
- the webdav sourcetgt
- the webdav targetmove
- the action to doctxt
- the Webdav Context
protected boolean checkSetNewWorkspace(Workspace oldWS, Workspace newWS, Set<Category> pubCatSet)
public boolean isReadable(WebdavResource res, boolean recursive, WebdavContext ctxt)
res
- the Webdav Resourcerecursive
- recursive checkctxt
- the Webdav Context
public boolean isWritable(WebdavResource res, boolean recursive, boolean overwrite, WebdavContext ctxt)
res
- the Webdav Resourcerecursive
- recursive checkoverwrite
- overwrite flagctxt
- the Webdav Context
public WebdavLock newLock(WebdavResource resource, WebdavContext ctxt)
WebdavFileSystem
newLock
in class WebdavFileSystem
resource
- the Webdav Resourcectxt
- the Webdav Context
WebdavFileSystem.newLock(WebdavResource, WebdavContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |