com.openexchange.admin.storage.mysqlStorage
Class OXToolMySQLStorage

java.lang.Object
  extended by com.openexchange.admin.storage.interfaces.OXToolStorageInterface
      extended by com.openexchange.admin.storage.sqlStorage.OXToolSQLStorage
          extended by com.openexchange.admin.storage.mysqlStorage.OXToolMySQLStorage
All Implemented Interfaces:
OXMySQLDefaultValues

public class OXToolMySQLStorage
extends OXToolSQLStorage
implements OXMySQLDefaultValues

Author:
d7, cutmasta

Field Summary
 
Fields inherited from interface com.openexchange.admin.storage.mysqlStorage.OXMySQLDefaultValues
NOBODY, NOGROUP
 
Constructor Summary
OXToolMySQLStorage()
           
 
Method Summary
 boolean checkAndUpdateSchemaIfRequired(int contextId)
           
 void checkCreateUserData(Context ctx, User usr)
           
 void checkValidEmailsInUserObject(User usr)
           
 boolean domainInUse(Context ctx, String domain)
          Checks if given domain is used by any user,group or resource as mailaddress in given context.
 Group[] domainInUseByGroup(Context ctx, String domain)
          Checks if given domain is used as mail address of any group in given context.
 Resource[] domainInUseByResource(Context ctx, String domain)
          Checks if given domain is used as mail address of any resource in given context.
 User[] domainInUseByUser(Context ctx, String domain)
          Checks if given domain is used as alias or primary mail address of any user in given context.
 boolean existsContext(Context ctx)
          Although this method get's a context Object it will only look after the cid
 boolean existsContextLoginMappings(Context ctx)
           
 boolean existsContextLoginMappings(Context ctx, Connection configdb_connection)
           
 boolean existsContextName(Context ctx)
          Checks via context id and context name if it already exists.
 boolean existsContextName(String contextName)
          Checks if given context name already exists!Should be used in create method!
 boolean existsDatabase(int db_id)
           
 boolean existsDatabaseName(Database db)
          Checks via database id and database name if it already exists.
 boolean existsDatabaseName(String db_name)
          Checks if given name is already used!Should be used in create method!
 boolean existsDisplayName(Context ctx, User user)
          This method checks if the display name of the given user object is already used in for a system user.
 boolean existsGroup(Context ctx, Connection con, int id)
          This method can be used to check if some group exists in a context.
 boolean existsGroup(Context ctx, Group grp)
           
 boolean existsGroup(Context ctx, Group[] grps)
           
 boolean existsGroup(Context ctx, int gid)
           
 boolean existsGroup(Context ctx, int[] gids)
          Deprecated. Use method with User[] instead
 boolean existsGroupMember(Context ctx, int group_ID, int member_ID)
           
 boolean existsGroupMember(Context ctx, int group_ID, int[] user_ids)
           
 boolean existsGroupMember(Context ctx, int group_ID, User[] users)
           
 boolean existsGroupName(Context ctx, Group grp)
          Checks via group id and group name if it already exists in this context.
 boolean existsGroupName(Context ctx, String identifier)
          Checks if given name is already used for a group in given context.Should be used in create method!
 boolean existsReason(int rid)
           
 boolean existsReason(String reason)
           
 boolean existsResource(Context ctx, int resource_id)
           
 boolean existsResourceAddress(Context ctx, String address)
           
 boolean existsResourceAddress(Context ctx, String address, Integer resource_id)
           
 boolean existsResourceName(Context ctx, Resource res)
          Checks via resource id and resource name if it already exists.
 boolean existsResourceName(Context ctx, String identifier)
          Checks if given name is already used for resource in given context!Should be used in create method!
 boolean existsServer(int server_id)
           
 boolean existsServerID(int check_ID, String table, String field)
           
 boolean existsServerName(Server srv)
          Checks via server id and server name if it already exists.
 boolean existsServerName(String server_name)
          Checks if given name is already used!Should be used in create method!
 boolean existsStore(int store_id)
           
 boolean existsStore(String url)
           
 boolean existsUser(Context ctx, int uid)
           
 boolean existsUser(Context ctx, int[] user_ids)
           
 boolean existsUser(Context ctx, User user)
          A convenience method for a single user object.
 boolean existsUser(Context ctx, User[] users)
          This method will detect if a specified user exists.
 boolean existsUserName(Context ctx, String username)
          Checks if given name is already used for an user in given context.Should be used in create method!
 boolean existsUserName(Context ctx, User user)
          Checks via user id and user name if it already exists in this context.
 int getAdminForContext(Context ctx)
           
 int getAdminForContext(Context ctx, Connection con)
           
 int getContextIDByContextname(String ctxname)
           
 int getDatabaseIDByDatabasename(String dbname)
           
 int getDefaultGroupForContext(Context ctx, Connection con)
           
 int getDefaultGroupForContextWithOutConnection(Context ctx)
           
 int getGidNumberOfGroup(Context ctx, int group_id, Connection con)
          Gets the system's GID for specified group.
 int getGroupIDByGroupname(Context ctx, String groupname)
           
 String getGroupnameByGroupID(Context ctx, int group_id)
           
 int getResourceIDByResourcename(Context ctx, String resourcename)
           
 String getResourcenameByResourceID(Context ctx, int resource_id)
           
 int getServerIDByServername(String servername)
           
 int getUserIDByUsername(Context ctx, String username)
           
 String getUsernameByUserID(Context ctx, int user_id)
           
 boolean isContextAdmin(Context ctx, int user_id)
           
 boolean isContextAdmin(Context ctx, User user)
          This method determines if the user is the context admin.
 boolean isContextEnabled(Context ctx)
           
 boolean isMasterDatabase(int database_id)
           
 boolean isUserSettingMailBitSet(Context ctx, User user, int bit, Connection con)
           
 boolean poolInUse(int pool_id)
           
 void primaryMailExists(Context ctx, String mail)
           
 boolean schemaBeingLockedOrNeedsUpdate(int writePoolId, String schema)
           
 boolean serverInUse(int server_id)
           
 void setUserSettingMailBit(Context ctx, User user, int bit, Connection con)
           
 boolean storeInUse(int store_id)
           
 void unsetUserSettingMailBit(Context ctx, User user, int bit, Connection con)
           
 void validateUserName(String userName)
           
 
Methods inherited from class com.openexchange.admin.storage.interfaces.OXToolStorageInterface
checkAndUpdateSchemaIfRequired, getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXToolMySQLStorage

public OXToolMySQLStorage()
Method Detail

domainInUse

public boolean domainInUse(Context ctx,
                           String domain)
                    throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given domain is used by any user,group or resource as mailaddress in given context.

Specified by:
domainInUse in class OXToolStorageInterface
Returns:
Throws:
StorageException

domainInUseByGroup

public Group[] domainInUseByGroup(Context ctx,
                                  String domain)
Description copied from class: OXToolStorageInterface
Checks if given domain is used as mail address of any group in given context.

Specified by:
domainInUseByGroup in class OXToolStorageInterface
Returns:
Groups which use this domain.null if no group uses this domain.

domainInUseByResource

public Resource[] domainInUseByResource(Context ctx,
                                        String domain)
                                 throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given domain is used as mail address of any resource in given context.

Specified by:
domainInUseByResource in class OXToolStorageInterface
Returns:
Resources which use this domain. null if no resource uses this domain.
Throws:
StorageException

domainInUseByUser

public User[] domainInUseByUser(Context ctx,
                                String domain)
                         throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given domain is used as alias or primary mail address of any user in given context.

Specified by:
domainInUseByUser in class OXToolStorageInterface
Returns:
Users which use this domain. null if no user uses this domain.
Throws:
StorageException

existsContext

public boolean existsContext(Context ctx)
                      throws StorageException
Description copied from class: OXToolStorageInterface
Although this method get's a context Object it will only look after the cid

Specified by:
existsContext in class OXToolSQLStorage
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsContext(int)

existsContextLoginMappings

public boolean existsContextLoginMappings(Context ctx)
                                   throws StorageException
Specified by:
existsContextLoginMappings in class OXToolSQLStorage
Throws:
StorageException

existsContextLoginMappings

public boolean existsContextLoginMappings(Context ctx,
                                          Connection configdb_connection)
                                   throws StorageException
Specified by:
existsContextLoginMappings in class OXToolSQLStorage
Throws:
StorageException

existsDatabase

public boolean existsDatabase(int db_id)
                       throws StorageException
Specified by:
existsDatabase in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.existsDatabase(int)

existsDisplayName

public boolean existsDisplayName(Context ctx,
                                 User user)
                          throws StorageException
Description copied from class: OXToolStorageInterface
This method checks if the display name of the given user object is already used in for a system user. This method doesn't check for display names in the contacts of the users

Specified by:
existsDisplayName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsGroup

public boolean existsGroup(Context ctx,
                           Group[] grps)
                    throws StorageException
Specified by:
existsGroup in class OXToolStorageInterface
Throws:
StorageException

existsGroup

public boolean existsGroup(Context ctx,
                           Group grp)
                    throws StorageException
Specified by:
existsGroup in class OXToolStorageInterface
Throws:
StorageException

