org.opengroupware.jogi.ogo
Interface ContactManager

All Superinterfaces:
java.util.Observer
All Known Implementing Classes:
XmlRpcContactManager

public interface ContactManager
extends java.util.Observer

Holds all the contacts in the OGo database. This combines Person and Enterprise information, as they both are logically contacts.

Author:
Andreas Rath (teddius), Werner Schuster (murphee)

Method Summary
 void delete(Enterprise enterprise)
           
 void delete(Person person)
           
 java.util.Iterator fetchContacts(FetchSpecification fetch_spec)
          Fetches both Person and Enterprise records that match the FetchSpecification.
 java.lang.Object fetchEnterpriseMapId(int integer)
           
 java.util.Iterator fetchEnterprises(FetchSpecification fetch_spec)
          Fetches only Enterprise records that match the FetchSpecification.
 java.lang.Object fetchPersonMapId(int integer)
           
 java.util.Iterator fetchPersons(FetchSpecification fetch_spec)
          Fetches only Person records that match the FetchSpecification.
 Enterprise getEnterprise(int number)
           
 Enterprise getEnterprise(java.lang.String number)
           
 Enterprise getEnterpriseById(java.lang.String id)
           
 java.util.Iterator getEnterprises(java.util.Map attributes)
           
 java.util.Iterator getEnterprisesByAttributes(java.util.Map attributes)
          Gets the Iterator of a List of Enterprise objects that have the attributes contained in the attributes argument.
 Person getPersonById(java.lang.String id)
           
 Person getPersonByNumber(java.lang.String number)
           
 java.util.Iterator getPersonsByAttributes(java.util.Map attributes)
          Gets the Iterator of a List of Person objects that have the attributes contained in the attributes argument.
 Enterprise insertEnterprise(java.lang.String description)
           
 Person insertPerson(java.lang.String first_name, java.lang.String last_name)
           
 
Methods inherited from interface java.util.Observer
update
 

Method Detail

fetchContacts

public java.util.Iterator fetchContacts(FetchSpecification fetch_spec)
                                 throws OgoException,
                                        ConnectionException
Fetches both Person and Enterprise records that match the FetchSpecification.

Parameters:
fetch_spec - A FetchSpecification describing the contacts to fetch.
Returns:
an Iterator giving access to the resulting Contacts or null if no matching records were found.
Throws:
OgoException
ConnectionException
See Also:
FetchSpecification

fetchPersons

public java.util.Iterator fetchPersons(FetchSpecification fetch_spec)
                                throws OgoException,
                                       ConnectionException
Fetches only Person records that match the FetchSpecification.

Parameters:
fetch_spec - A FetchSpecification describing the contacts to fetch.
Returns:
an Iterator giving access to the resulting Person objects or null if no matching records were found.
Throws:
OgoException
ConnectionException
See Also:
FetchSpecification

fetchEnterprises

public java.util.Iterator fetchEnterprises(FetchSpecification fetch_spec)
                                    throws OgoException,
                                           ConnectionException
Fetches only Enterprise records that match the FetchSpecification.

Parameters:
fetch_spec - A FetchSpecification describing the contacts to fetch.
Returns:
an Iterator giving access to the resulting Enterprise objects or null if no matching records were found.
Throws:
OgoException
ConnectionException
See Also:
FetchSpecification

delete

public void delete(Enterprise enterprise)
            throws OgoException,
                   ConnectionException
Throws:
OgoException
ConnectionException

delete

public void delete(Person person)
            throws OgoException,
                   ConnectionException
Throws:
OgoException
ConnectionException

insertEnterprise

public Enterprise insertEnterprise(java.lang.String description)
                            throws OgoException,
                                   ConnectionException
Throws:
OgoException
ConnectionException

insertPerson

public Person insertPerson(java.lang.String first_name,
                           java.lang.String last_name)
                    throws OgoException,
                           ConnectionException
Throws:
OgoException
ConnectionException

fetchPersonMapId

public java.lang.Object fetchPersonMapId(int integer)
                                  throws OgoException,
                                         ConnectionException
Throws:
OgoException
ConnectionException

fetchEnterpriseMapId

public java.lang.Object fetchEnterpriseMapId(int integer)
                                      throws OgoException,
                                             ConnectionException
Throws:
OgoException
ConnectionException

getEnterpriseById

public Enterprise getEnterpriseById(java.lang.String id)
                             throws OgoException,
                                    ConnectionException
Throws:
OgoException
ConnectionException

getPersonById

public Person getPersonById(java.lang.String id)
                     throws OgoException,
                            ConnectionException
Throws:
OgoException
ConnectionException

getPersonByNumber

public Person getPersonByNumber(java.lang.String number)
                         throws OgoException,
                                ConnectionException
Throws:
OgoException
ConnectionException

getEnterprise

public Enterprise getEnterprise(int number)
                         throws OgoException,
                                ConnectionException
Throws:
OgoException
ConnectionException

getEnterprise

public Enterprise getEnterprise(java.lang.String number)
                         throws OgoException,
                                ConnectionException
Throws:
OgoException
ConnectionException

getEnterprises

public java.util.Iterator getEnterprises(java.util.Map attributes)
                                  throws OgoException,
                                         ConnectionException
Throws:
OgoException
ConnectionException

getPersonsByAttributes

public java.util.Iterator getPersonsByAttributes(java.util.Map attributes)
                                          throws OgoException,
                                                 ConnectionException
Gets the Iterator of a List of Person objects that have the attributes contained in the attributes argument.

Parameters:
attributes - a Map with key= name of attribute (eg name,...) and value=String for the value of the attribute;
Throws:
OgoException
ConnectionException

getEnterprisesByAttributes

public java.util.Iterator getEnterprisesByAttributes(java.util.Map attributes)
                                              throws OgoException,
                                                     ConnectionException
Gets the Iterator of a List of Enterprise objects that have the attributes contained in the attributes argument.

Parameters:
attributes - a Map with key= name of attribute (eg name,...) and value=String for the value of the attribute;
Throws:
OgoException
ConnectionException


Copyright © 2003 ogojogi Project, All Rights Reserved.