org.opengroupware.jogi.ogo
Interface AccountManager

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

public interface AccountManager
extends java.util.Observer

The AccountManager encapsulates the OGo functionality to manage user accounts. The AccountManager is an Observer and listens to notifications of the Account objects it has generated to call the update functions on OGo. All the Account objects are unique for a specific open Connection.

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

Method Summary
 void delete(Account account)
           
 void deleteByLogin(java.lang.String login)
           
 java.util.Iterator fetch(FetchSpecification spec)
          Fetches all Accounts that match the FetchSpecification.
 java.util.Iterator fetchIds(FetchSpecification spec)
           
 Account getById(java.lang.String Id)
           
 Account getByLogin(java.lang.String login)
          Returns the Account with the provided login name.
 Account getLoginAccount()
           
 Account insert(java.lang.String login)
          Creates a new Account and inserts in on the server.
 java.lang.String passwordForLogin(java.lang.String login)
          Returns the Password for a specific Account.
 
Methods inherited from interface java.util.Observer
update
 

Method Detail

fetchIds

public java.util.Iterator fetchIds(FetchSpecification spec)
                            throws OgoException,
                                   ConnectionException
Parameters:
spec - a FetchSpecification object holding the query
Returns:
an Iterator for accessing the returned Account objects OR null if something went wrong;
Throws:
OgoException
ConnectionException

getById

public Account getById(java.lang.String Id)
                throws OgoException,
                       ConnectionException
Parameters:
Id - the String representation of the unique Id of this Account record;
Returns:
the Account or null;
Throws:
OgoException
ConnectionException

deleteByLogin

public void deleteByLogin(java.lang.String login)
                   throws OgoException,
                          ConnectionException
Throws:
OgoException
ConnectionException

delete

public void delete(Account account)
            throws OgoException,
                   ConnectionException
Throws:
OgoException
ConnectionException

passwordForLogin

public java.lang.String passwordForLogin(java.lang.String login)
                                  throws OgoException,
                                         ConnectionException
Returns the Password for a specific Account. This only works for the root user.

Parameters:
login -
Returns:
the encrypted password, refer to the OpenGroupware.org documentation for details.
Throws:
OgoException
ConnectionException

getByLogin

public Account getByLogin(java.lang.String login)
                   throws OgoException,
                          ConnectionException
Returns the Account with the provided login name.

Returns:
the Account or null if no account by that name was found.
Throws:
OgoException
ConnectionException

fetch

public java.util.Iterator fetch(FetchSpecification spec)
                         throws OgoException,
                                ConnectionException
Fetches all Accounts that match the FetchSpecification.

Parameters:
spec - An FetchSpecification for selecting Accounts.
Returns:
an Iterator giving access to the resulting Accounts or null if no matching accounts were found.
Throws:
OgoException
ConnectionException

insert

public Account insert(java.lang.String login)
               throws OgoException,
                      ConnectionException
Creates a new Account and inserts in on the server. This is the only way to create an Account object.

Parameters:
login - the login name for the new Account, please refer to the OpenGroupware.org documentation for the constraints imposed on these names.
Returns:
the newly created Account
Throws:
OgoException
ConnectionException

getLoginAccount

public Account getLoginAccount()
                        throws OgoException,
                               ConnectionException
Returns:
the Account of the user that is used to log on to the server or null if something goes wrong;
Throws:
OgoException
ConnectionException


Copyright © 2003 ogojogi Project, All Rights Reserved.