| java.lang.Object com.flexive.war.webdav.FxDavContext
All known Subclasses: com.flexive.war.webdav.FxDavFileSystemContext, com.flexive.war.webdav.FxDavDummyContext,
FxDavContext | abstract public class FxDavContext (Code) | | Abstract context class for webDav operations.
|
Method Summary | |
abstract public int | copyResource(HttpServletRequest request, String src, String dest) Copies a resource. | abstract public int | createCollection(HttpServletRequest request, String name) Create a collection (Mkcol operation).
MKCOL creates a new collection resource at the location specified by the Request-URI.
If the resource identified by the Request-URI is non-null then the MKCOL MUST fail.
During MKCOL processing, a server MUST make the Request-URI a member of its parent collection, unless the
Request-URI is "/". | abstract public int | createResource(HttpServletRequest request, String path) Creates a resource. | abstract public int | deleteResource(HttpServletRequest request, String path) Deletes a resource. | abstract public FxDavEntry[] | getChildren(HttpServletRequest request, String name) Returns all childs of a given resource. | abstract public FxDavEntry | getResource(HttpServletRequest request, String name) Gets the resource stored under the given name, or null if the resource does not exist. | abstract public FxDavContext | getSingleton() Returns a singleton for the class. | abstract public void | moveResource(HttpServletRequest request, String src, String dest) Moves a resource. | abstract public void | serviceResource(HttpServletRequest request, HttpServletResponse response, String name) Serves a resource to the webdav client. |
copyResource | abstract public int copyResource(HttpServletRequest request, String src, String dest)(Code) | | Copies a resource.
Parameters: src - the absolute path of the source resource, eg 'folder1/folder2/file.txt' Parameters: dest - the absolute path of the destination resource, eg 'folder1/folder2/file_new.txt' Parameters: request - the request containing the data for the resource the status code, FxWebDavStatus.SC_OK if the operation was successfull |
createCollection | abstract public int createCollection(HttpServletRequest request, String name)(Code) | | Create a collection (Mkcol operation).
MKCOL creates a new collection resource at the location specified by the Request-URI.
If the resource identified by the Request-URI is non-null then the MKCOL MUST fail.
During MKCOL processing, a server MUST make the Request-URI a member of its parent collection, unless the
Request-URI is "/". If no such ancestor exists, the method MUST fail.
When the MKCOL operation creates a new collection resource, all ancestors MUST already exist, or the method MUST
fail with a 409 (Conflict) status code. For example, if a request to create collection /a/b/c/d/ is made, and
neither /a/b/ nor /a/b/c/ exists, the request must fail.
Possible return codes:
201 (Created) - The collection or structured resource was created in its entirety.
403 (Forbidden) - This indicates at least one of two conditions: 1) the server does not allow the creation of
collections at the given location in its namespace, or 2) the parent collection of the Request-URI exists but
cannot accept members.
405 (Method Not Allowed) - MKCOL can only be executed on a deleted/non-existent resource.
409 (Conflict) - A collection cannot be made at the Request-URI until one or more intermediate collections have
been created.
507 (Insufficient Storage) - The resource does not have sufficient space to record the state of the resource
after the execution of this method.
423 (Locked) - The resource is locked
Parameters: request - the current request Parameters: name - the absolute name of the collection, eg 'folder1/folder2/new_folder' the status code, FxWebDavStatus.SC_CREATED if the operation was successfull |
createResource | abstract public int createResource(HttpServletRequest request, String path)(Code) | | Creates a resource.
Parameters: path - the absolute path of the new resource, eg 'folder1/folder2/file.txt' Parameters: request - the request containing the data for the resource the status code, FxWebDavStatus.SC_CREATED if the operation was successful |
deleteResource | abstract public int deleteResource(HttpServletRequest request, String path)(Code) | | Deletes a resource.
Parameters: path - the absolute path of the new resource, eg 'folder1/folder2/file.txt' Parameters: request - the request containing the data for the resource the status code, FxWebDavStatus.SC_OK if the operation was successful |
getChildren | abstract public FxDavEntry[] getChildren(HttpServletRequest request, String name)(Code) | | Returns all childs of a given resource.
A empty String denotes the root collection.
Parameters: request - the current request Parameters: name - the name of the resource, eg 'myFolder1/myFolder2', 'myFolder1/File1.txt', 'File.txt' all childs of a given resource. |
getResource | abstract public FxDavEntry getResource(HttpServletRequest request, String name)(Code) | | Gets the resource stored under the given name, or null if the resource does not exist.
The returned resource may be a collection (directory) or file.
The path starts always from the root entry, but there is no starting '/' character.
A empty String denotes the root collection.
Parameters: request - the current request Parameters: name - the name of the resource, eg 'myFolder1/myFolder2/demo.html' the resource |
getSingleton | abstract public FxDavContext getSingleton()(Code) | | Returns a singleton for the class.
a singleton for the class. |
moveResource | abstract public void moveResource(HttpServletRequest request, String src, String dest)(Code) | | Moves a resource.
Parameters: src - the absolute path of the source resource, eg 'folder1/folder2/file.txt' Parameters: dest - the absolute path of the destination resource, eg 'folder1/folder2/file_new.txt' Parameters: request - the request containing the data for the resource |
serviceResource | abstract public void serviceResource(HttpServletRequest request, HttpServletResponse response, String name) throws IOException(Code) | | Serves a resource to the webdav client.
Parameters: request - the current request Parameters: response - the response Parameters: name - the name of the resource, eg 'myFolder1/File1.txt' throws: IOException - if the resource could not be served |
|
|