com.openexchange.admin.storage.mysqlStorage
Class OXContextMySQLStorage

java.lang.Object
  extended by com.openexchange.admin.storage.interfaces.OXContextStorageInterface
      extended by com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage
          extended by com.openexchange.admin.storage.mysqlStorage.OXContextMySQLStorage

public class OXContextMySQLStorage
extends OXContextSQLStorage

This class provides the implementation for the storage into a MySQL database

Author:
d7

Constructor Summary
OXContextMySQLStorage()
           
 
Method Summary
 void change(com.openexchange.admin.rmi.dataobjects.Context ctx)
           
 void changeStorageData(com.openexchange.admin.rmi.dataobjects.Context ctx)
           
 com.openexchange.admin.rmi.dataobjects.Context create(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.User admin_user, com.openexchange.admin.rmi.dataobjects.UserModuleAccess access)
           
 void delete(com.openexchange.admin.rmi.dataobjects.Context ctx)
           
 void disable(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
           
 void disableAll(com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
           
 void disableAll(com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason, java.lang.String addtionaltable, java.lang.String sqlconjunction)
           
 void downgrade(com.openexchange.admin.rmi.dataobjects.Context ctx)
          This method deletes all inaccessible data in a context.
 void enable(com.openexchange.admin.rmi.dataobjects.Context ctx)
           
 void enableAll()
           
 void enableAll(java.lang.String additionaltable, java.lang.String sqlconjunction)
           
 com.openexchange.admin.rmi.dataobjects.Context getData(com.openexchange.admin.rmi.dataobjects.Context ctx)
           
 com.openexchange.admin.rmi.dataobjects.Context[] getData(com.openexchange.admin.rmi.dataobjects.Context[] ctxs)
           
 com.openexchange.admin.rmi.dataobjects.Context[] listContext(java.lang.String search_pattern)
           
 com.openexchange.admin.rmi.dataobjects.Context[] listContext(java.lang.String search_pattern, java.lang.String additionaltable, java.lang.String sqlconjunction)
           
 java.lang.String moveContextFilestore(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Filestore dst_filestore_id, com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
           
 void moveDatabaseContext(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Database target_database_id, com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
          Move data of context to target database
 com.openexchange.admin.rmi.dataobjects.Context[] searchContextByDatabase(com.openexchange.admin.rmi.dataobjects.Database db_host)
           
 com.openexchange.admin.rmi.dataobjects.Context[] searchContextByFilestore(com.openexchange.admin.rmi.dataobjects.Filestore filestore)
           
 
Methods inherited from class com.openexchange.admin.storage.interfaces.OXContextStorageInterface
getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXContextMySQLStorage

public OXContextMySQLStorage()
Method Detail

delete

public void delete(com.openexchange.admin.rmi.dataobjects.Context ctx)
            throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
delete in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage#deleteContext(int)

disableAll

public void disableAll(com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
                throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
disableAll in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage#disableAllContexts(int)

disableAll

public void disableAll(com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason,
                       java.lang.String addtionaltable,
                       java.lang.String sqlconjunction)
                throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
disableAll in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage#disableAllContexts(int)

disable

public void disable(com.openexchange.admin.rmi.dataobjects.Context ctx,
                    com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
             throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
disable in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage#disableContext(int, int)

enableAll

public void enableAll()
               throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
enableAll in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException

enableAll

public void enableAll(java.lang.String additionaltable,
                      java.lang.String sqlconjunction)
               throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
enableAll in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage#enableAllContexts()

enable

public void enable(com.openexchange.admin.rmi.dataobjects.Context ctx)
            throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
enable in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage#enableContext(int)

getData

public com.openexchange.admin.rmi.dataobjects.Context getData(com.openexchange.admin.rmi.dataobjects.Context ctx)
                                                       throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
getData in class OXContextStorageInterface
Returns:
a context object
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
OXContextStorageInterface.getData(com.openexchange.admin.rmi.dataobjects.Context)

getData

public com.openexchange.admin.rmi.dataobjects.Context[] getData(com.openexchange.admin.rmi.dataobjects.Context[] ctxs)
                                                         throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
getData in class OXContextStorageInterface
Returns:
a context object
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
OXContextStorageInterface.getData(com.openexchange.admin.rmi.dataobjects.Context[])

moveDatabaseContext

public void moveDatabaseContext(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                com.openexchange.admin.rmi.dataobjects.Database target_database_id,
                                com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
                         throws com.openexchange.admin.rmi.exceptions.StorageException
Description copied from class: OXContextStorageInterface
Move data of context to target database

Specified by:
moveDatabaseContext in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.sqlStorage.OXContextSQLStorage#moveDatabaseContext(int, Database, int)

moveContextFilestore

public java.lang.String moveContextFilestore(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                             com.openexchange.admin.rmi.dataobjects.Filestore dst_filestore_id,
                                             com.openexchange.admin.rmi.dataobjects.MaintenanceReason reason)
                                      throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
moveContextFilestore in class OXContextStorageInterface
Returns:
Throws:
com.openexchange.admin.rmi.exceptions.StorageException

listContext

public com.openexchange.admin.rmi.dataobjects.Context[] listContext(java.lang.String search_pattern)
                                                             throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
listContext in class OXContextStorageInterface
Returns:
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.OXContextSQLStorage#listContext(java.lang.String)

listContext

public com.openexchange.admin.rmi.dataobjects.Context[] listContext(java.lang.String search_pattern,
                                                                    java.lang.String additionaltable,
                                                                    java.lang.String sqlconjunction)
                                                             throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
listContext in class OXContextStorageInterface
Returns:
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.OXContextSQLStorage#listContext(java.lang.String)

searchContextByDatabase

public com.openexchange.admin.rmi.dataobjects.Context[] searchContextByDatabase(com.openexchange.admin.rmi.dataobjects.Database db_host)
                                                                         throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
searchContextByDatabase in class OXContextStorageInterface
Returns:
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
See Also:
com.openexchange.admin.storage.OXContextSQLStorage#searchContextByDatabase(java.lang.String)

searchContextByFilestore

public com.openexchange.admin.rmi.dataobjects.Context[] searchContextByFilestore(com.openexchange.admin.rmi.dataobjects.Filestore filestore)
                                                                          throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
searchContextByFilestore in class OXContextStorageInterface
Returns:
Throws:
com.openexchange.admin.rmi.exceptions.StorageException

changeStorageData

public void changeStorageData(com.openexchange.admin.rmi.dataobjects.Context ctx)
                       throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
changeStorageData in class OXContextStorageInterface
Parameters:
ctx - Context with Filestore data set!
Throws:
com.openexchange.admin.rmi.exceptions.StorageException

create

public com.openexchange.admin.rmi.dataobjects.Context create(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                                             com.openexchange.admin.rmi.dataobjects.User admin_user,
                                                             com.openexchange.admin.rmi.dataobjects.UserModuleAccess access)
                                                      throws com.openexchange.admin.rmi.exceptions.StorageException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidDataException
Specified by:
create in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

change

public void change(com.openexchange.admin.rmi.dataobjects.Context ctx)
            throws com.openexchange.admin.rmi.exceptions.StorageException
Specified by:
change in class OXContextStorageInterface
Throws:
com.openexchange.admin.rmi.exceptions.StorageException

downgrade

public void downgrade(com.openexchange.admin.rmi.dataobjects.Context ctx)
               throws com.openexchange.admin.rmi.exceptions.StorageException
This method deletes all inaccessible data in a context.

Specified by:
downgrade in class OXContextStorageInterface
Parameters:
ctx - Context.
Throws:
com.openexchange.admin.rmi.exceptions.StorageException - if some problem occurs.