Qore xml Module  1.7.1
WebDavHandler::DummyWebDavHandler Class Reference

This class returns 501 Unimplemented responses to all WebDavHandler requests except OPTIONS. More...

Inheritance diagram for WebDavHandler::DummyWebDavHandler:
WebDavHandler::AbstractWebDavHandler

Public Member Methods

 constructor ()
 Creates the object with an empty logger and an in-memory property handler.
 
 constructor (string virtual_relative_path_base)
 Creates the object with the given argument and an in-memory property handler. More...
 
 constructor (AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base='/')
 Creates the object with the given arguments. More...
 
 constructor (Logger logger, AbstractWebDavPropertyHandler property_handler=new InMemoryWebDavPropertyHandler(), string virtual_relative_path_base="/")
 Creates the object with the given arguments. More...
 
private *hash< string, hash< string, hash< string, bool > > > handleProppatchImpl (reference< string > href, hash< auto > cx, hash< auto > hdr, *hash< auto > request_xml, *list< hash< PropPatchActionInfo >> actions)
 Internal method for handling PROPPATCH requests. More...
 
- Public Member Methods inherited from WebDavHandler::AbstractWebDavHandler
 constructor (*AbstractAuthenticator auth)
 Creates the object with an empty logger and an in-memory property handler. More...
 
 constructor (*AbstractAuthenticator auth, string virtual_relative_path_base)
 Creates the object with the given argument and an in-memory property handler. More...
 
 constructor (*AbstractAuthenticator auth, AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base='/')
 Creates the object with the given arguments. More...
 
 constructor (*AbstractAuthenticator auth, Logger logger, AbstractWebDavPropertyHandler property_handler=new InMemoryWebDavPropertyHandler(), string virtual_relative_path_base='/')
 Creates the object with the given arguments. More...
 
list< string > getHttpMethods ()
 Returnd a list of WebDavHandler methods.
 
 setLogger (Logger logger)
 Replace the logger.
 
hash< HttpResponseInfo > handleRequest (HttpListenerInterface listener, Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP/WebDavHandler requests and returns the response.
 
string getRelativePath (string raw_path)
 Returns a relative path from an absolute path. More...
 
hash< HttpResponseInfo > response (int response_code=200, data msg='OK')
 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=200, 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='Bad Request')
 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='General Server Error')
 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.
 
private init (Logger logger, AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base="/")
 Common constructor code.
 
private hash< auto > preparePropFindXmlResponse (string local_path, string href, bool is_collection, hash< auto > base_props, bool all_props=False, *hash< string, hash< string, bool >> additional_props)
 Returns a hash that can be serialized to an XML string for a PROPFIND request.
 
