Home       Servicebereich  Projekte  Kontakt  

RPC::OGo


Download


NAME RPC::OGo - Access OpenGroupware.org data remote with xmlrpc


SYNOPSIS

    use Ogo;
    my $ogo = new RPC::OGo("rootpassword");


DESCRIPTION

The RPC::OGo module is the RPC::OGo base class. It handles the access to the OpenGroupware.org XMLRPC Server.


METHODS

RPC::OGo->new(<$password> || <\%settings>)

The constructor new() creates a new RPC::OGo object. This object will handle the connection to the XML-RPC Server. The constructor could be called in two ways. If only one parameter is given, this will be used as the password to connect the XML-RPC daemon as root on port 20001 at localhost.

Alternatively one can call it with the following settings

   password => use this password to connect (required)
   login    => use this login to connect (optional)
   host     => connect to this host (optional)
   port     => connect to this port (optional)

reconnect(<$password> || <\%settings>)

(Re)connect to the XML-RPC server with the given settings.

call($package,$method,@params)

This method will execute arbitrary OGo methods via XML-RPC. The parameter $domain represents the OGo package (see XML-RPC documentation) on which $method will called with the params in @params.

The response of the XML-RPC call will returned. To create an object of the response, one should use the method ``createObject''.

_call($method,@params)

This private method will be inherited from the subclasses. I calls $method with the on the corrrect XMLRPC RPC::OGo object and should only be used internal by RPC::OGo classes.

connection()

Returns the current RPC::OGo connection object which is an XMLRPC::Lite object.

fetchIds([$qualifier,[$strip]])

Fetches the Ids of all person with name match to the $qualifier. The qualifier can contain a asterisk charakter for wildcards. If $strip is a true value, the plain id will returned instead of the URI form. The XMLRPC API accepts both forms.

 Returns the list of Ids.

deleteByNumber($number)

Deletes the object with the number $number. Returns the deleted object.

getById([$id])

Fetches the document of the person with the id $id. Returns the RPC::OGo::Person object.

insert([$document])

Inserts the current object into the OGo database. The optional hashref or object $params could set or overwrite some of the attributes of the current object. Returns assigned document returned from OGo.

update([$document])

Updates the current object at the OGo database. The optional hashref or object $params could set or overwrite some of the attributes of the current object. Returns the updated document returned from OGo.


ATTRIBUTES

error

The error attribute contains the error number. It will be set by some methods. Error numbers are:

   0  - o.k.
  10  - XML-RPC call returns nothing.
  99  - XML-RPC remote error.


AUTHOR

Martin Werthmoeller <lt>mw@werthmoeller.de


COPYRIGHT

Copyright (C) 2003 Martin Werthmoeller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


SEE ALSO

perl


< zurück  | weiter >