Sujet précédent

6.6. webdav – WebDAV

Sujet suivant

6.6.2. webdav.backends.openplm — OpenPLM Backend

Cette page

Autres langues

6.6.1. webdav.backends — Backend base class

django-webdav is a small WebDAV implementation for Django. Copyright 2012 Peter Gebauer

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

exception openPLM.apps.webdav.backends.BackendException[source]

Bases: exceptions.Exception

exception openPLM.apps.webdav.backends.BackendIOException[source]

Bases: openPLM.apps.webdav.backends.BackendException

exception openPLM.apps.webdav.backends.BackendStorageException[source]

Bases: openPLM.apps.webdav.backends.BackendException

exception openPLM.apps.webdav.backends.BackendResourceNotFoundException[source]

Bases: openPLM.apps.webdav.backends.BackendException

exception openPLM.apps.webdav.backends.BackendLockException[source]

Bases: openPLM.apps.webdav.backends.BackendException

class openPLM.apps.webdav.backends.BackendLock(path, token, **kwargs)[source]

Bases: object

Used for the WebDav backend locking mechanisms.

classmethod from_dict(d)[source]
to_dict()[source]
class openPLM.apps.webdav.backends.PropertySet(props={}, status='200 OK')[source]

Bases: dict

class openPLM.apps.webdav.backends.BackendItem(name, is_collection=False, property_sets=[])[source]

Bases: object

add_properties(props={}, status='200 OK')[source]
class openPLM.apps.webdav.backends.Backend(configuration, **kwargs)[source]

Bases: object

Abstract files backend class.

LOCK_EX = 1
LOCK_SH = 2
classmethod validate_config(config)[source]

Validator for a specific backend. Config is a dictionary. Override to validate specific values in that dictionary. Raises django.core.exceptions.ValidationError if it fails.

classmethod get_category()[source]

Override. Return a string with the category name.

classmethod get_name()[source]

Override. Return proper human readable name as string.

get_acl(path)[source]

Returns an empty WebDavAcl instance.

set_acl(path, acl)[source]

Write WebDavAcl instance.

dav_propfind(path, property_names=[])[source]

The property_names argument can be used to specify which properties to return with the BackendItems. Empty list (default) means ALL properties. Return a list of BackendItem instances found in the specified path collection. Always include the resource specified in path.

dav_set_properties(path, properties, token=None)[source]

Set properties (dictionary) for resource.

dav_remove_properties(path, property_names, token=None)[source]

Remove properties (list of names) from resource.

dav_mkcol(path, token=None)[source]

Create a new collection for resource.

dav_get(path)[source]

Return readable file object.

dav_head(path)[source]

Not sure yet! FIXME!!!

dav_delete(path, token=None)[source]

Deletes the resource.

dav_put(path, readable, token=None, estimated_size=0)[source]

Upload data using file object. (or any object with read method)

dav_copy(from_path, to_path, token=None)[source]

Copies a resource from one path to another.

dav_move(from_path, to_path, token1=None, token2=None)[source]

Movies a resource from one path to another.

dav_lock(path, token=None, **kwargs)[source]

Locks the resource, exclusive or shared, depth infinite or not. Must support the following keyword arguments: owner (str), exclusive (bool), infinite (bool) and timeout (int). Returns a BackendLock instance.

dav_unlock(path, token, owner=None)[source]

Unlocks the resource.

dav_get_lock(path)[source]

Returns a BackendLock instance.