[OGo-XML-RPC] Resources and appointments

Adam Tauno Williams xmlrpc@opengroupware.org
Wed, 16 Aug 2006 10:00:06 -0400


> > I'm the author of the patch. 
> Thanks for work work!
> > FYI, the example in bugzilla is wrong.  The
> > example says:
> > server.appointment.setResources("25730",  [ "25810", "25830"]);
> >  - but in fact you want to call it with the actual resource names, like:
> > server.appointment.setResources("25730",  [ "North Conference Room",
> > "Video Projector 3"]);
> >
> > I'd *assumed* that the resource list stored objectIds like the write
> > list field,  but it appears to actually store resource names.
> That's good to know.
> Is there a possibility that the behaviour could be changed to
> server.appointment.setResources("25730",  [ "25810", "25830"]);

Yes;  a patch to do that is on my ToDo list.

If contents is a number like -
server.appointment.setResources("25730",  [25810, 25830]);
- assume it is a pkey/objectId, retrieve the corresponding
appointmentResource(s) by id (appointmentresource::get-by-global-id /
LSGetResourcesForGlobalIDs) store their names in the appointment.

If contents s a string -
server.appointment.setResources("25730",  [ "North Conference Room"]);
- then assume it is a resource name and store it directly, currently
with no validation.

I might be able to get that out today;  but when/if it is accepted into
Trunk is up to Helge.

Going the other way - resource name to id - doesn't seem to have a
specific command, which means I have to do a search.  And I'm still a
bit bewildered by the EOFetchSpec/extended-search thing.

> Because I like it more to have object ids to deal with, than a
> changeable plaintext argument.

Yep.  I've got the same issue.  My code tosses around triples like
"Document/{entityName}/{objectId}" as a way to abstractly refer to any
OGo document/object.  So I'm trying to clean up what I can within
xmlrpcd.

> I'm not that much into Objective-C, so it is not a quick job for me to
> check the possiblities.

Me neither!  But I'm learning. :)