![]() |
Qore xml Module 2.1.0
|
Abstract WebDavHandler interface class. More...
#include <AbstractWebDavHandler.qc.dox.h>
Public Member Methods | |
| void | constructor (soft< AbstractAuthenticator > auth) |
| Creates the object with an empty logger and an in-memory property handler. | |
| void | constructor (soft< AbstractAuthenticator > auth, string virtual_relative_path_base) |
| Creates the object with the given argument and an in-memory property handler. | |
| void | constructor (soft< AbstractAuthenticator > auth, AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base) |
| Creates the object with the given arguments. | |
| void | constructor (soft< AbstractAuthenticator > auth, Logger logger, AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base) |
| Creates the object with the given arguments. | |
| list< string > | getHttpMethods () |
| Returnd a list of WebDavHandler methods. | |
| void | setLogger (Logger logger) |
| Replace the logger. | |
| string | getRelativePath (string raw_path) |
| Returns a relative path from an absolute path. | |
| hash< HttpResponseInfo > | response (int response_code, data msg) |
| Returns a hash that can be used as an HTTP response with the given HTTP response code and response message. | |
| hash< HttpResponseInfo > | response (int response_code, hash< auto > hdr) |
| Returns a hash that can be used as an HTTP response with the given HTTP response code and response headers. | |
| hash< HttpResponseInfo > | resp400 (data msg) |
| Returns a hash that can be used as an HTTP response with a 400 response code and response message. | |
| hash< HttpResponseInfo > | resp404 () |
| Returns a hash that can be used as an HTTP response with a 404 response code and response message. | |
| hash< HttpResponseInfo > | resp500 (data msg) |
| Returns a hash that can be used as an HTTP response with a 500 response code and response message. | |
| hash< HttpResponseInfo > | resp501 () |
| Returns a hash that can be used as an HTTP response with a 501 response code and response message. | |
| void | init (Logger logger, AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base) |
| Common constructor code. | |
| string | getRealPath (string raw_path) |
| Converts a request path to a normalized real path on the filesystem in the root WebDavHandler directory. | |
| soft< hash< HttpResponseInfo > > | checkAuth (soft< data > body, hash< auto > hdr, string method, hash< auto > cx) |
| Checks if the request is authorized; if not, this method must return a value. | |
| void | copyProperties (string source_url, string target_url) |
| Copies all properties from the given source URL to the target URL. | |
| void | moveProperties (string source_url, string target_url) |
| Moves all properties from the given source URL to the target URL. | |
| void | deleteProperties (string source_url) |
| Deletes all properties from the given URL. | |
| hash< auto > | preparePropFindXmlResponse (hash< auto > base_props, bool all_props, soft< hash< string, hash< string, bool > > > additional_props, bool is_collection, string local_path, string href) |
| Returns a hash that can be serialized to an XML string for a PROPFIND request. | |
| string | getStatusMessage (softstring http_code) |
| Returns a status message for the given HTTP response code. | |
| hash< HttpResponseInfo > | handleOptions (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles a WebDavHandler OPTIONS request. | |
| hash< HttpResponseInfo > | handleGet (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP GET requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handleHead (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP HEAD requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handlePost (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP POST requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handlePut (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP PUT requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handleDelete (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP DELETE requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handleCopy (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler COPY requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handleMove (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler MOVE requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handleLock (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler LOCK requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handleUnlock (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler UNLOCK requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handleMkcol (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler MKCOL requests for WebDavHandler resources. | |
| hash< HttpResponseInfo > | handlePropfind (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources. | |
| void | logInfo (string fmt) |
| This method is called with informational log messages. | |
| void | logError (string fmt) |
| This method is called with error log messages. | |
| void | logDebug (string fmt) |
| This method is called with debug log messages. | |
| hash< auto > | getXml (string body) |
| Parse incoming XML and handle namespaces. | |
| hash< HttpResponseInfo > | handleOptionsImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles an HTTP/WebDavHandler OPTIONS request. | |
| abstract hash< HttpResponseInfo > | handleGetImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP GET requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handleHeadImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP HEAD requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handlePostImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP POST requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handlePutImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP PUT requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handleDeleteImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles HTTP DELETE requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handleCopyImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler COPY requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handleMoveImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler MOVE requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handleLockImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler LOCK requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handleUnlockImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler UNLOCK requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handleMkcolImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler MKCOL requests for WebDavHandler resources. | |
| abstract hash< HttpResponseInfo > | handlePropfindImpl (soft< data > body, hash< auto > hdr, Socket s, hash< auto > cx) |
| Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources. | |
| abstract soft< hash< string, hash< string, hash< string, bool > > > > | handleProppatchImpl (soft< list< hash< PropPatchActionInfo > > > actions, soft< hash< auto > > request_xml, hash< auto > hdr, reference< string > href, hash< auto > cx) |
| Internal method for handling PROPPATCH requests. | |
| string | getNsPrefix (string ns) |
| Returns a new namespace prefix. | |
Static Public Member Methods | |
| static void | combineValue (reference< auto > h, auto v) |
| Combines values recursively. | |
Public Attributes | |
| const auto | RequestMethods = ... |
| A hash of all supported WebDavHandler methods mapped to method names. | |
| const auto | DestMethods = ... |
| A hash of methods that require a Destination header. | |
| const auto | AllowHeaderValue = ... |
| List of WebDavHandler methods in a string suitable for use in HTTP responses. | |
| const auto | MethodList = ... |
| List of WebDavHandler methods. | |
| const auto | PPA_Remove = ... |
| PROPPATCH action: remove. | |
| const auto | PPA_Set = ... |
| PROPPATCH action: set. | |
Private Attributes | |
| AbstractWebDavPropertyHandler | property_handler |
| The property handler object. | |
| string | virtual_base_path |
| The virtual base path for resources served by the WebDavHandler handler. | |
| Logger | logger |
| The Logger for this object. | |
Abstract WebDavHandler interface class.
| soft< hash< HttpResponseInfo > > WebDavHandler::AbstractWebDavHandler::checkAuth | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| string | method, | ||
| hash< auto > | cx | ||
| ) |
Checks if the request is authorized; if not, this method must return a value.
Override this in a subclass to implement authorization controls
| void WebDavHandler::AbstractWebDavHandler::constructor | ( | soft< AbstractAuthenticator > | auth | ) |
Creates the object with an empty logger and an in-memory property handler.
| auth | the authentication object to use to authenticate connections |
| void WebDavHandler::AbstractWebDavHandler::constructor | ( | soft< AbstractAuthenticator > | auth, |
| AbstractWebDavPropertyHandler | property_handler, | ||
| string | virtual_relative_path_base | ||
| ) |
Creates the object with the given arguments.
| auth | the authentication object to use to authenticate connections |
| property_handler | to handle properties |
| virtual_relative_path_base | the virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources |
| void WebDavHandler::AbstractWebDavHandler::constructor | ( | soft< AbstractAuthenticator > | auth, |
| Logger | logger, | ||
| AbstractWebDavPropertyHandler | property_handler, | ||
| string | virtual_relative_path_base | ||
| ) |
Creates the object with the given arguments.
| auth | the authentication object to use to authenticate connections |
| logger | the logger |
| property_handler | to handle properties |
| virtual_relative_path_base | the virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources |
| void WebDavHandler::AbstractWebDavHandler::constructor | ( | soft< AbstractAuthenticator > | auth, |
| string | virtual_relative_path_base | ||
| ) |
Creates the object with the given argument and an in-memory property handler.
| auth | the authentication object to use to authenticate connections |
| virtual_relative_path_base | the virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources |
| string WebDavHandler::AbstractWebDavHandler::getRealPath | ( | string | raw_path | ) |
Converts a request path to a normalized real path on the filesystem in the root WebDavHandler directory.
| WEBDAVHANDLER-FORBIDDEN | if the path is not valid |
| string WebDavHandler::AbstractWebDavHandler::getRelativePath | ( | string | raw_path | ) |
Returns a relative path from an absolute path.
| raw_path | the rar path to process |
| string WebDavHandler::AbstractWebDavHandler::getStatusMessage | ( | softstring | http_code | ) |
Returns a status message for the given HTTP response code.
| RESPONSE-ERROR | the code is unknown |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleCopy | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler COPY requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleCopyImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler COPY requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleDelete | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP DELETE requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleDeleteImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP DELETE requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleGet | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP GET requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleGetImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP GET requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleHead | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP HEAD requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleHeadImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP HEAD requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleLock | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler LOCK requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleLockImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler LOCK requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleMkcol | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler MKCOL requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleMkcolImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler MKCOL requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleMove | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler MOVE requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleMoveImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler MOVE requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleOptions | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles a WebDavHandler OPTIONS request.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleOptionsImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles an HTTP/WebDavHandler OPTIONS request.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handlePost | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP POST requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handlePostImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP POST requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handlePropfind | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handlePropfindImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract soft< hash< string, hash< string, hash< string, bool > > > > WebDavHandler::AbstractWebDavHandler::handleProppatchImpl | ( | soft< list< hash< PropPatchActionInfo > > > | actions, |
| soft< hash< auto > > | request_xml, | ||
| hash< auto > | hdr, | ||
| reference< string > | href, | ||
| hash< auto > | cx | ||
| ) |
Internal method for handling PROPPATCH requests.
| href | the href for the response |
| cx | the HTTP call context |
| hdr | as hash HTTP headers |
| request_xml | the parsed XML in the request |
| actions | a list of set and remove actions to execute on the given properties |
| WEBDAVHANDLER-ERROR | an error occured |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handlePut | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP PUT requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handlePutImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles HTTP PUT requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleUnlock | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler UNLOCK requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |
| abstract hash< HttpResponseInfo > WebDavHandler::AbstractWebDavHandler::handleUnlockImpl | ( | soft< data > | body, |
| hash< auto > | hdr, | ||
| Socket | s, | ||
| hash< auto > | cx | ||
| ) |
Handles WebDavHandler UNLOCK requests for WebDavHandler resources.
| cx | call context hash; this hash will have the following keys:
|
| hdr | incoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
|
| body | message body, if any |