Re: OGOJOGI: job.getHistory()

"murphee (Werner Schuster)" <[email protected]>
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christoph Guse wrote:
| I tried to use job.getHistory() in the job class. I extended XmlRpcJob
| so the remote method jobs.getHistory() is called. I get values from the
| OGo-Server:

How did you do this? I mean, how does your call look like?


| Unfortunately I'm not able to put the methodResponse in an object like
| History, because I don't fully understand how OGOJOGI put the XML result
| in an object.

Well... if you do something like
caller.invoke(....)
~ (where "caller" is an object of type XmlRpcCaller) you'll get back a
Map (or a Hashtable), holding the result from OG.o (the XmlRpc Struct
type is put into a Map/Hashtable).
JOGI uses a XmlRpcBaseDocument (or something like that) as an aid for
this, ie. classes like Person, ... (which map to an OG.o document, which
are returned as XmlRpc structs) are derived from XmlRpcBasedocument.

Depends on what you want to do, you could simply have your Job
getHistory() return a List of ... I don't know, Maps that hold the Job
information. This is a solution if the History information is read only,
and you don't want to allow the users to modify the contents.
A cleaner way would be to create a History object that hides the
internals and provided methods to access the information.

murphee
- --
Werner Schuster (murphee)
Student of SoftwareEngineering and KnowledgeManagement
Maintainer of the OGO-JOGI Project @ http://ogo-jogi.sourceforge.net/
Blog @ http://jroller.com/page/murphee
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCX+FOgLjXNIXpN6MRAsW7AKCBHsgmqRXQs0eKeJH6WfP2Gz2qLACdGJSt
RYf6riTFKFLzRrHCnDPlOCI=
=R2r/
-----END PGP SIGNATURE-----
-- 
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.