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

Type Resource

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

Known Subclasses:
Collection, DA, 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(self)
  wl_delLock(self, locktoken)
  wl_getLock(self, locktoken)
  wl_hasLock(self, token, killinvalids)
  wl_isLocked(self)
  wl_lockItems(self, killinvalids)
  wl_lockmapping(self, killinvalids, create)
if 'killinvalids' is 1, locks who are no longer valid will be deleted
  wl_lockTokens(self, killinvalids)
  wl_lockValues(self, killinvalids)
  wl_setLock(self, locktoken, lock)
    Inherited from EtagSupport
  http__etag(self, readonly)
  http__parseMatchList(self, REQUEST, header)
  http__processMatchHeaders(self, REQUEST)
  http__refreshEtag(self)
    Inherited from Base
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __getnewargs__(...)
Get arguments to be passed to __new__
  __getstate__(...)
Get the object serialization state
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
Reduce an object to contituent parts for serialization
  __setstate__(...)
Set the object serialization state The state should be in one of 3 forms: - None Ignored - A dictionary In this case, the object's instance dictionary will be cleared and updated with the new state.
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

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 0xb7457188>
PermissionRole HEAD__roles__ = <PermissionRole object at 0xb7457140>
PermissionRole listDAVObjects__roles__ = <PermissionRole object at 0xb7...
PermissionRole LOCK__roles__ = <PermissionRole object at 0xb74571a0>
PermissionRole manage_DAVget__roles__ = <PermissionRole object at 0xb74...
tuple MOVE__roles__ = ('Anonymous',)
NoneType OPTIONS__roles__ = None                                                                  
PermissionRole PROPFIND__roles__ = <PermissionRole object at 0xb7457158...
PermissionRole PROPPATCH__roles__ = <PermissionRole object at 0xb745717...
NoneType TRACE__roles__ = None                                                                  
PermissionRole UNLOCK__roles__ = <PermissionRole object at 0xb74571b8>
    Inherited from LockableItem
PermissionRole wl_clearLocks__roles__ = <PermissionRole object at 0xb75...
PermissionRole wl_delLock__roles__ = <PermissionRole object at 0xb7558d...
NoneType wl_getLock__roles__ = None                                                                  
PermissionRole wl_grantLockToUser__roles__ = <PermissionRole object at ...
NoneType wl_isLocked__roles__ = None                                                                  
NoneType wl_isLockedByUser__roles__ = None                                                                  
NoneType wl_lockItems__roles__ = None                                                                  
tuple wl_lockmapping__roles__ = ()
NoneType wl_lockTokens__roles__ = None                                                                  
NoneType wl_lockValues__roles__ = None                                                                  
PermissionRole wl_setLock__roles__ = <PermissionRole object at 0xb7558e...
    Inherited from EtagSupport
tuple __implements__ = (<Interface webdav.EtagSupport.EtagBase...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...

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 0xb72ed5cc>       

COPY__roles__

Type:
tuple
Value:
('Anonymous',)                                                         

DELETE__roles__

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

HEAD__roles__

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

listDAVObjects__roles__

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

LOCK__roles__

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

manage_DAVget__roles__

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

MOVE__roles__

Type:
tuple
Value:
('Anonymous',)                                                         

OPTIONS__roles__

Type:
NoneType
Value:
None                                                                  

PROPFIND__roles__

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

PROPPATCH__roles__

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

TRACE__roles__

Type:
NoneType
Value:
None                                                                  

UNLOCK__roles__

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

Generated by Epydoc 2.1 on Wed Nov 30 03:58:12 2005 http://epydoc.sf.net