hash< HttpResponseInfo > handleOptions (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles a WebDavHandler OPTIONS request. More...
 
hash< HttpResponseInfo > handleGet (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP GET requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleHead (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP HEAD requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handlePost (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP POST requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handlePut (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP PUT requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleDelete (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP DELETE requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleCopy (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler COPY requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleMove (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler MOVE requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleLock (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler LOCK requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleUnlock (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler UNLOCK requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleMkcol (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler MKCOL requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handlePropfind (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleProppatch (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler PROPPATCH requests for WebDavHandler resources; sets or removes properties on WebDavHandler resources. More...
 
 logInfo (string fmt)
 This method is called with informational log messages.
 
 logError (string fmt)
 This method is called with error log messages.
 
 logDebug (string fmt)
 This method is called with debug log messages.
 

Private Member Methods

hash< HttpResponseInfo > handleGetImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handleHeadImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handlePostImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handlePutImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handleDeleteImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handleCopyImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handleMoveImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handleLockImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handleUnlockImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handleMkcolImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
hash< HttpResponseInfo > handlePropfindImpl (Socket sock, hash< auto > cx, hash< auto > hdr, *data body)
 
- Private Member Methods inherited from WebDavHandler::AbstractWebDavHandler
string getRealPath (string raw_path)
 Converts a request path to a normalized real path on the filesystem in the root WebDavHandler directory. More...
 
*hash< HttpResponseInfo > checkAuth (string method, hash< auto > cx, hash< auto > hdr, *data body)
 Checks if the request is authorized; if not, this method must return a value. More...
 
 copyProperties (string source_url, string target_url)
 Copies all properties from the given source URL to the target URL.
 
 moveProperties (string source_url, string target_url)
 Moves all properties from the given source URL to the target URL.
 
 deleteProperties (string source_url)
 Deletes all properties from the given URL.
 
string getStatusMessage (softstring http_code)
 Returns a status message for the given HTTP response code. More...
 
hash< auto > getXml (string body)
 Parse incoming XML and handle namespaces.
 
hash< HttpResponseInfo > handleOptionsImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles an HTTP/WebDavHandler OPTIONS request. More...
 

Additional Inherited Members

- Static Public Member Methods inherited from WebDavHandler::AbstractWebDavHandler
static combineValue (reference< auto > h, auto v)
 Combines values recursively.
 
- Public Attributes inherited from WebDavHandler::AbstractWebDavHandler
const RequestMethods
 A hash of all supported WebDavHandler methods mapped to method names.
 
const DestMethods
 A hash of methods that require a Destination header.
 
const AllowHeaderValue = RequestMethods.keys().join(",")
 List of WebDavHandler methods in a string suitable for use in HTTP responses.
 
const MethodList = keys RequestMethods
 List of WebDavHandler methods.
 
const PPA_Remove = "R"
 PROPPATCH action: remove.
 
const PPA_Set = "S"
 PROPPATCH action: set.
 
- Private Attributes inherited from WebDavHandler::AbstractWebDavHandler
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.
 

Detailed Description

This class returns 501 Unimplemented responses to all WebDavHandler requests except OPTIONS.

Member Function Documentation

◆ constructor() [1/3]

WebDavHandler::DummyWebDavHandler::constructor ( AbstractWebDavPropertyHandler  property_handler,
string  virtual_relative_path_base = '/' 
)

Creates the object with the given arguments.

Parameters
property_handlerto handle properties
virtual_relative_path_basethe virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources

◆ constructor() [2/3]

WebDavHandler::DummyWebDavHandler::constructor ( Logger  logger,
AbstractWebDavPropertyHandler  property_handler = new InMemoryWebDavPropertyHandler(),
string  virtual_relative_path_base = "/" 
)

Creates the object with the given arguments.

Parameters
loggerthe logger
property_handlerto handle properties
virtual_relative_path_basethe virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources

◆ constructor() [3/3]

WebDavHandler::DummyWebDavHandler::constructor ( string  virtual_relative_path_base)

Creates the object with the given argument and an in-memory property handler.

Parameters
virtual_relative_path_basethe virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources

◆ handleCopyImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleCopyImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

COPY

Copy a resource from one URI to another.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleDeleteImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleDeleteImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

DELETE

Delete a resource.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleGetImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleGetImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

GET

Get a resource.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleHeadImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleHeadImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

HEAD

Same like GET but without sending a body.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleLockImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleLockImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

LOCK

Put a lock on a resource. WebDavHandler supports both shared and exclusive locks.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleMkcolImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleMkcolImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

MKCOL

Create collections (aka a directory).

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleMoveImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleMoveImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

MOVE

Move a resource from one URI to another.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handlePostImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handlePostImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

POST

Create new resource.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handlePropfindImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handlePropfindImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

PROPFIND

Retrieve properties, stored as XML, from a web resource. It is also overloaded to allow one to retrieve the collection structure (also known as directory hierarchy) of a remote system.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleProppatchImpl()

private *hash<string, hash<string, hash<string, bool> > > WebDavHandler::DummyWebDavHandler::handleProppatchImpl ( reference< string >  href,
hash< auto >  cx,
hash< auto >  hdr,
*hash< auto >  request_xml,
*list< hash< PropPatchActionInfo >>  actions 
)
inlinevirtual

Internal method for handling PROPPATCH requests.

Parameters
hrefthe href for the response
cxthe HTTP call context
hdras hash HTTP headers
request_xmlthe parsed XML in the request
actionsa list of set and remove actions to execute on the given properties
Returns
a status map of HTTP code -> namespace -> property -> True
Exceptions
WEBDAVHANDLER-ERRORan error occured
Note
This method always throws a WEBDAVHANDLER-ERROR exception to return a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handlePutImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handlePutImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

PUT

Modify resource.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.

◆ handleUnlockImpl()

hash<HttpResponseInfo> WebDavHandler::DummyWebDavHandler::handleUnlockImpl ( Socket  sock,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatevirtual

UNLOCK

Remove a lock from a resource.

Note
This method always returns a 501 Unimplemented response

Implements WebDavHandler::AbstractWebDavHandler.


The documentation for this class was generated from the following file: