org.opengroupware.jogi.connect.xmlrpc
Class XmlRpcResourceManager

java.lang.Object
  extended byorg.opengroupware.jogi.connect.xmlrpc.XmlRpcResourceManager
All Implemented Interfaces:
java.util.Observer, ResourceManager

public class XmlRpcResourceManager
extends java.lang.Object
implements ResourceManager

Author:
Werner Schuster (murphee)

Field Summary
protected  java.util.Map cached_resources_
           
static java.lang.String OGO_CALL_RESOURCE_CATEGORIES
           
static java.lang.String OGO_CALL_RESOURCE_DELETE
           
static java.lang.String OGO_CALL_RESOURCE_FETCH
           
static java.lang.String OGO_CALL_RESOURCE_GET_BY_ID
           
static java.lang.String OGO_CALL_RESOURCE_GET_BY_NAME
           
static java.lang.String OGO_CALL_RESOURCE_INSERT
           
static java.lang.String OGO_CALL_RESOURCE_UPDATE
           
protected  OpenGroupWare openGroupware_
           
 
Constructor Summary
XmlRpcResourceManager(XmlRpcCaller caller, OpenGroupWare ogo)
           
 
Method Summary
protected  XmlRpcResource createNewResource(java.util.Map content)
           
 boolean delete(Resource resource)
           
 java.util.Iterator fetch(FetchSpecification spec)
           
 java.util.List fetch(java.lang.String fspec)
           
 Resource getById(java.lang.String id)
           
 Resource getByName(java.lang.String name)
           
protected  XmlRpcResource getCachedResource(java.lang.Object obj)
           
 java.util.Iterator getCategories()
          Returns the names of all categories.
 java.util.Iterator getResourcesByCategory(java.lang.String category_name)
          Returns all Resources that are in the category with the name passed as argument.
 Resource insert(java.lang.String name, java.lang.String category)
           
protected  java.util.List prepareFetchResult(java.lang.Object res)
           
protected  XmlRpcResource receiveResource(java.lang.Object accTemp)
           
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OGO_CALL_RESOURCE_UPDATE

public static final java.lang.String OGO_CALL_RESOURCE_UPDATE
See Also:
Constant Field Values

OGO_CALL_RESOURCE_DELETE

public static final java.lang.String OGO_CALL_RESOURCE_DELETE
See Also:
Constant Field Values

OGO_CALL_RESOURCE_INSERT

public static final java.lang.String OGO_CALL_RESOURCE_INSERT
See Also:
Constant Field Values

OGO_CALL_RESOURCE_GET_BY_ID

public static final java.lang.String OGO_CALL_RESOURCE_GET_BY_ID
See Also:
Constant Field Values

OGO_CALL_RESOURCE_GET_BY_NAME

public static final java.lang.String OGO_CALL_RESOURCE_GET_BY_NAME
See Also:
Constant Field Values

OGO_CALL_RESOURCE_CATEGORIES

public static final java.lang.String OGO_CALL_RESOURCE_CATEGORIES
See Also:
Constant Field Values

OGO_CALL_RESOURCE_FETCH

public static final java.lang.String OGO_CALL_RESOURCE_FETCH
See Also:
Constant Field Values

cached_resources_

protected java.util.Map cached_resources_

openGroupware_

protected OpenGroupWare openGroupware_
Constructor Detail

XmlRpcResourceManager

public XmlRpcResourceManager(XmlRpcCaller caller,
                             OpenGroupWare ogo)
Method Detail

insert

public Resource insert(java.lang.String name,
                       java.lang.String category)
                throws OgoException,
                       ConnectionException
Specified by:
insert in interface ResourceManager
Throws:
OgoException
ConnectionException

getById

public Resource getById(java.lang.String id)
                 throws OgoException,
                        ConnectionException
Specified by:
getById in interface ResourceManager
Throws:
OgoException
ConnectionException

getByName

public Resource getByName(java.lang.String name)
                   throws OgoException,
                          ConnectionException
Specified by:
getByName in interface ResourceManager
Throws:
OgoException
ConnectionException

delete

public boolean delete(Resource resource)
               throws OgoException,
                      ConnectionException
Specified by:
delete in interface ResourceManager
Throws:
OgoException
ConnectionException

getCategories

public java.util.Iterator getCategories()
                                 throws OgoException,
                                        ConnectionException
Description copied from interface: ResourceManager
Returns the names of all categories.

Specified by:
getCategories in interface ResourceManager
Returns:
Iterator of Strings with the names of all categories.
Throws:
OgoException
ConnectionException

getResourcesByCategory

public java.util.Iterator getResourcesByCategory(java.lang.String category_name)
                                          throws OgoException,
                                                 ConnectionException
Description copied from interface: ResourceManager
Returns all Resources that are in the category with the name passed as argument.

Specified by:
getResourcesByCategory in interface ResourceManager
Parameters:
category_name -
Returns:
Iterator containing Resource objects.
Throws:
OgoException
ConnectionException

receiveResource

protected XmlRpcResource receiveResource(java.lang.Object accTemp)
                                  throws OgoException,
                                         ConnectionException
Throws:
OgoException
ConnectionException

getCachedResource

protected XmlRpcResource getCachedResource(java.lang.Object obj)
                                    throws OgoException,
                                           ConnectionException
Throws:
OgoException
ConnectionException

createNewResource

protected XmlRpcResource createNewResource(java.util.Map content)
                                    throws OgoException,
                                           ConnectionException
Throws:
OgoException
ConnectionException

fetch

public java.util.List fetch(java.lang.String fspec)
                     throws OgoException,
                            ConnectionException
Throws:
OgoException
ConnectionException

fetch

public java.util.Iterator fetch(FetchSpecification spec)
                         throws OgoException,
                                ConnectionException
Specified by:
fetch in interface ResourceManager
Throws:
OgoException
ConnectionException

prepareFetchResult

protected java.util.List prepareFetchResult(java.lang.Object res)
                                     throws OgoException,
                                            ConnectionException
Throws:
OgoException
ConnectionException

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer


Copyright © 2003 ogojogi Project, All Rights Reserved.