[OGo-Developer] ZideStore Folder Mapping Question

Adam Tauno Williams developer@opengroupware.org
Tue, 29 May 2007 14:52:26 -0400


--=-giJHF0N1ckCsvdJDooTE
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> > I got a favorites/ folder to appear,  I can see it, and enter it, via
> > both WDFS and cadaver.  But listing its contents reports it as empty
> > dav:/zidestore/so/awilliam/favorites/> ls
> > Listing collection `/zidestore/so/awilliam/favorites/': collection is
> > empty.
> And the PROPFIND result doesn't contain any responses?

You mean propnames?

dav:/zidestore/so/awilliam/favorites/> propnames .
Fetching property names `.': DAV: creationdate
 DAV: getcontentlength
 DAV: getlastmodified
 DAV: getetag
 DAV: resourcetype
 DAV: getcontenttype
 DAV: displayname
 DAV: href
 http://apache.org/dav/props/ executable
 succeeded.

dav:/zidestore/so/awilliam/favorites/> propget resourcetype
Fetching properties for `resourcetype': failed:
403 Forbidden
dav:/zidestore/so/awilliam/favorites/> propget getcontenttype
Fetching properties for `getcontenttype': failed:
403 Forbidden

> > I see that the "toManyRelationshipKeys" of my SxFavoritesFolder object
> > is call.
> ...
> > Which in other objects certainly looks like the method that returns =20
> > the
> > folders for an object/collection.
> Eg in SxProjectFolder.m a method is explicitly overridden:
>   - (NSEnumerator *)davChildKeysInContext:(id)_ctx

I added one of those
----------------------------------------------------------
- (NSArray *)toManyRelationshipKeys {
  static NSArray *keys =3D nil;
  [self debugWithFormat:@"my toManyRelationshipKeys"];
  if (keys =3D=3D nil) {
    keys =3D [[NSArray alloc] initWithObjects:
                              @"Contacts",
                              @"Enterprises",
                              nil];
    [self debugWithFormat:@"my toManyRelationshipKeys returning %@",
keys];
  }
  return keys;
}

- (NSEnumerator *)davChildKeysInContext:(id)_ctx {
  [self debugWithFormat:@"my davChildKeysInContext:"];
  return [[self toManyRelationshipKeys] objectEnumerator];
}

----------------------------------------------------------

and sure enough it gets invoked,  but still the folder appears empty
dav:/zidestore/so/awilliam/favorites/> ls
Listing collection `/zidestore/so/awilliam/favorites/': collection is
empty.
dav:/zidestore/so/awilliam/favorites/>=20

-----------------------------------------------------------
May 29 18:48:21 ogo-zidestore-1.5 [9974]: request is

PROPFIND /zidestore/so/awilliam/favorites/ HTTP/1.1
x-webobjects-server-protocol: HTTP/1.1
x-webobjects-remote-addr: 127.0.0.1
x-webobjects-remote-host: 127.0.0.1
x-webobjects-server-name: aleph.whitemice.org
x-webobjects-server-url: http://aleph.whitemice.org
Host: localhost
User-Agent: cadaver/0.22.3 neon/0.25.4
Connection: TE
TE: trailers
Depth: 1
Content-Length: 297
Content-Type: application/xml
Authorization: Basic YXdpbGxpYW06ZnJlZA=3D=3D

<?xml version=3D"1.0" encoding=3D"utf-8"?>
<propfind xmlns=3D"DAV:"><prop>
<getcontentlength xmlns=3D"DAV:"/>
<getlastmodified xmlns=3D"DAV:"/>
<executable xmlns=3D"http://apache.org/dav/props/"/>
<resourcetype xmlns=3D"DAV:"/>
<checked-in xmlns=3D"DAV:"/>
<checked-out xmlns=3D"DAV:"/>
</prop></propfind>

May 29 18:48:21 ogo-zidestore-1.5 [9974]: <|SxFavoritesFolder:favorites|
>D my davChildKeysInContext:
May 29 18:48:21 ogo-zidestore-1.5 [9974]: <|SxFavoritesFolder:favorites|
>D my toManyRelationshipKeys
May 29 18:48:21 ogo-zidestore-1.5 [9974]: <|SxFavoritesFolder:favorites|
>D my toManyRelationshipKeys returning (
    Contacts,
    Enterprises
)
May 29 18:48:21 ogo-zidestore-1.5 [9974]:
<0x0x83ae284[SoWebDAVRenderer]> got bogus port information from
webserver: aleph.whitemice.org
May 29 18:48:21 ogo-zidestore-1.5 [9974]: <|SxUserFolder:awilliam|>D
sleep: no open transactions to close.
May 29 18:48:21 ogo-zidestore-1.5 [9974]: response is

HTTP/1.0 207 Multi-Status
cache-control: no-cache
server: SOPE 4.6.4/WebDAV
content-length: 426
Ms-Author-Via: DAV
connection: close
X-Dav-Error: 200 No error
pragma: no-cache
content-type: text/xml; charset=3D"utf-8"
date: Tue, 29 May 2007 18:48:21 GMT

<?xml version=3D"1.0" encoding=3D"utf-8"?>
<D:multistatus xmlns:ap=3D"http://apache.org/dav/props/"
xmlns:D=3D"DAV:"><D:response><D:href>/zidestore/so/awilliam/favorites/</D:h=
ref><D:propstat><D:status>HTTP/1.1 200 OK</D:status><D:prop><D:getlastmodif=
ied>Tue, 29 May 2007 18:48:21 GMT</D:getlastmodified><ap:executable>0</ap:e=
xecutable><D:resourcetype><D:collection/></D:resourcetype></D:prop></D:prop=
stat></D:response></D:multistatus>
-----------------------------------------------------

> Though I would think that this is unnecessary.

I thought so,  since it pinged the other method anyway.

> >   My SxFavoritesFolder descends from
> > SxMailFolder as does the public folder [although the naming =20
> > conventions
> > in this part of the code seem pretty wierd:  MailFolder?]
> Those are folders exposed to Outlook, that is Mail folders ... Eg =20
> SxProjectFolder isn't a mail folder.

Ah.

> > davHasSubFolders  returns BOOL YES.


--=-giJHF0N1ckCsvdJDooTE
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBGXHZqLRePpNle04MRAgXhAJ4pKW7K1pqNN3RaBi7paw6R29mG8wCffNb4
noKjPPlWjRPIp/0qipy9KCk=
=FBTz
-----END PGP SIGNATURE-----

--=-giJHF0N1ckCsvdJDooTE--