org.eclipse.ecf.presence
Interface IAccountManager


public interface IAccountManager

Presence account management interface. Access to instances implementing this interface is provided by calling IPresenceContainerAdapter.getAccountManager()

See Also:
IPresenceContainerAdapter.getAccountManager()

Method Summary
 boolean changePassword(java.lang.String newpassword)
          Change account password to use new password.
 boolean createAccount(java.lang.String username, java.lang.String password, java.util.Map attributes)
          Create a new account.
 boolean deleteAccount()
          Delete an account.
 java.lang.Object getAccountAttribute(java.lang.String attributeName)
          Get the value of given
 java.lang.String[] getAccountAttributeNames()
          Get account attribute names for this account
 java.lang.String getAccountCreationInstructions()
          Get any instructions for account
 boolean isAccountCreationSupported()
          Determine whether account creation is supported for this account manager
 

Method Detail

changePassword

boolean changePassword(java.lang.String newpassword)
                       throws ECFException
Change account password to use new password. Upon next authenticated login, new password will be required for accessing account

Parameters:
newpassword - new password to use for this account. Must not be null.
Returns:
true if password changed, false if not changed
Throws:
ECFException - thrown if not connected, or if password change fails due to network failure or server failure

isAccountCreationSupported

boolean isAccountCreationSupported()
                                   throws ECFException
Determine whether account creation is supported for this account manager

Returns:
true if account creation supported, false otherwise
Throws:
ECFException - thrown if not connected, or if query fails due to network failure or server failure

createAccount

boolean createAccount(java.lang.String username,
                      java.lang.String password,
                      java.util.Map attributes)
                      throws ECFException
Create a new account. Create a new account using given username, password, and attributes. If account creation succeeds, the method will return successfully. If fails, or is not supported, ECFException will be thrown

Parameters:
username - the fully qualified username to use for the new account. Must not be null.
password - the password to use with the new account. Must not be null.
attributes - attributes to associate with the new account. May be null.
Returns:
true if account created, false if not created
Throws:
ECFException - thrown if account creation is not supported, or if fails for some reason (network failure or server failure)

deleteAccount

boolean deleteAccount()
                      throws ECFException
Delete an account. Deletes this account. If successful deletion, the method will return successfully. If account deletion is not supported, network failure, or some server error then an ECFException will be thrown.

Returns:
true if account deleted, false if not deleted
Throws:
ECFException - thrown if account deletion is not supported, or if fails for some reason (network failure or server failure)

getAccountCreationInstructions

java.lang.String getAccountCreationInstructions()
                                                throws ECFException
Get any instructions for account

Returns:
instructions for account. May be null.
Throws:
ECFException - thrown if account account instructions not supported, or if fails for some reason (network failure or server failure)

getAccountAttributeNames

java.lang.String[] getAccountAttributeNames()
                                            throws ECFException
Get account attribute names for this account

Returns:
String[] attribute names. Will return empty array if no attribute names for account.
Throws:
ECFException - thrown if get account attribute names not supported, or if fails for some reason (network failure or server failure)

getAccountAttribute

java.lang.Object getAccountAttribute(java.lang.String attributeName)
                                     throws ECFException
Get the value of given

Parameters:
attributeName - the attribute name to return the value for. Should not be null.
Returns:
Object value for the given attribute. Will be null if attribute name is not found.
Throws:
ECFException - thrown if get account attribute not supported, or if fails for some reason (network failure or server failure)