com.funambol.email.console.manager
Class ConsoleManager

java.lang.Object
  extended by com.funambol.email.console.manager.ConsoleManager

public class ConsoleManager
extends java.lang.Object


Field Summary
protected  ConsoleDAO cdao
           
protected static com.funambol.server.tools.id.DBIDGenerator idMailServerSpace
           
protected static com.funambol.server.tools.id.DBIDGenerator idUserSpace
           
protected  com.funambol.framework.logging.FunambolLogger log
           
 
Constructor Summary
ConsoleManager()
           
 
Method Summary
 int checkAccount(MailServerAccount msa)
          check the account on the mail server ok = 0 invalid protocol = 1 invalid username or password = 2 cannection failed = 3
 int deletePubMailServer(java.lang.String mailServerId)
          delete mail server
 int deleteUser(java.lang.String accountID)
          delete user
 int disableUser(java.lang.String accountID)
          disable account
 int enableUser(java.lang.String accountID)
          enable account
 SyncItemInfoAdmin[] getCachedInfo(java.lang.String username, java.lang.String protocol)
          get the cached info for the specified username
 MailServer getPubMailServer(java.lang.String mailServerId)
          get public mail server
 MailServer[] getPubMailServers(com.funambol.framework.filter.Clause clause)
          get public mail servers
 MailServerAccount getUser(java.lang.String username)
          get user
 MailServerAccount getUserFromID(java.lang.String accountID)
          get user
 MailServerAccount[] getUsers(com.funambol.framework.filter.Clause clause)
          get users in the filter
 int insertPubMailServer(MailServer ms)
          insert public mail server configuration
 int insertUser(MailServerAccount msa)
          insert user and the mail server configuration
 int updatePubMailServer(MailServer ms)
          update public mail server
 int updateUser(MailServerAccount msa)
          update user regarding the mail server connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected com.funambol.framework.logging.FunambolLogger log

idMailServerSpace

protected static com.funambol.server.tools.id.DBIDGenerator idMailServerSpace

idUserSpace

protected static com.funambol.server.tools.id.DBIDGenerator idUserSpace

cdao

protected ConsoleDAO cdao
Constructor Detail

ConsoleManager

public ConsoleManager()
Method Detail

insertUser

public int insertUser(MailServerAccount msa)
               throws EntityException
insert user and the mail server configuration

Parameters:
msa - MailServerAccount
Returns:
int
Throws:
EntityException

deleteUser

public int deleteUser(java.lang.String accountID)
               throws EntityException
delete user

Parameters:
accountID - String
Returns:
int
Throws:
EntityException

disableUser

public int disableUser(java.lang.String accountID)
                throws EntityException
disable account

Parameters:
accountID - String
Returns:
int
Throws:
EntityException

enableUser

public int enableUser(java.lang.String accountID)
               throws EntityException
enable account

Parameters:
accountID - String
Returns:
int
Throws:
EntityException

updateUser

public int updateUser(MailServerAccount msa)
               throws EntityException
update user regarding the mail server connection

Parameters:
msa - MailServerAccount
Returns:
int
Throws:
EntityException

getUsers

public MailServerAccount[] getUsers(com.funambol.framework.filter.Clause clause)
                             throws EntityException
get users in the filter

Parameters:
clause - Clause
Returns:
list with all the user in the filter ArrayList
Throws:
EntityException

getUser

public MailServerAccount getUser(java.lang.String username)
                          throws EntityException
get user

Parameters:
username - String
Returns:
all the info about the user and the related mail server MailServerAccount
Throws:
EntityException

getUserFromID

public MailServerAccount getUserFromID(java.lang.String accountID)
                                throws EntityException
get user

Parameters:
accountID - String
Returns:
all the info about the user and the related mail server MailServerAccount
Throws:
EntityException

insertPubMailServer

public int insertPubMailServer(MailServer ms)
                        throws EntityException
insert public mail server configuration

Parameters:
ms - PublicMailServer
Returns:
int
Throws:
EntityException

deletePubMailServer

public int deletePubMailServer(java.lang.String mailServerId)
                        throws EntityException
delete mail server

Parameters:
mailServerId - String
Returns:
int
Throws:
EntityException

updatePubMailServer

public int updatePubMailServer(MailServer ms)
                        throws EntityException
update public mail server

Parameters:
ms - PublicMailServer
Returns:
int
Throws:
EntityException

getPubMailServers

public MailServer[] getPubMailServers(com.funambol.framework.filter.Clause clause)
                               throws EntityException
get public mail servers

Returns:
list with all the mail server in the filter ArrayList
Throws:
EntityException

getPubMailServer

public MailServer getPubMailServer(java.lang.String mailServerId)
                            throws EntityException
get public mail server

Parameters:
mailServerId - String
Returns:
all the info about the public mail server MailServer
Throws:
EntityException

getCachedInfo

public SyncItemInfoAdmin[] getCachedInfo(java.lang.String username,
                                         java.lang.String protocol)
                                  throws EntityException
get the cached info for the specified username

Parameters:
username - String
protocol - String
Returns:
array qith all the info
Throws:
EntityException

checkAccount

public int checkAccount(MailServerAccount msa)
                 throws EntityException
check the account on the mail server ok = 0 invalid protocol = 1 invalid username or password = 2 cannection failed = 3

Parameters:
msa - MailServerAccount
Returns:
true if the user is a mail server account boolean
Throws:
EntityException


Copyright © 2005-2006 Funambol.