com.openexchange.admin.rmi.impl
Class OXContext

java.lang.Object
  extended by com.openexchange.admin.rmi.impl.OXCommonImpl
      extended by com.openexchange.admin.rmi.impl.OXContextCommonImpl
          extended by com.openexchange.admin.rmi.impl.OXContext
All Implemented Interfaces:
OXContextInterface, java.rmi.Remote

public class OXContext
extends com.openexchange.admin.rmi.impl.OXContextCommonImpl
implements OXContextInterface


Field Summary
 
Fields inherited from interface com.openexchange.admin.rmi.OXContextInterface
RMI_NAME
 
Constructor Summary
OXContext(org.osgi.framework.BundleContext context)
           
 
Method Summary
 void change(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Change specified context! This method currently modifies following data: Login mappings - You can then login via usernam@loginmapping instead of username@contextID Context name in configdb - This is for better organization of contexts in your whole system.
 void changeModuleAccess(com.openexchange.admin.rmi.dataobjects.Context ctx, java.lang.String access_combination_name, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Change module access rights by "access combination name" for ALL users in the specified context.
IF you want to change data of a context like quota etc.
use Method change(Context ctx, Credentials auth) This method modifies ONLY the access rights of the context!
 void changeModuleAccess(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.UserModuleAccess access, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Change module access rights for ALL users in the specified context.
IF you want to change data of a context like quota etc.
use Method change(final Context ctx, final Credentials auth) This method modifies ONLY the access rights of the context!
 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.Credentials auth)
          Create a new context.
 com.openexchange.admin.rmi.dataobjects.Context create(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.User admin_user, java.lang.String access_combination_name, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Create a new context! Given access combination name will be used for admin module access rights!
 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, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Create a new context! Given access rights be used for admin!
 void delete(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Delete a context.
Note: Deleting a context will delete all data which the context include (all users, groups, appointments, ...
 void disable(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Disable given context.
 void disableAll(com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Disable all contexts.
 void downgrade(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          If context was changed, call this method to flush data which is no longer needed due to access permission changes!
 void enable(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Enable given context.
 void enableAll(com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Enable all contexts.
 java.lang.String getAccessCombinationName(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Get current access combination name of the context based on the rights of the admin user!
 int getAdminId(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Determines the user ID of the admin user for a given context
 com.openexchange.admin.rmi.dataobjects.Context[] getData(com.openexchange.admin.rmi.dataobjects.Context[] ctxs, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Get specified context details
 com.openexchange.admin.rmi.dataobjects.Context getData(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Get specified context details
 com.openexchange.admin.rmi.dataobjects.UserModuleAccess getModuleAccess(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Get current module access rights of the context based on the rights of the admin user!
 com.openexchange.admin.rmi.dataobjects.Context[] list(java.lang.String search_pattern, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Search for contexts
Returns all contexts matching the provided search_pattern.
 com.openexchange.admin.rmi.dataobjects.Context[] listAll(com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Convenience method for listing all contexts Use this for search a context or list all contexts.
 com.openexchange.admin.rmi.dataobjects.Context[] listAll(java.lang.String search_pattern, com.openexchange.admin.rmi.dataobjects.Credentials auth)
           
 com.openexchange.admin.rmi.dataobjects.Context[] listByDatabase(com.openexchange.admin.rmi.dataobjects.Database db, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Search for context on specified db.
 com.openexchange.admin.rmi.dataobjects.Context[] listByFilestore(com.openexchange.admin.rmi.dataobjects.Filestore filestore, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Search for context which store data on specified filestore
 int moveContextDatabase(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Database db, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Move all data of a context contained in a database to another database
 int moveContextFilestore(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Filestore dst_filestore, com.openexchange.admin.rmi.dataobjects.Credentials auth)
          Move all data of a context contained on the filestore to another filestore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXContext

public OXContext(org.osgi.framework.BundleContext context)
          throws com.openexchange.admin.rmi.exceptions.StorageException
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
Method Detail

change

public void change(com.openexchange.admin.rmi.dataobjects.Context ctx,
                   com.openexchange.admin.rmi.dataobjects.Credentials auth)
            throws java.rmi.RemoteException,
                   com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                   com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                   com.openexchange.admin.rmi.exceptions.StorageException,
                   com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Change specified context! This method currently modifies following data: Login mappings - You can then login via usernam@loginmapping instead of username@contextID Context name in configdb - This is for better organization of contexts in your whole system. Change filestore quota size - Change how much quota the context is allowed to use! Change storage data informations - Change filestore infos for context. Normally NO need to change!

Specified by:
change in interface OXContextInterface
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

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.Credentials auth)
                                                      throws java.rmi.RemoteException,
                                                             com.openexchange.admin.rmi.exceptions.StorageException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                                             com.openexchange.admin.rmi.exceptions.ContextExistsException
Description copied from interface: OXContextInterface
Create a new context.

Specified by:
create in interface OXContextInterface
Parameters:
ctx - Context object
admin_user - User data of administrative user account for this context
auth - Credentials for authenticating against server.
Returns:
Context object.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
com.openexchange.admin.rmi.exceptions.ContextExistsException

create

public com.openexchange.admin.rmi.dataobjects.Context create(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                                             com.openexchange.admin.rmi.dataobjects.User admin_user,
                                                             java.lang.String access_combination_name,
                                                             com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                      throws java.rmi.RemoteException,
                                                             com.openexchange.admin.rmi.exceptions.StorageException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                                             com.openexchange.admin.rmi.exceptions.ContextExistsException
Description copied from interface: OXContextInterface
Create a new context! Given access combination name will be used for admin module access rights!

Specified by:
create in interface OXContextInterface
Parameters:
ctx - Context object
admin_user - User data of administrative user account for this context
access_combination_name - String Access combination name!
auth - Credentials for authenticating against server.
Returns:
Context object.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
com.openexchange.admin.rmi.exceptions.ContextExistsException

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,
                                                             com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                      throws java.rmi.RemoteException,
                                                             com.openexchange.admin.rmi.exceptions.StorageException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                                             com.openexchange.admin.rmi.exceptions.ContextExistsException
Description copied from interface: OXContextInterface
Create a new context! Given access rights be used for admin!

Specified by:
create in interface OXContextInterface
Parameters:
ctx - Context object
admin_user - User data of administrative user account for this context
access - UserModuleAccess Access rights!
auth - Credentials for authenticating against server.
Returns:
Context object.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
com.openexchange.admin.rmi.exceptions.ContextExistsException

delete

public void delete(com.openexchange.admin.rmi.dataobjects.Context ctx,
                   com.openexchange.admin.rmi.dataobjects.Credentials auth)
            throws java.rmi.RemoteException,
                   com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                   com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                   com.openexchange.admin.rmi.exceptions.StorageException,
                   com.openexchange.admin.rmi.exceptions.DatabaseUpdateException,
                   com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Delete a context.
Note: Deleting a context will delete all data which the context include (all users, groups, appointments, ... )

Specified by:
delete in interface OXContextInterface
Parameters:
ctx - Context object
auth - Credentials for authenticating against server.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.NoSuchContextException - If the context does not exist in the system.
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.DatabaseUpdateException
com.openexchange.admin.rmi.exceptions.InvalidDataException

disable

public void disable(com.openexchange.admin.rmi.dataobjects.Context ctx,
                    com.openexchange.admin.rmi.dataobjects.Credentials auth)
             throws java.rmi.RemoteException,
                    com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                    com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                    com.openexchange.admin.rmi.exceptions.StorageException,
                    com.openexchange.admin.rmi.exceptions.InvalidDataException,
                    NoSuchReasonException,
                    OXContextException
Description copied from interface: OXContextInterface
Disable given context.

Specified by:
disable in interface OXContextInterface
Parameters:
ctx - Context object.
auth - Credentials for authenticating against server.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - Credentials for authenticating against server.
com.openexchange.admin.rmi.exceptions.NoSuchContextException - If the context does not exist in the system.
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
NoSuchReasonException
OXContextException

disableAll

public void disableAll(com.openexchange.admin.rmi.dataobjects.Credentials auth)
                throws java.rmi.RemoteException,
                       com.openexchange.admin.rmi.exceptions.StorageException,
                       com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                       com.openexchange.admin.rmi.exceptions.InvalidDataException,
                       NoSuchReasonException
Description copied from interface: OXContextInterface
Disable all contexts.

Specified by:
disableAll in interface OXContextInterface
Parameters:
auth - Credentials for authenticating against server.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
NoSuchReasonException

enable

public void enable(com.openexchange.admin.rmi.dataobjects.Context ctx,
                   com.openexchange.admin.rmi.dataobjects.Credentials auth)
            throws java.rmi.RemoteException,
                   com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                   com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                   com.openexchange.admin.rmi.exceptions.StorageException,
                   com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Enable given context.

Specified by:
enable in interface OXContextInterface
Parameters:
ctx - Context object.
auth - Credentials for authenticating against server.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.NoSuchContextException - If the context does not exist in the system.
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidDataException

enableAll

public void enableAll(com.openexchange.admin.rmi.dataobjects.Credentials auth)
               throws java.rmi.RemoteException,
                      com.openexchange.admin.rmi.exceptions.StorageException,
                      com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
Description copied from interface: OXContextInterface
Enable all contexts.

Specified by:
enableAll in interface OXContextInterface
Parameters:
auth - Credentials for authenticating against server.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.

getData

public com.openexchange.admin.rmi.dataobjects.Context[] getData(com.openexchange.admin.rmi.dataobjects.Context[] ctxs,
                                                                com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                         throws java.rmi.RemoteException,
                                                                com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                                com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                                                                com.openexchange.admin.rmi.exceptions.StorageException,
                                                                com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Get specified context details

Specified by:
getData in interface OXContextInterface
Returns:
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

getData

public com.openexchange.admin.rmi.dataobjects.Context getData(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                                              com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                       throws java.rmi.RemoteException,
                                                              com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                              com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                                                              com.openexchange.admin.rmi.exceptions.StorageException,
                                                              com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Get specified context details

Specified by:
getData in interface OXContextInterface
Parameters:
ctx - With context ID set.
auth - Credentials for authenticating against server.
Returns:
Data for the requested context.
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

list

public com.openexchange.admin.rmi.dataobjects.Context[] list(java.lang.String search_pattern,
                                                             com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                      throws java.rmi.RemoteException,
                                                             com.openexchange.admin.rmi.exceptions.StorageException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                             com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Search for contexts
Returns all contexts matching the provided search_pattern. Note: When there are any plugins loaded into the admin daemon providing extensions, e.g. reseller, you have to call OXContextInterface.getData(Context, Credentials) for a context afterwards.

Specified by:
list in interface OXContextInterface
Parameters:
search_pattern - Search pattern e.g "*mycontext*".
auth - Credentials for authenticating against server.
Returns:
Contexts.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.

listAll

public com.openexchange.admin.rmi.dataobjects.Context[] listAll(java.lang.String search_pattern,
                                                                com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                         throws java.rmi.RemoteException,
                                                                com.openexchange.admin.rmi.exceptions.StorageException,
                                                                com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                                com.openexchange.admin.rmi.exceptions.InvalidDataException
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.InvalidDataException

listAll

public com.openexchange.admin.rmi.dataobjects.Context[] listAll(com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                         throws java.rmi.RemoteException,
                                                                com.openexchange.admin.rmi.exceptions.StorageException,
                                                                com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                                com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Convenience method for listing all contexts Use this for search a context or list all contexts.

Specified by:
listAll in interface OXContextInterface
Parameters:
auth - Credentials for authenticating against server.
Returns:
Contexts.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.

listByDatabase

public com.openexchange.admin.rmi.dataobjects.Context[] listByDatabase(com.openexchange.admin.rmi.dataobjects.Database db,
                                                                       com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                                throws java.rmi.RemoteException,
                                                                       com.openexchange.admin.rmi.exceptions.StorageException,
                                                                       com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                                       com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                                                       NoSuchDatabaseException
Description copied from interface: OXContextInterface
Search for context on specified db.

Specified by:
listByDatabase in interface OXContextInterface
Parameters:
db - Database on which to search for contexts.
auth - Credentials for authenticating against server.
Returns:
Found contexts on the specified database.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
NoSuchDatabaseException

listByFilestore

public com.openexchange.admin.rmi.dataobjects.Context[] listByFilestore(com.openexchange.admin.rmi.dataobjects.Filestore filestore,
                                                                        com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                                 throws java.rmi.RemoteException,
                                                                        com.openexchange.admin.rmi.exceptions.StorageException,
                                                                        com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                                        com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                                                        NoSuchFilestoreException
Description copied from interface: OXContextInterface
Search for context which store data on specified filestore

Specified by:
listByFilestore in interface OXContextInterface
Parameters:
filestore - Filestore
auth - Credentials for authenticating against server.
Returns:
Contexts found on this filestore.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
NoSuchFilestoreException

moveContextDatabase

public int moveContextDatabase(com.openexchange.admin.rmi.dataobjects.Context ctx,
                               com.openexchange.admin.rmi.dataobjects.Database db,
                               com.openexchange.admin.rmi.dataobjects.Credentials auth)
                        throws java.rmi.RemoteException,
                               com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                               com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                               com.openexchange.admin.rmi.exceptions.StorageException,
                               com.openexchange.admin.rmi.exceptions.InvalidDataException,
                               com.openexchange.admin.rmi.exceptions.DatabaseUpdateException,
                               OXContextException
Description copied from interface: OXContextInterface
Move all data of a context contained in a database to another database

Specified by:
moveContextDatabase in interface OXContextInterface
Parameters:
ctx - Context object
db - ID of a registered Database to move all data of this context in.
auth - Credentials for authenticating against server.
Returns:
String containing return queue id to query status of job.

This method returns immediately and the data is going to be copied in the background. To query the progress and the result of the actual task, the AdminJobExecutor interface must be used.

Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - When the supplied credentials were not correct or invalid.
com.openexchange.admin.rmi.exceptions.NoSuchContextException - If the context does not exist in the system.
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occured.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
com.openexchange.admin.rmi.exceptions.DatabaseUpdateException
OXContextException
See Also:
OXContextInterface.moveContextDatabase(com.openexchange.admin.rmi.dataobjects.Context, com.openexchange.admin.rmi.dataobjects.Database, com.openexchange.admin.rmi.dataobjects.Credentials)

moveContextFilestore

public int moveContextFilestore(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                com.openexchange.admin.rmi.dataobjects.Filestore dst_filestore,
                                com.openexchange.admin.rmi.dataobjects.Credentials auth)
                         throws java.rmi.RemoteException,
                                com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                                com.openexchange.admin.rmi.exceptions.StorageException,
                                com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                NoSuchFilestoreException,
                                NoSuchReasonException,
                                OXContextException
Description copied from interface: OXContextInterface
Move all data of a context contained on the filestore to another filestore

This method returns immediately and the data is going to be copied in the background. To query the progress and the result of the actual task, the AdminJobExecutor interface must be used.

Specified by:
moveContextFilestore in interface OXContextInterface
Parameters:
ctx - Context object
dst_filestore - Id of the Filestore to move the context in.
auth - Credentials for authenticating against server.
Returns:
Job id which can be used for retrieving progress information.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - Credentials for authenticating against server.
com.openexchange.admin.rmi.exceptions.NoSuchContextException - If the context does not exist in the system.
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occured.
com.openexchange.admin.rmi.exceptions.InvalidDataException - If the data sent within the method contained invalid data.
NoSuchFilestoreException
NoSuchReasonException
OXContextException

changeModuleAccess

public void changeModuleAccess(com.openexchange.admin.rmi.dataobjects.Context ctx,
                               com.openexchange.admin.rmi.dataobjects.UserModuleAccess access,
                               com.openexchange.admin.rmi.dataobjects.Credentials auth)
                        throws java.rmi.RemoteException,
                               com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                               com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                               com.openexchange.admin.rmi.exceptions.StorageException,
                               com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Change module access rights for ALL users in the specified context.
IF you want to change data of a context like quota etc.
use Method change(final Context ctx, final Credentials auth) This method modifies ONLY the access rights of the context!

Specified by:
changeModuleAccess in interface OXContextInterface
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

changeModuleAccess

public void changeModuleAccess(com.openexchange.admin.rmi.dataobjects.Context ctx,
                               java.lang.String access_combination_name,
                               com.openexchange.admin.rmi.dataobjects.Credentials auth)
                        throws java.rmi.RemoteException,
                               com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                               com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                               com.openexchange.admin.rmi.exceptions.StorageException,
                               com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Change module access rights by "access combination name" for ALL users in the specified context.
IF you want to change data of a context like quota etc.
use Method change(Context ctx, Credentials auth) This method modifies ONLY the access rights of the context!

Specified by:
changeModuleAccess in interface OXContextInterface
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

downgrade

public void downgrade(com.openexchange.admin.rmi.dataobjects.Context ctx,
                      com.openexchange.admin.rmi.dataobjects.Credentials auth)
               throws java.rmi.RemoteException,
                      com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                      com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                      com.openexchange.admin.rmi.exceptions.StorageException,
                      com.openexchange.admin.rmi.exceptions.DatabaseUpdateException,
                      com.openexchange.admin.rmi.exceptions.InvalidDataException
If context was changed, call this method to flush data which is no longer needed due to access permission changes!

Specified by:
downgrade in interface OXContextInterface
Parameters:
ctx - Context object
auth - Credentials for authenticating against server.
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException - When an error in the subsystems occurred.
com.openexchange.admin.rmi.exceptions.DatabaseUpdateException
com.openexchange.admin.rmi.exceptions.InvalidDataException

getAccessCombinationName

public java.lang.String getAccessCombinationName(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                                 com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                          throws java.rmi.RemoteException,
                                                 com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                 com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                                                 com.openexchange.admin.rmi.exceptions.StorageException,
                                                 com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Get current access combination name of the context based on the rights of the admin user!

Specified by:
getAccessCombinationName in interface OXContextInterface
Returns:
Access combination name or null if current access rights cannot be mapped to an access combination name.
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

getModuleAccess

public com.openexchange.admin.rmi.dataobjects.UserModuleAccess getModuleAccess(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                                                               com.openexchange.admin.rmi.dataobjects.Credentials auth)
                                                                        throws java.rmi.RemoteException,
                                                                               com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                                               com.openexchange.admin.rmi.exceptions.NoSuchContextException,
                                                                               com.openexchange.admin.rmi.exceptions.StorageException,
                                                                               com.openexchange.admin.rmi.exceptions.InvalidDataException
Description copied from interface: OXContextInterface
Get current module access rights of the context based on the rights of the admin user!

Specified by:
getModuleAccess in interface OXContextInterface
Returns:
Current module access rights!
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.NoSuchContextException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidDataException

getAdminId

public int getAdminId(com.openexchange.admin.rmi.dataobjects.Context ctx,
                      com.openexchange.admin.rmi.dataobjects.Credentials auth)
               throws java.rmi.RemoteException,
                      com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                      com.openexchange.admin.rmi.exceptions.StorageException
Description copied from interface: OXContextInterface
Determines the user ID of the admin user for a given context

Specified by:
getAdminId in interface OXContextInterface
Parameters:
ctx - The context for which the userId of the admin should be determined.
auth - Credentials for authenticating against the server.
Returns:
The userId of the admin user
Throws:
java.rmi.RemoteException - General RMI Exception
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException - Thrown when the login fails
com.openexchange.admin.rmi.exceptions.StorageException - Thrown when an error in a subsystem occurred.