|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opengroupware.jogi.connect.xmlrpc.XmlRpcAccountManager
Field Summary | |
protected java.util.Map |
cached_accounts_
This stores all the accounts that have ever been loaded or generated. |
static java.lang.String |
OGO_CALL_ACCOUNT_DELETE
|
static java.lang.String |
OGO_CALL_ACCOUNT_DELETE_BY_LOGIN
|
static java.lang.String |
OGO_CALL_ACCOUNT_DELETE_BY_NUMBER
|
static java.lang.String |
OGO_CALL_ACCOUNT_FETCH
|
static java.lang.String |
OGO_CALL_ACCOUNT_FETCH_IDS
|
static java.lang.String |
OGO_CALL_ACCOUNT_GET_BY_ID
|
static java.lang.String |
OGO_CALL_ACCOUNT_GET_BY_LOGIN
|
static java.lang.String |
OGO_CALL_ACCOUNT_GET_BY_NUMBER
|
static java.lang.String |
OGO_CALL_ACCOUNT_GET_LOGIN_ACCOUNT
|
static java.lang.String |
OGO_CALL_ACCOUNT_INSERT
|
static java.lang.String |
OGO_CALL_ACCOUNT_PASSWORD_FOR_LOGIN
|
static java.lang.String |
OGO_CALL_ACCOUNT_UPDATE
|
protected OpenGroupWare |
openGroupware_
|
Constructor Summary | |
XmlRpcAccountManager(XmlRpcCaller caller)
|
|
XmlRpcAccountManager(XmlRpcCaller caller,
OpenGroupWare ogo)
|
Method Summary | |
void |
commitUpdate()
|
protected XmlRpcAccount |
createNewAccount(java.util.Map content)
Creates a new XmlRpcAccount from a Map . |
void |
delete(Account account)
|
void |
deleteByLogin(java.lang.String login)
|
void |
deleteByNumber(java.lang.String number)
Deletes an account by a number. |
java.util.Iterator |
fetch(FetchSpecification spec)
Fetches all Accounts that match the FetchSpecification . |
java.util.Iterator |
fetchIds(FetchSpecification spec)
|
java.util.List |
getAllTemplateUserLogins()
|
Account |
getById(java.lang.String id)
This method returns the Account associated by this id . |
Account |
getByLogin(java.lang.String login)
Returns the Account with the provided login name. |
Account |
getByNumber(java.lang.String account_number)
|
protected XmlRpcAccount |
getCachedAccount(java.lang.Object obj)
This method takes the return value of an XML-RPC call and looks up the object which represents this id in the cache. |
Account |
getLoginAccount()
|
java.util.List |
getTeamsForLogin(java.lang.String login)
|
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. |
protected XmlRpcAccount |
receiveAccount(java.lang.Object accTemp)
This takes the return value of an XML-RPC call, and if that is an Account it either updates the cached version of it or creates a new one. |
void |
update(java.util.Observable o,
java.lang.Object arg)
Updates an object and synchronizes it with the OpengroupWare server |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String OGO_CALL_ACCOUNT_UPDATE
public static final java.lang.String OGO_CALL_ACCOUNT_DELETE
public static final java.lang.String OGO_CALL_ACCOUNT_INSERT
public static final java.lang.String OGO_CALL_ACCOUNT_GET_LOGIN_ACCOUNT
public static final java.lang.String OGO_CALL_ACCOUNT_GET_BY_LOGIN
public static final java.lang.String OGO_CALL_ACCOUNT_DELETE_BY_LOGIN
public static final java.lang.String OGO_CALL_ACCOUNT_DELETE_BY_NUMBER
public static final java.lang.String OGO_CALL_ACCOUNT_PASSWORD_FOR_LOGIN
public static final java.lang.String OGO_CALL_ACCOUNT_FETCH
public static final java.lang.String OGO_CALL_ACCOUNT_FETCH_IDS
public static final java.lang.String OGO_CALL_ACCOUNT_GET_BY_ID
public static final java.lang.String OGO_CALL_ACCOUNT_GET_BY_NUMBER
protected java.util.Map cached_accounts_
protected OpenGroupWare openGroupware_
Constructor Detail |
public XmlRpcAccountManager(XmlRpcCaller caller, OpenGroupWare ogo)
public XmlRpcAccountManager(XmlRpcCaller caller)
Method Detail |
public Account getByNumber(java.lang.String account_number) throws OgoException, ConnectionException
OgoException
ConnectionException
public java.util.Iterator fetchIds(FetchSpecification spec) throws OgoException, ConnectionException
fetchIds
in interface AccountManager
spec
- a FetchSpecification object holding the query
OgoException
ConnectionException
public Account getById(java.lang.String id) throws OgoException, ConnectionException
id
.
For example if you want to receive the Account with the OpengroupWare
id
skyrix://skyrix.com/sx_skyrix/122282you must supply the numeric part as argument to the method call. In the example above the correct argument to receive the account would be
122282
getById
in interface AccountManager
id
- The numeric Part of the OpengroupWare id
.
Account
Object
for this id
OgoException
ConnectionException
public void deleteByNumber(java.lang.String number) throws OgoException, ConnectionException
OgoException
ConnectionException
public void deleteByLogin(java.lang.String login) throws OgoException, ConnectionException
deleteByLogin
in interface AccountManager
OgoException
ConnectionException
public void delete(Account account) throws OgoException, ConnectionException
delete
in interface AccountManager
OgoException
ConnectionException
public java.lang.String passwordForLogin(java.lang.String login) throws OgoException, ConnectionException
AccountManager
passwordForLogin
in interface AccountManager
login
-
OgoException
ConnectionException
public java.util.List getTeamsForLogin(java.lang.String login) throws OgoException, ConnectionException
OgoException
ConnectionException
public Account getByLogin(java.lang.String login) throws OgoException, ConnectionException
AccountManager
getByLogin
in interface AccountManager
OgoException
ConnectionException
public java.util.Iterator fetch(FetchSpecification spec) throws OgoException, ConnectionException
AccountManager
FetchSpecification
.
fetch
in interface AccountManager
spec
- An FetchSpecification for selecting Accounts.
OgoException
ConnectionException
public Account insert(java.lang.String login) throws OgoException, ConnectionException
AccountManager
insert
in interface AccountManager
login
- the login name for the new Account, please refer to the OpenGroupware.org
documentation for the constraints imposed on these names.
OgoException
ConnectionException
public void commitUpdate() throws OgoException, ConnectionException
OgoException
ConnectionException
public java.util.List getAllTemplateUserLogins() throws OgoException, ConnectionException
OgoException
ConnectionException
public Account getLoginAccount() throws OgoException, ConnectionException
getLoginAccount
in interface AccountManager
OgoException
ConnectionException
protected XmlRpcAccount receiveAccount(java.lang.Object accTemp) throws OgoException, ConnectionException
accTemp
- The object returned by an XML-RPC call.
OgoException
ConnectionException
protected XmlRpcAccount getCachedAccount(java.lang.Object obj)
id
in the cache. If the
object exists in the cache the cached Object will be returned. If
the object is not in the cache null
will be returned.
obj
- The result of an XML-RPC Call.
XmlRpcAccount
object or null
if no object exists in the cache.protected XmlRpcAccount createNewAccount(java.util.Map content) throws OgoException, ConnectionException
XmlRpcAccount
from a Map
.
content
- The Map
containing the data from
which a new XmlRpcAccount
should be created.
XmlRpcAccount
with its values initalized from the Map
.
OgoException
ConnectionException
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
o
- An observable.arg
- The object which should be updated.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |