ch.tatool.app.service
Interface UserAccountService

All Known Implementing Classes:
UserAccountServiceImpl

public interface UserAccountService

Manages local user accounts.

Author:
Michael Ruflin

Method Summary
 void changePassword(UserAccount userAccount, String newPassword)
          Set the password for an account.
 void closeAccount(UserAccount account)
          Closes an opened account.
 UserAccount createAccount(String accountName, Map<String,String> userProperties, String password)
          Create a new user account using the provided information
 void deleteAccount(UserAccount account)
          Delete a user account.
 List<UserAccount.Info> getAccounts()
          Get a list of users accounts available.
 UserAccount loadAccount(UserAccount.Info info, String password)
          Open a user account, possibly given the user password.
 void saveAccount(UserAccount account)
          Saves an account.
 

Method Detail

getAccounts

List<UserAccount.Info> getAccounts()
Get a list of users accounts available.


loadAccount

UserAccount loadAccount(UserAccount.Info info,
                        String password)
Open a user account, possibly given the user password.

Parameters:
info - the info object for this account
password - the password if required - or null if not
Returns:
A UserAccount object

createAccount

UserAccount createAccount(String accountName,
                          Map<String,String> userProperties,
                          String password)
Create a new user account using the provided information


changePassword

void changePassword(UserAccount userAccount,
                    String newPassword)
Set the password for an account. This method requests an already loaded userAccount, the current password has therefore already been validated.


saveAccount

void saveAccount(UserAccount account)
Saves an account.


closeAccount

void closeAccount(UserAccount account)
Closes an opened account. This method should free all opened resources. Note: This method does NOT save the account data!


deleteAccount

void deleteAccount(UserAccount account)
Delete a user account.



Copyright © 2012. All Rights Reserved.