Package webdav :: Module Resource :: Class Resource
[show private | hide private]
[frames | no frames]

Type Resource

     object --+    
              |    
           Base --+
                  |
EtagSupport --+   |
              |   |
   LockableItem --+
                  |
                 Resource

Known Subclasses:
Collection, Item

The Resource mixin class provides basic WebDAV support for non-collection objects. It provides default implementations for most supported WebDAV HTTP methods, however certain methods such as PUT should be overridden to ensure correct behavior in the context of the object type.
Method Summary
  COPY(self, REQUEST, RESPONSE)
Create a duplicate of the source resource whose state and behavior match that of the source resource as closely as possible.
  dav__init(self, request, response)
  dav__simpleifhandler(self, request, response, method, col, url, refresh)
  dav__validate(self, object, methodname, REQUEST)
  DELETE(self, REQUEST, RESPONSE)
Delete a resource.
  HEAD(self, REQUEST, RESPONSE)
Retrieve resource information without a response body.
  listDAVObjects(self)
  LOCK(self, REQUEST, RESPONSE)
Lock a resource
  manage_DAVget(self)
Gets the document source
  MKCOL(self, REQUEST, RESPONSE)
Create a new collection resource.
  MOVE(self, REQUEST, RESPONSE)
Move a resource to a new location.
  OPTIONS(self, REQUEST, RESPONSE)
Retrieve communication options.
  PROPFIND(self, REQUEST, RESPONSE)
Retrieve properties defined on the resource.
  PROPPATCH(self, REQUEST, RESPONSE)
Set and/or remove properties defined on the resource.
  PUT(self, REQUEST, RESPONSE)
Replace the GET response entity of an existing resource.
  TRACE(self, REQUEST, RESPONSE)
Return the HTTP message received back to the client as the entity-body of a 200 (OK) response.
  UNLOCK(self, REQUEST, RESPONSE)
Remove an existing lock on a resource.
Inherited from LockableItem: wl_clearLocks, wl_delLock, wl_getLock, wl_hasLock, wl_isLocked, wl_lockItems, wl_lockmapping, wl_lockTokens, wl_lockValues, wl_setLock
Inherited from EtagSupport: http__etag, http__parseMatchList, http__processMatchHeaders, http__refreshEtag
Inherited from Base: __getattribute__, __getnewargs__, __getstate__, __new__, __reduce__, __setstate__
Inherited from object: __init__, __delattr__, __hash__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variable Summary
tuple __ac_permissions__ = (('View', ('HEAD',)), ('WebDAV acce...
int __dav_resource__ = 1                                                                     
tuple __http_methods__ = ('GET', 'HEAD', 'POST', 'PUT', 'DELET...
Implements __implemented__ = <implementedBy webdav.Resource.Resourc...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
tuple COPY__roles__ = ('Anonymous',)
PermissionRole DELETE__roles__ = <PermissionRole object at 0xfb48>
PermissionRole HEAD__roles__ = <PermissionRole object at 0xfbd8>
PermissionRole listDAVObjects__roles__ = <PermissionRole object at 0xfb...
PermissionRole LOCK__roles__ = <PermissionRole object at 0xfba8>
PermissionRole manage_DAVget__roles__ = <PermissionRole object at 0xfb6...
tuple MOVE__roles__ = ('Anonymous',)
NoneType OPTIONS__roles__ = None                                                                  
PermissionRole PROPFIND__roles__ = <PermissionRole object at 0xfb60>
PermissionRole PROPPATCH__roles__ = <PermissionRole object at 0xfab8>
NoneType TRACE__roles__ = None                                                                  
PermissionRole UNLOCK__roles__ = <PermissionRole object at 0xfc08>
Inherited from LockableItem: wl_clearLocks__roles__, wl_delLock__roles__, wl_getLock__roles__, wl_isLocked__roles__, wl_isLockedByUser__roles__, wl_lockItems__roles__, wl_lockmapping__roles__, wl_lockTokens__roles__, wl_lockValues__roles__, wl_setLock__roles__
Inherited from EtagSupport: __implements__, __providedBy__

Method Details

COPY(self, REQUEST, RESPONSE)

Create a duplicate of the source resource whose state and behavior match that of the source resource as closely as possible. Though we may later try to make a copy appear seamless across namespaces (e.g. from Zope to Apache), COPY is currently only supported within the Zope namespace.

DELETE(self, REQUEST, RESPONSE)

Delete a resource. For non-collection resources, DELETE may return either 200 or 204 (No Content) to indicate success.

HEAD(self, REQUEST, RESPONSE)

Retrieve resource information without a response body.

LOCK(self, REQUEST, RESPONSE)

Lock a resource

manage_DAVget(self)

Gets the document source

MKCOL(self, REQUEST, RESPONSE)

Create a new collection resource. If called on an existing resource, MKCOL must fail with 405 (Method Not Allowed).

MOVE(self, REQUEST, RESPONSE)

Move a resource to a new location. Though we may later try to make a move appear seamless across namespaces (e.g. from Zope to Apache), MOVE is currently only supported within the Zope namespace.

OPTIONS(self, REQUEST, RESPONSE)

Retrieve communication options.

PROPFIND(self, REQUEST, RESPONSE)

Retrieve properties defined on the resource.

PROPPATCH(self, REQUEST, RESPONSE)

Set and/or remove properties defined on the resource.

PUT(self, REQUEST, RESPONSE)

Replace the GET response entity of an existing resource. Because this is often object-dependent, objects which handle PUT should override the default PUT implementation with an object-specific implementation. By default, PUT requests fail with a 405 (Method Not Allowed).

TRACE(self, REQUEST, RESPONSE)

Return the HTTP message received back to the client as the entity-body of a 200 (OK) response. This will often usually be intercepted by the web server in use. If not, the TRACE request will fail with a 405 (Method Not Allowed), since it is not often possible to reproduce the HTTP request verbatim from within the Zope environment.

UNLOCK(self, REQUEST, RESPONSE)

Remove an existing lock on a resource.

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
(('View', ('HEAD',)),
 ('WebDAV access',
  ('PROPFIND', 'manage_DAVget', 'listDAVObjects'),
  ('Authenticated', 'Manager')),
 ('Manage properties', ('PROPPATCH',)),
 ('Delete objects', ('DELETE',)),
 ('WebDAV Lock items', ('LOCK',)),
 ('WebDAV Unlock items', ('UNLOCK',)))                                 

__dav_resource__

Type:
int
Value:
1                                                                     

__http_methods__

Type:
tuple
Value:
('GET',
 'HEAD',
 'POST',
 'PUT',
 'DELETE',
 'OPTIONS',
 'TRACE',
 'PROPFIND',
...                                                                    

__implemented__

Type:
Implements
Value:
<implementedBy webdav.Resource.Resource>                               

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x15697d0>        

COPY__roles__

Type:
tuple
Value:
('Anonymous',)                                                         

DELETE__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfb48>                                      

HEAD__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfbd8>                                      

listDAVObjects__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfb60>                                      

LOCK__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfba8>                                      

manage_DAVget__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfb60>                                      

MOVE__roles__

Type:
tuple
Value:
('Anonymous',)                                                         

OPTIONS__roles__

Type:
NoneType
Value:
None                                                                  

PROPFIND__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfb60>                                      

PROPPATCH__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfab8>                                      

TRACE__roles__

Type:
NoneType
Value:
None                                                                  

UNLOCK__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0xfc08>                                      

Generated by Epydoc 2.1 on Thu Aug 16 09:55:09 2007 http://epydoc.sf.net