existsGroup

public boolean existsGroup(Context ctx,
                           int gid)
                    throws StorageException
Specified by:
existsGroup in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroup(int, int)

existsGroup

public boolean existsGroup(Context ctx,
                           Connection con,
                           int id)
                    throws StorageException
Description copied from class: OXToolStorageInterface
This method can be used to check if some group exists in a context. The connection is given to be able to check for groups that are not committed yet.

Specified by:
existsGroup in class OXToolStorageInterface
Parameters:
ctx - Context.
con - readable database connection.
id - unique identifier of the group.
Returns:
true if the group exists, false otherwise.
Throws:
StorageException - if some problem occurs executing the SQL statements.

existsGroup

@Deprecated
public boolean existsGroup(Context ctx,
                                      int[] gids)
                    throws StorageException
Deprecated. Use method with User[] instead

Specified by:
existsGroup in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroup(int, int[])

existsGroupMember

public boolean existsGroupMember(Context ctx,
                                 int group_ID,
                                 int member_ID)
                          throws StorageException
Specified by:
existsGroupMember in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupMember(int, int, int)

existsGroupMember

public boolean existsGroupMember(Context ctx,
                                 int group_ID,
                                 int[] user_ids)
                          throws StorageException
Specified by:
existsGroupMember in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupMember(int, int, int[])

existsGroupMember

public boolean existsGroupMember(Context ctx,
                                 int group_ID,
                                 User[] users)
                          throws StorageException
Specified by:
existsGroupMember in class OXToolStorageInterface
Throws:
StorageException

existsReason

public boolean existsReason(int rid)
                     throws StorageException
Specified by:
existsReason in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.existsReason(int)

existsReason

public boolean existsReason(String reason)
                     throws StorageException
Specified by:
existsReason in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.existsReason(java.lang.String)

existsResource

public boolean existsResource(Context ctx,
                              int resource_id)
                       throws StorageException
Specified by:
existsResource in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsResource(int, int)

existsResourceAddress

public boolean existsResourceAddress(Context ctx,
                                     String address)
                              throws StorageException
Specified by:
existsResourceAddress in class OXToolSQLStorage
Throws:
StorageException

existsResourceAddress

public boolean existsResourceAddress(Context ctx,
                                     String address,
                                     Integer resource_id)
                              throws StorageException
Specified by:
existsResourceAddress in class OXToolStorageInterface
Throws:
StorageException

existsServer

public boolean existsServer(int server_id)
                     throws StorageException
Specified by:
existsServer in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.existsServer(int)

existsServerID

public boolean existsServerID(int check_ID,
                              String table,
                              String field)
                       throws StorageException
Specified by:
existsServerID in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.existsServerID(int, java.lang.String, java.lang.String)

existsStore

public boolean existsStore(int store_id)
                    throws StorageException
Specified by:
existsStore in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.existsStore(int)

existsStore

public boolean existsStore(String url)
                    throws StorageException
Specified by:
existsStore in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.existsStore(java.lang.String)

existsUser

public boolean existsUser(Context ctx,
                          int uid)
                   throws StorageException
Specified by:
existsUser in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUser(int, int)

existsUser

public boolean existsUser(Context ctx,
                          int[] user_ids)
                   throws StorageException
Specified by:
existsUser in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUser(int, int[])

existsUser

public boolean existsUser(Context ctx,
                          User[] users)
                   throws StorageException
Description copied from class: OXToolStorageInterface
This method will detect if a specified user exists. It check this through the user id and the user name specified in the user object

Specified by:
existsUser in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsUser

public boolean existsUser(Context ctx,
                          User user)
                   throws StorageException
Description copied from class: OXToolStorageInterface
A convenience method for a single user object. See OXToolStorageInterface.existsUser(Context, User[])

Specified by:
existsUser in class OXToolStorageInterface
Returns:
Throws:
StorageException

getAdminForContext

public int getAdminForContext(Context ctx,
                              Connection con)
                       throws StorageException
Specified by:
getAdminForContext in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getAdminForContext(int, java.sql.Connection)

getAdminForContext

public int getAdminForContext(Context ctx)
                       throws StorageException
Specified by:
getAdminForContext in class OXToolStorageInterface
Throws:
StorageException

getContextIDByContextname

public int getContextIDByContextname(String ctxname)
                              throws StorageException
Specified by:
getContextIDByContextname in class OXToolStorageInterface
Throws:
StorageException

getDatabaseIDByDatabasename

public int getDatabaseIDByDatabasename(String dbname)
                                throws StorageException
Specified by:
getDatabaseIDByDatabasename in class OXToolStorageInterface
Throws:
StorageException

getDefaultGroupForContext

public int getDefaultGroupForContext(Context ctx,
                                     Connection con)
                              throws StorageException
Specified by:
getDefaultGroupForContext in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getDefaultGroupForContext(int, java.sql.Connection)

getDefaultGroupForContextWithOutConnection

public int getDefaultGroupForContextWithOutConnection(Context ctx)
                                               throws StorageException
Specified by:
getDefaultGroupForContextWithOutConnection in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getDefaultGroupForContext(int, java.sql.Connection)

getGidNumberOfGroup

public int getGidNumberOfGroup(Context ctx,
                               int group_id,
                               Connection con)
                        throws StorageException
Description copied from class: OXToolStorageInterface
Gets the system's GID for specified group.

Specified by:
getGidNumberOfGroup in class OXToolSQLStorage
Parameters:
ctx - The context
group_id - The group ID
con - A connection with at least read-only permission
Returns:
The system's GID for specified group or -1 if no GID is set.
Throws:
StorageException - If a storage error occurs or group does not exist

getGroupIDByGroupname

public int getGroupIDByGroupname(Context ctx,
                                 String groupname)
                          throws StorageException
Specified by:
getGroupIDByGroupname in class OXToolStorageInterface
Throws:
StorageException

getGroupnameByGroupID

public String getGroupnameByGroupID(Context ctx,
                                    int group_id)
                             throws StorageException
Specified by:
getGroupnameByGroupID in class OXToolStorageInterface
Throws:
StorageException

getResourceIDByResourcename

public int getResourceIDByResourcename(Context ctx,
                                       String resourcename)
                                throws StorageException
Specified by:
getResourceIDByResourcename in class OXToolStorageInterface
Throws:
StorageException

getResourcenameByResourceID

public String getResourcenameByResourceID(Context ctx,
                                          int resource_id)
                                   throws StorageException
Specified by:
getResourcenameByResourceID in class OXToolStorageInterface
Throws:
StorageException

getServerIDByServername

public int getServerIDByServername(String servername)
                            throws StorageException
Specified by:
getServerIDByServername in class OXToolStorageInterface
Throws:
StorageException

getUserIDByUsername

public int getUserIDByUsername(Context ctx,
                               String username)
                        throws StorageException
Specified by:
getUserIDByUsername in class OXToolStorageInterface
Throws:
StorageException

getUsernameByUserID

public String getUsernameByUserID(Context ctx,
                                  int user_id)
                           throws StorageException
Specified by:
getUsernameByUserID in class OXToolStorageInterface
Throws:
StorageException

isContextAdmin

public boolean isContextAdmin(Context ctx,
                              int user_id)
                       throws StorageException
Specified by:
isContextAdmin in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#isContextAdmin(int, int)

isContextAdmin

public boolean isContextAdmin(Context ctx,
                              User user)
                       throws StorageException
Description copied from class: OXToolStorageInterface
This method determines if the user is the context admin. Therefore either the user_id or the username have to be filled. Furthermore this methods sets the uid in the given user object to the correct value if the object contains the name only.

Specified by:
isContextAdmin in class OXToolStorageInterface
Returns:
Throws:
StorageException

isContextEnabled

public boolean isContextEnabled(Context ctx)
                         throws StorageException
Specified by:
isContextEnabled in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#isContextEnabled(int)

isMasterDatabase

public boolean isMasterDatabase(int database_id)
                         throws StorageException
Specified by:
isMasterDatabase in class OXToolSQLStorage
Throws:
StorageException
See Also:
OXToolStorageInterface.isMasterDatabase(int)

isUserSettingMailBitSet

public boolean isUserSettingMailBitSet(Context ctx,
                                       User user,
                                       int bit,
                                       Connection con)
                                throws StorageException
Specified by:
isUserSettingMailBitSet in class OXToolStorageInterface
Throws:
StorageException

poolInUse

public boolean poolInUse(int pool_id)
                  throws StorageException
Specified by:
poolInUse in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#poolInUse(long)

primaryMailExists

public void primaryMailExists(Context ctx,
                              String mail)
                       throws StorageException,
                              InvalidDataException
Specified by:
primaryMailExists in class OXToolStorageInterface
Throws:
StorageException
InvalidDataException

checkAndUpdateSchemaIfRequired

public boolean checkAndUpdateSchemaIfRequired(int contextId)
                                       throws StorageException
Specified by:
checkAndUpdateSchemaIfRequired in class OXToolStorageInterface
Throws:
StorageException

schemaBeingLockedOrNeedsUpdate

public boolean schemaBeingLockedOrNeedsUpdate(int writePoolId,
                                              String schema)
                                       throws StorageException
Specified by:
schemaBeingLockedOrNeedsUpdate in class OXToolStorageInterface
Throws:
StorageException

serverInUse

public boolean serverInUse(int server_id)
                    throws StorageException
Specified by:
serverInUse in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#serverInUse(long)

setUserSettingMailBit

public void setUserSettingMailBit(Context ctx,
                                  User user,
                                  int bit,
                                  Connection con)
                           throws StorageException
Specified by:
setUserSettingMailBit in class OXToolStorageInterface
Throws:
StorageException

storeInUse

public boolean storeInUse(int store_id)
                   throws StorageException
Specified by:
storeInUse in class OXToolSQLStorage
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#storeInUse(long)

unsetUserSettingMailBit

public void unsetUserSettingMailBit(Context ctx,
                                    User user,
                                    int bit,
                                    Connection con)
                             throws StorageException
Specified by:
unsetUserSettingMailBit in class OXToolStorageInterface
Throws:
StorageException

existsContextName

public boolean existsContextName(Context ctx)
                          throws StorageException
Description copied from class: OXToolStorageInterface
Checks via context id and context name if it already exists. Should be used in change method!

Specified by:
existsContextName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsContextName

public boolean existsContextName(String contextName)
                          throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given context name already exists!Should be used in create method!

Specified by:
existsContextName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsDatabaseName

public boolean existsDatabaseName(Database db)
                           throws StorageException
Description copied from class: OXToolStorageInterface
Checks via database id and database name if it already exists. Should be used in change method!

Specified by:
existsDatabaseName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsDatabaseName

public boolean existsDatabaseName(String db_name)
                           throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used!Should be used in create method!

Specified by:
existsDatabaseName in class OXToolSQLStorage
Returns:
Throws:
StorageException
See Also:
OXToolStorageInterface.existsDatabaseName(java.lang.String)

existsGroupName

public boolean existsGroupName(Context ctx,
                               Group grp)
                        throws StorageException
Description copied from class: OXToolStorageInterface
Checks via group id and group name if it already exists in this context. Should be used in change method!

Specified by:
existsGroupName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsGroupName

public boolean existsGroupName(Context ctx,
                               String identifier)
                        throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used for a group in given context.Should be used in create method!

Specified by:
existsGroupName in class OXToolSQLStorage
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupName(int, java.lang.String)

existsResourceName

public boolean existsResourceName(Context ctx,
                                  Resource res)
                           throws StorageException
Description copied from class: OXToolStorageInterface
Checks via resource id and resource name if it already exists. Should be used in change method!

Specified by:
existsResourceName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsResourceName

public boolean existsResourceName(Context ctx,
                                  String identifier)
                           throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used for resource in given context!Should be used in create method!

Specified by:
existsResourceName in class OXToolSQLStorage
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsResource(int, java.lang.String, int)

existsServerName

public boolean existsServerName(Server srv)
                         throws StorageException
Description copied from class: OXToolStorageInterface
Checks via server id and server name if it already exists. Should be used in change method!

Specified by:
existsServerName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsServerName

public boolean existsServerName(String server_name)
                         throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used!Should be used in create method!

Specified by:
existsServerName in class OXToolSQLStorage
Returns:
Throws:
StorageException
See Also:
OXToolStorageInterface.existsServerName(java.lang.String)

existsUserName

public boolean existsUserName(Context ctx,
                              User user)
                       throws StorageException
Description copied from class: OXToolStorageInterface
Checks via user id and user name if it already exists in this context. Should be used in change method!

Specified by:
existsUserName in class OXToolStorageInterface
Returns:
Throws:
StorageException

existsUserName

public boolean existsUserName(Context ctx,
                              String username)
                       throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used for an user in given context.Should be used in create method!

Specified by:
existsUserName in class OXToolSQLStorage
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUserName(int, java.lang.String)

checkCreateUserData

public void checkCreateUserData(Context ctx,
                                User usr)
                         throws InvalidDataException,
                                EnforceableDataObjectException,
                                StorageException
Specified by:
checkCreateUserData in class OXToolStorageInterface
Throws:
InvalidDataException
EnforceableDataObjectException
StorageException

validateUserName

public void validateUserName(String userName)
                      throws InvalidDataException
Specified by:
validateUserName in class OXToolStorageInterface
Throws:
InvalidDataException

checkValidEmailsInUserObject

public void checkValidEmailsInUserObject(User usr)
                                  throws InvalidDataException
Specified by:
checkValidEmailsInUserObject in class OXToolStorageInterface
Throws:
InvalidDataException