1 NGObjWeb WebDAV Implementation for SoObjects
2 ============================================
4 This subproject contains a WebDAV implementation for SOPE which is based on top
5 of the SoObjectRequestHandler.
7 The central point where processing starts once the request is received by the
10 SoObjectWebDAVDispatcher
12 class. This class knows about the various WebDAV HTTP methods and takes
13 appropriate actions by calling specified methods on either the SoObject which
14 is targetted by the URL or on one of the maintenance objects. Eg WebDAV
15 locking and notification is handled by the
20 classes, so the targetted object itself doesn't need to concern itself about
23 Once a WebDAV action has been performed, the
27 class is used to turn the result value of the HTTP method in a suitable WebDAV
28 XML representation. To support non basic XML properties there is also a helper
34 PROPFIND/SEARCH Queries
35 =======================
37 The payload of both, WebDAV PROPFIND and SEARCH methods are represented as a
38 regular EOControl EOFetchSpecification. The fetchspec is annotated with various
39 hints to add additional WebDAV information. This includes the required depth
40 of the query as well as the properties being requested.
42 In case a SEARCH query is decoded, a regular EOQualifier/EOSortOrdering is
43 used for representing that query.
45 To perform a query, the layer will call:
47 - (id)performWebDAVQuery:(EOFetchSpecification *)_fetchSpecification
48 inContext:(WOContext *)_context;
52 Note that there are default implementations for queries based on KVC
56 A special feature is that an object can make the WebDAV layer "remap" the
57 public WebDAV property names to internal names, for example KVC keys. To do so
58 the object needs to implement
60 - (NSDictionary *)davAttributeMapInContext:(WOContext *)_context;
62 For example this can be used to map the "davDisplayName" to the "title" of a
66 Default Query Implementation
67 ============================
69 The default implementation is done in the NSObject(SoDAVQuery) category which
70 requires an NSObject conforming to the "So" model of doing things. A query is
73 - (id)performWebDAVQuery:(EOFetchSpecification *)_fetchSpecification
74 inContext:(WOContext *)_context;
76 The method then splits the operation based on the depth into one of those
77 methods for 'self'(0) or 'deep'(infinity) queries:
79 - (id)davQueryOnSelf:(EOFetchSpecification *)_fs inContext:(WOContext *)_ctx;
80 - (id)performWebDAVDeepQuery:((EOFetchSpecification *)_fs
81 inContext:(WOContext *)_ctx;
83 For 'flat'(1) queries it uses a datasource to fetch the content and the
84 -davQueryOnSelf:inContext: method to retrieve info on the object itself
85 (required by WebDAV, but buggy in some implementations, eg WebFolders). The
86 datasource is determined by
88 - (EODataSource *)contentDataSourceInContext:(WOContext *)_context;
90 Per default this returns the SoObjectDataSource which performs KVC / EOControl
91 based filtering and sorting.
93 Besides those standard queries, the default implementations also deals with
94 bulk queries as generated by either BPROPFIND or by the _range_ URI hack for
95 ZideLook. Those will call
97 - (id)performWebDAVBulkQuery:(EOFetchSpecification *)_fetchSpec
98 inContext:(WOContext *)_context;
100 Its discouraged to use bulk queries, since they are non-standard.
103 In case no specific property names are requested (<allprop/> or a propfind
104 without a body), the toolkit is going to query the available property set
107 - (NSArray *)defaultWebDAVPropertyNamesInContext:(WOContext *)_context;
108 TODO: check for soClass slots
110 Note that this is just the set used for allprop queries, you can still support
111 more properties than that (not sure whether that would be valid WebDAV though).
118 The dispatcher supports various Exchange WebDAV enhancements, eg bulk queries
121 Further it supports so called "ZideStore range" queries which are treated
122 similiar to BPROPFIND and catches URLs starting with _range.
129 - find a good way to represent arbitary reports
131 extended ops: ACL, CHECKOUT etc
133 - check for default property names (allprop) in SoClass slots
135 - add support for DAV:supportedlock property
137 - add support for property level 404 status
138 - currently we just deliver empty tags or none (if the brief header is set)
140 - add Apache2 like typing namespaces on DAV:creationdate and
148 <?xml version="1.0" encoding="utf-8" ?>
149 <D:searchrequest xmlns:D="DAV:">
151 <D:select><D:allprop/></D:select>
154 <D:href>/evo/dav/helge/Private.plist/</D:href>
155 <D:depth>infinity</D:depth>
160 <D:prop><D:sn/></D:prop>
161 <D:literal>Mueller</D:literal>
167 SQL-search queries use
168 <D:searchrequest><D:sql>
170 <D:searchrequest><D:basicsearch>