|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.openexchange.admin.storage.interfaces.OXToolStorageInterface
com.openexchange.admin.storage.sqlStorage.OXToolSQLStorage
com.openexchange.admin.storage.mysqlStorage.OXToolMySQLStorage
public class OXToolMySQLStorage
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 |
---|
public OXToolMySQLStorage()
Method Detail |
---|
public boolean domainInUse(Context ctx, String domain) throws StorageException
OXToolStorageInterface
domainInUse
in class OXToolStorageInterface
StorageException
public Group[] domainInUseByGroup(Context ctx, String domain)
OXToolStorageInterface
domainInUseByGroup
in class OXToolStorageInterface
public Resource[] domainInUseByResource(Context ctx, String domain) throws StorageException
OXToolStorageInterface
domainInUseByResource
in class OXToolStorageInterface
StorageException
public User[] domainInUseByUser(Context ctx, String domain) throws StorageException
OXToolStorageInterface
domainInUseByUser
in class OXToolStorageInterface
StorageException
public boolean existsContext(Context ctx) throws StorageException
OXToolStorageInterface
existsContext
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsContext(int)
public boolean existsContextLoginMappings(Context ctx) throws StorageException
existsContextLoginMappings
in class OXToolSQLStorage
StorageException
public boolean existsContextLoginMappings(Context ctx, Connection configdb_connection) throws StorageException
existsContextLoginMappings
in class OXToolSQLStorage
StorageException
public boolean existsDatabase(int db_id) throws StorageException
existsDatabase
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsDatabase(int)
public boolean existsDisplayName(Context ctx, User user) throws StorageException
OXToolStorageInterface
existsDisplayName
in class OXToolStorageInterface
StorageException
public boolean existsGroup(Context ctx, Group[] grps) throws StorageException
existsGroup
in class OXToolStorageInterface
StorageException
public boolean existsGroup(Context ctx, Group grp) throws StorageException
existsGroup
in class OXToolStorageInterface
StorageException
public boolean existsGroup(Context ctx, int gid) throws StorageException
existsGroup
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroup(int,
int)
public boolean existsGroup(Context ctx, Connection con, int id) throws StorageException
OXToolStorageInterface
existsGroup
in class OXToolStorageInterface
ctx
- Context.con
- readable database connection.id
- unique identifier of the group.
true
if the group exists, false
otherwise.
StorageException
- if some problem occurs executing the SQL statements.@Deprecated public boolean existsGroup(Context ctx, int[] gids) throws StorageException
existsGroup
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroup(int,
int[])
public boolean existsGroupMember(Context ctx, int group_ID, int member_ID) throws StorageException
existsGroupMember
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupMember(int,
int, int)
public boolean existsGroupMember(Context ctx, int group_ID, int[] user_ids) throws StorageException
existsGroupMember
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupMember(int,
int, int[])
public boolean existsGroupMember(Context ctx, int group_ID, User[] users) throws StorageException
existsGroupMember
in class OXToolStorageInterface
StorageException
public boolean existsReason(int rid) throws StorageException
existsReason
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsReason(int)
public boolean existsReason(String reason) throws StorageException
existsReason
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsReason(java.lang.String)
public boolean existsResource(Context ctx, int resource_id) throws StorageException
existsResource
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsResource(int,
int)
public boolean existsResourceAddress(Context ctx, String address) throws StorageException
existsResourceAddress
in class OXToolSQLStorage
StorageException
public boolean existsResourceAddress(Context ctx, String address, Integer resource_id) throws StorageException
existsResourceAddress
in class OXToolStorageInterface
StorageException
public boolean existsServer(int server_id) throws StorageException
existsServer
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsServer(int)
public boolean existsServerID(int check_ID, String table, String field) throws StorageException
existsServerID
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsServerID(int,
java.lang.String, java.lang.String)
public boolean existsStore(int store_id) throws StorageException
existsStore
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsStore(int)
public boolean existsStore(String url) throws StorageException
existsStore
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsStore(java.lang.String)
public boolean existsUser(Context ctx, int uid) throws StorageException
existsUser
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUser(int,
int)
public boolean existsUser(Context ctx, int[] user_ids) throws StorageException
existsUser
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUser(int,
int[])
public boolean existsUser(Context ctx, User[] users) throws StorageException
OXToolStorageInterface
existsUser
in class OXToolStorageInterface
StorageException
public boolean existsUser(Context ctx, User user) throws StorageException
OXToolStorageInterface
OXToolStorageInterface.existsUser(Context, User[])
existsUser
in class OXToolStorageInterface
StorageException
public int getAdminForContext(Context ctx, Connection con) throws StorageException
getAdminForContext
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getAdminForContext(int,
java.sql.Connection)
public int getAdminForContext(Context ctx) throws StorageException
getAdminForContext
in class OXToolStorageInterface
StorageException
public int getContextIDByContextname(String ctxname) throws StorageException
getContextIDByContextname
in class OXToolStorageInterface
StorageException
public int getDatabaseIDByDatabasename(String dbname) throws StorageException
getDatabaseIDByDatabasename
in class OXToolStorageInterface
StorageException
public int getDefaultGroupForContext(Context ctx, Connection con) throws StorageException
getDefaultGroupForContext
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getDefaultGroupForContext(int,
java.sql.Connection)
public int getDefaultGroupForContextWithOutConnection(Context ctx) throws StorageException
getDefaultGroupForContextWithOutConnection
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getDefaultGroupForContext(int,
java.sql.Connection)
public int getGidNumberOfGroup(Context ctx, int group_id, Connection con) throws StorageException
OXToolStorageInterface
getGidNumberOfGroup
in class OXToolSQLStorage
ctx
- The contextgroup_id
- The group IDcon
- A connection with at least read-only permission
-1
if no GID is set.
StorageException
- If a storage error occurs or group does not existpublic int getGroupIDByGroupname(Context ctx, String groupname) throws StorageException
getGroupIDByGroupname
in class OXToolStorageInterface
StorageException
public String getGroupnameByGroupID(Context ctx, int group_id) throws StorageException
getGroupnameByGroupID
in class OXToolStorageInterface
StorageException
public int getResourceIDByResourcename(Context ctx, String resourcename) throws StorageException
getResourceIDByResourcename
in class OXToolStorageInterface
StorageException
public String getResourcenameByResourceID(Context ctx, int resource_id) throws StorageException
getResourcenameByResourceID
in class OXToolStorageInterface
StorageException
public int getServerIDByServername(String servername) throws StorageException
getServerIDByServername
in class OXToolStorageInterface
StorageException
public int getUserIDByUsername(Context ctx, String username) throws StorageException
getUserIDByUsername
in class OXToolStorageInterface
StorageException
public String getUsernameByUserID(Context ctx, int user_id) throws StorageException
getUsernameByUserID
in class OXToolStorageInterface
StorageException
public boolean isContextAdmin(Context ctx, int user_id) throws StorageException
isContextAdmin
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#isContextAdmin(int,
int)
public boolean isContextAdmin(Context ctx, User user) throws StorageException
OXToolStorageInterface
isContextAdmin
in class OXToolStorageInterface
StorageException
public boolean isContextEnabled(Context ctx) throws StorageException
isContextEnabled
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#isContextEnabled(int)
public boolean isMasterDatabase(int database_id) throws StorageException
isMasterDatabase
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.isMasterDatabase(int)
public boolean isUserSettingMailBitSet(Context ctx, User user, int bit, Connection con) throws StorageException
isUserSettingMailBitSet
in class OXToolStorageInterface
StorageException
public boolean poolInUse(int pool_id) throws StorageException
poolInUse
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#poolInUse(long)
public void primaryMailExists(Context ctx, String mail) throws StorageException, InvalidDataException
primaryMailExists
in class OXToolStorageInterface
StorageException
InvalidDataException
public boolean checkAndUpdateSchemaIfRequired(int contextId) throws StorageException
checkAndUpdateSchemaIfRequired
in class OXToolStorageInterface
StorageException
public boolean schemaBeingLockedOrNeedsUpdate(int writePoolId, String schema) throws StorageException
schemaBeingLockedOrNeedsUpdate
in class OXToolStorageInterface
StorageException
public boolean serverInUse(int server_id) throws StorageException
serverInUse
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#serverInUse(long)
public void setUserSettingMailBit(Context ctx, User user, int bit, Connection con) throws StorageException
setUserSettingMailBit
in class OXToolStorageInterface
StorageException
public boolean storeInUse(int store_id) throws StorageException
storeInUse
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#storeInUse(long)
public void unsetUserSettingMailBit(Context ctx, User user, int bit, Connection con) throws StorageException
unsetUserSettingMailBit
in class OXToolStorageInterface
StorageException
public boolean existsContextName(Context ctx) throws StorageException
OXToolStorageInterface
existsContextName
in class OXToolStorageInterface
StorageException
public boolean existsContextName(String contextName) throws StorageException
OXToolStorageInterface
existsContextName
in class OXToolStorageInterface
StorageException
public boolean existsDatabaseName(Database db) throws StorageException
OXToolStorageInterface
existsDatabaseName
in class OXToolStorageInterface
StorageException
public boolean existsDatabaseName(String db_name) throws StorageException
OXToolStorageInterface
existsDatabaseName
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsDatabaseName(java.lang.String)
public boolean existsGroupName(Context ctx, Group grp) throws StorageException
OXToolStorageInterface
existsGroupName
in class OXToolStorageInterface
StorageException
public boolean existsGroupName(Context ctx, String identifier) throws StorageException
OXToolStorageInterface
existsGroupName
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupName(int,
java.lang.String)
public boolean existsResourceName(Context ctx, Resource res) throws StorageException
OXToolStorageInterface
existsResourceName
in class OXToolStorageInterface
StorageException
public boolean existsResourceName(Context ctx, String identifier) throws StorageException
OXToolStorageInterface
existsResourceName
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsResource(int,
java.lang.String, int)
public boolean existsServerName(Server srv) throws StorageException
OXToolStorageInterface
existsServerName
in class OXToolStorageInterface
StorageException
public boolean existsServerName(String server_name) throws StorageException
OXToolStorageInterface
existsServerName
in class OXToolSQLStorage
StorageException
OXToolStorageInterface.existsServerName(java.lang.String)
public boolean existsUserName(Context ctx, User user) throws StorageException
OXToolStorageInterface
existsUserName
in class OXToolStorageInterface
StorageException
public boolean existsUserName(Context ctx, String username) throws StorageException
OXToolStorageInterface
existsUserName
in class OXToolSQLStorage
StorageException
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUserName(int,
java.lang.String)
public void checkCreateUserData(Context ctx, User usr) throws InvalidDataException, EnforceableDataObjectException, StorageException
checkCreateUserData
in class OXToolStorageInterface
InvalidDataException
EnforceableDataObjectException
StorageException
public void validateUserName(String userName) throws InvalidDataException
validateUserName
in class OXToolStorageInterface
InvalidDataException
public void checkValidEmailsInUserObject(User usr) throws InvalidDataException
checkValidEmailsInUserObject
in class OXToolStorageInterface
InvalidDataException
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |