logo       

Re: OGOJOGI->Person.insertJob(): msg#00020

Subject: Re: OGOJOGI->Person.insertJob()
Christoph Guse wrote:

Hello List,

I'm trying to use the insertJob(Job job) method of the Person ogojogi class. Since I'm not a Java developer, I have difficulties with the Job argument because I don't know how to instantiate such a job. Job itself is a Interface, so Job job = new Job() doesn't work. If I try to use Job job = new XmlRpcJob(Date startDate, Date endDate, String name, XmlRpcCaller caller, OpenGroupWare ogo) this doen't work, because the constructor is protected and I don't have a caller instance and no ogo instance, because it is a brand new Job.


Jobs are managed via the JobManager, which has methods for inserting Jobs. This is handled this way to ensure
that you only get valid Job objects that actually exist on the OGO server;


You get the JobManager instance object from the OpenGroupWare object (see the http://ogo-jogi.sourceforge.net/doc/userguide.html) for an introduction on how to use JOGI and how to get the OpenGroupWare object);

Basically, you'd do something like:

XmlRpcCaller caller = new ApacheXmlRpcCaller("http://localhost:20001/RPC2";, "username", 
"password");
XmlRpcConnection conn = new XmlRpcConnection(caller);
OpenGroupWare ogo = conn.getOpenGroupWareInstance();
JobManager jobManager = ogo.getJobManager();
job.insert(.....); // put in your arguments for the job;



--

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

--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    politics.lenini...    audio.emagic.ex...    tex.texinfo.gen...    handhelds.linux...    ietf.sipping/20...    lang.erlang.gen...    cygwin.talk/200...    yellowdog.gener...    mozilla.devel.l...    xfree86.newbie/...    openbsd.ports/2...    db.oracle.devel...    kde.kalyxo.deve...    user-groups.lin...    bbc.cvs/2003-04...    gnu.libtool.bug...    redhat.k12osn/2...    emulators.wine....    freebsd.devel.d...    search.xapian.g...    java.izpack.use...    network.mrtg.us...    windows.total-c...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe