Re: ogojogi->job->set
"Werner Schuster (murphee)" <[email protected]>
| Newsgroups | gmane.comp.cms.opengroupware.xmlrpc.devel |
|---|---|
| Message-ID | <[email protected]> |
Christoph Guse wrote:
> Hi Helge,
>
> at a first glance I can't find the section in which JOGI calls the
> function "jobs.update". In my OGo XML-RPC documentation there is a
> function "updateJob" in the packet jobs. My idea is now to change JOGI
> so it calls "jobs.updateJob". Am I'm wrong? Where can I find
> "jobs.update"? I'm searching but can't find it.
It's in the org.opengroupware.jogi.connect.xmlrpc.XmlRpcJobManager
class, defined as JOB_MANAGER_JOB_UPDATE, which
is used in the
public void update(Observable o, Object arg)
method in the same class.
I looked at the code, and you could something like this (in the update
method):
List param = new Vector();
// New Code start:
XmlRpcPerson pers = (XmlRpcPerson)job.getCreator().getPerson();
param.add(new Hashtable(pers.getContent()));
// New Code end
param.add(jobDoc);
The jobs.updateJob function needs full Person object... but I'm not sure
which Person they want. I assume
it's the creator, but it might also be the Executor (in that case, adapt
code in the first new line with (XmlRpcPerson)job.getCreator().getPerson();
).
I haven't tested this code, so I don't know if this really works. If
you get this working, I'd appreciate it if you could send me the
working code (a patch or diff, or just the code you updated), so I could
incorporate these changes into the JOGI CVS HEAD.
murphee
--
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc