com.solidstategroup.webmail
Class AccountManager

java.lang.Object
  extended by com.solidstategroup.webmail.AccountManager

public class AccountManager
extends java.lang.Object

AccountManager


Field Summary
static int ERROR_EMAIL_TAKEN
           
static int ERROR_USER_ALREADY_HAS_ACCOUNT
           
static java.lang.String[] INVALID_USERNAME_STRING
           
 
Constructor Summary
AccountManager()
           
 
Method Summary
 int createAccount(WebUser user)
          Returns an error code or the accountId of the new account
 boolean emailAddressTaken(java.lang.String email)
           
 boolean isSuitable(java.lang.String username)
          Any rules for this? no @ sign, spaces, naughty words? etc
 boolean userHasAccount(User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_EMAIL_TAKEN

public static final int ERROR_EMAIL_TAKEN
See Also:
Constant Field Values

ERROR_USER_ALREADY_HAS_ACCOUNT

public static final int ERROR_USER_ALREADY_HAS_ACCOUNT
See Also:
Constant Field Values

INVALID_USERNAME_STRING

public static final java.lang.String[] INVALID_USERNAME_STRING
Constructor Detail

AccountManager

public AccountManager()
Method Detail

isSuitable

public boolean isSuitable(java.lang.String username)
Any rules for this? no @ sign, spaces, naughty words? etc


userHasAccount

public boolean userHasAccount(User user)

emailAddressTaken

public boolean emailAddressTaken(java.lang.String email)

createAccount

public int createAccount(WebUser user)
Returns an error code or the accountId of the new account