README
1NGObjWeb WebDAV Implementation for SoObjects
2============================================
3
4This subproject contains a WebDAV implementation for SOPE which is based on top
5of the SoObjectRequestHandler.
6
7The central point where processing starts once the request is received by the
8handler, is the
9
10 SoObjectWebDAVDispatcher
11
12class. This class knows about the various WebDAV HTTP methods and takes
13appropriate actions by calling specified methods on either the SoObject which
14is targetted by the URL or on one of the maintenance objects. Eg WebDAV
15locking and notification is handled by the
16
17 SoDAVLockManager
18 SoSubscriptionManager
19
20classes, so the targetted object itself doesn't need to concern itself about
21that.
22
23Once a WebDAV action has been performed, the
24
25 SoWebDAVRenderer
26
27class is used to turn the result value of the HTTP method in a suitable WebDAV
28XML representation. To support non basic XML properties there is also a helper
29class
30
31 SoWebDAVValue
32
33
34PROPFIND/SEARCH Queries
35=======================
36
37The payload of both, WebDAV PROPFIND and SEARCH methods are represented as a
38regular EOControl EOFetchSpecification. The fetchspec is annotated with various
39hints to add additional WebDAV information. This includes the required depth
40of the query as well as the properties being requested.
41
42In case a SEARCH query is decoded, a regular EOQualifier/EOSortOrdering is
43used for representing that query.
44
45To perform a query, the layer will call:
46
47 - (id)performWebDAVQuery:(EOFetchSpecification *)_fetchSpecification
48 inContext:(WOContext *)_context;
49
50on the target object.
51
52Note that there are default implementations for queries based on KVC
53(see below)
54
55
56A special feature is that an object can make the WebDAV layer "remap" the
57public WebDAV property names to internal names, for example KVC keys. To do so
58the object needs to implement
59
60 - (NSDictionary *)davAttributeMapInContext:(WOContext *)_context;
61
62For example this can be used to map the "davDisplayName" to the "title" of a
63given object.
64
65
66Default Query Implementation
67============================
68
69The default implementation is done in the NSObject(SoDAVQuery) category which
70requires an NSObject conforming to the "So" model of doing things. A query is
71initiated by
72
73 - (id)performWebDAVQuery:(EOFetchSpecification *)_fetchSpecification
74 inContext:(WOContext *)_context;
75
76The method then splits the operation based on the depth into one of those
77methods for 'self'(0) or 'deep'(infinity) queries:
78
79 - (id)davQueryOnSelf:(EOFetchSpecification *)_fs inContext:(WOContext *)_ctx;
80 - (id)performWebDAVDeepQuery:((EOFetchSpecification *)_fs
81 inContext:(WOContext *)_ctx;
82
83For '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
86datasource is determined by
87
88 - (EODataSource *)contentDataSourceInContext:(WOContext *)_context;
89
90Per default this returns the SoObjectDataSource which performs KVC / EOControl
91based filtering and sorting.
92
93Besides those standard queries, the default implementations also deals with
94bulk queries as generated by either BPROPFIND or by the _range_ URI hack for
95ZideLook. Those will call
96
97 - (id)performWebDAVBulkQuery:(EOFetchSpecification *)_fetchSpec
98 inContext:(WOContext *)_context;
99
100Its discouraged to use bulk queries, since they are non-standard.
101
102
103In case no specific property names are requested (<allprop/> or a propfind
104without a body), the toolkit is going to query the available property set
105using:
106
107 - (NSArray *)defaultWebDAVPropertyNamesInContext:(WOContext *)_context;
108 TODO: check for soClass slots
109
110Note that this is just the set used for allprop queries, you can still support
111more properties than that (not sure whether that would be valid WebDAV though).
112
113
114
115Special Features
116================
117
118The dispatcher supports various Exchange WebDAV enhancements, eg bulk queries
119like BPROPFIND.
120
121Further it supports so called "ZideStore range" queries which are treated
122similar to BPROPFIND and catches URLs starting with _range.
123
124
125TODO
126====
127
128REPORT
129- find a good way to represent arbitary reports
130
131extended ops: ACL, CHECKOUT etc
132
133- check for default property names (allprop) in SoClass slots
134
135- add support for DAV:supportedlock property
136
137- add support for property level 404 status
138 - currently we just deliver empty tags or none (if the brief header is set)
139
140- add Apache2 like typing namespaces on DAV:creationdate and
141 DAV:getlastmodified
142
143Notes
144=====
145
146DASL:
147 ---snip---
148 <?xml version="1.0" encoding="utf-8" ?>
149 <D:searchrequest xmlns:D="DAV:">
150 <D:basicsearch>
151 <D:select><D:allprop/></D:select>
152 <D:from>
153 <D:scope>
154 <D:href>/evo/dav/helge/Private.plist/</D:href>
155 <D:depth>infinity</D:depth>
156 </D:scope>
157 </D:from>
158 <D:where>
159 <D:eq>
160 <D:prop><D:sn/></D:prop>
161 <D:literal>Mueller</D:literal>
162 </D:eq>
163 </D:where>
164 </D:basicsearch>
165 </D:searchrequest>
166 ---snap---
167 SQL-search queries use
168 <D:searchrequest><D:sql>
169 instead of
170 <D:searchrequest><D:basicsearch>
171