Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
XMPPAccountStore (IPreferenceStore preferenceStore, ISecurePreferences securePreferenceStore) | |
synchronized List< XMPPAccount > | getAllAccounts () |
synchronized List< String > | getDomains () |
synchronized List< String > | getServers () |
synchronized void | setAccountActive (XMPPAccount account) |
synchronized void | deleteAccount (XMPPAccount account) |
synchronized XMPPAccount | createAccount (String username, String password, String domain, String server, int port, boolean useTLS, boolean useSASL) |
synchronized void | changeAccountData (XMPPAccount account, String username, String password, String domain, String server, int port, boolean useTLS, boolean useSASL) |
synchronized XMPPAccount | getActiveAccount () |
synchronized boolean | isEmpty () |
synchronized boolean | exists (String username, String domain, String server, int port) |
Class for the management of multiple XMPP accounts in Saros.
de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.XMPPAccountStore | ( | IPreferenceStore | preferenceStore, |
ISecurePreferences | securePreferenceStore | ||
) |
synchronized void de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.changeAccountData | ( | XMPPAccount | account, |
String | username, | ||
String | password, | ||
String | domain, | ||
String | server, | ||
int | port, | ||
boolean | useTLS, | ||
boolean | useSASL | ||
) |
Changes the properties of an account.
username | the new user name |
password | the new password |
domain | the domain name of the server |
server | the server ip / name |
port | the port of the server |
useTLS | if the connection should be secured using TLS |
useSASL | if the authentication should be negotiated using SASL |
IllegalArgumentException | if username or domain string is empty or only contains whitespace characters if the domain or server contains upper case characters if the port value is not in range of 0 <= x <= 65535 if the server string is not empty and the port is 0 if an account already exists with the given username, password, domain, server and port |
synchronized XMPPAccount de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.createAccount | ( | String | username, |
String | password, | ||
String | domain, | ||
String | server, | ||
int | port, | ||
boolean | useTLS, | ||
boolean | useSASL | ||
) |
Creates an account. The account will automatically become active if the account store is empty.
username | the user name of the new account as lower case string |
password | the password of the new account. |
domain | the domain name of the server |
server | the server of the new account as lower case string or an empty string if not used |
port | the port of the server or 0 if not used |
useTLS | if the connection should be secured using TLS |
useSASL | if the authentication should be negotiated using SASL |
NullPointerException | if username, password, domain or server is null |
IllegalArgumentException | if username or domain string is empty or only contains whitespace characters if the domain or server contains upper case characters if the port value is not in range of 0 < x <= 65535 if the server string is not empty and the port is 0 if an account already exists with the given username, password, domain, server and port |
synchronized void de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.deleteAccount | ( | XMPPAccount | account | ) |
Deletes an account.
account | the account to delete |
IllegalArgumentException | if the account is not found in the store |
IllegalStateException | if the account is active |
synchronized boolean de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.exists | ( | String | username, |
String | domain, | ||
String | server, | ||
int | port | ||
) |
Checks if the an account with the given arguments exists in the account store
username | the username |
domain | the domain name of the server |
server | the server ip / name |
port | the port of the server |
true if such an account exists, false
otherwise
synchronized XMPPAccount de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.getActiveAccount | ( | ) |
Returns the current active account.
IllegalStateException | if the account store is empty |
synchronized List<XMPPAccount> de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.getAllAccounts | ( | ) |
Returns a list containing all accounts.
synchronized List<String> de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.getDomains | ( | ) |
Returns a list of all used domains.
Example:
If the XMPPAccountStore contains users
the server list contains
synchronized List<String> de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.getServers | ( | ) |
Returns a list of all used servers.
Example:
If the XMPPAccountStore contains users
the server list contains
synchronized boolean de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.isEmpty | ( | ) |
Returns if the account store is currently empty
true
if the account store is empty, false
otherwise synchronized void de.fu_berlin.inf.dpp.accountManagement.XMPPAccountStore.setAccountActive | ( | XMPPAccount | account | ) |
Makes the given account active.
account | the account to activate |
IllegalArgumentException | if the account is not found in the store |