public interface OXContextInterface
extends java.rmi.Remote
OXUtilInterface
.final OXContextInterface iface = (OXContextInterface)Naming.lookup("rmi:///oxhost/"+OXContextInterface.RMI_NAME); final Context ctx = new Context(1337); User usr = new User(); usr.setDisplay_name("admin display name"); usr.setName("admin"); usr.setPassword("secret"); usr.setMailenabled(true); usr.setPrimaryEmail("admin@example.org"); usr.setEmail1("admin@example.org"); usr.setGiven_name("my"); usr.setSur_name("admin"); final Credentials auth = new Credentials(); auth.setLogin("admin"); auth.setPassword("secret"); iface.create(ctx,usr,access,auth);
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RMI_NAME
RMI name to be used in the naming lookup.
|
Modifier and Type | Method and Description |
---|---|
void |
change(Context ctx,
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 |
changeCapabilities(Context ctx,
java.util.Set<java.lang.String> capsToAdd,
java.util.Set<java.lang.String> capsToRemove,
java.util.Set<java.lang.String> capsToDrop,
Credentials auth)
Changes specified context's capabilities.
|
void |
changeModuleAccess(Context ctx,
java.lang.String access_combination_name,
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(Context ctx,
UserModuleAccess access,
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! |
void |
changeQuota(Context ctx,
java.lang.String module,
long quotaValue,
Credentials auth)
Changes specified context's quota for a certain module.
|
boolean |
checkExists(Context ctx,
Credentials auth)
Deprecated.
|
Context |
create(Context ctx,
User admin_user,
Credentials auth)
Create a new context.
|
Context |
create(Context ctx,
User admin_user,
Credentials auth,
SchemaSelectStrategy schemaSelectStrategy)
Create a new context.
|
Context |
create(Context ctx,
User admin_user,
java.lang.String access_combination_name,
Credentials auth)
Create a new context! Given access combination name will be used for admin module access rights!
|
Context |
create(Context ctx,
User admin_user,
java.lang.String access_combination_name,
Credentials auth,
SchemaSelectStrategy schemaSelectStrategy)
Create a new context! Given access combination name will be used for admin module access rights!
|
Context |
create(Context ctx,
User admin_user,
UserModuleAccess access,
Credentials auth)
Create a new context! Given access rights be used for admin!
|
Context |
create(Context ctx,
User admin_user,
UserModuleAccess access,
Credentials auth,
SchemaSelectStrategy schemaSelectStrategy)
Create a new context! Given access rights be used for admin!
|
void |
delete(Context ctx,
Credentials auth)
Delete a context.
Note: Deleting a context will delete all data which the context include (all users, groups, appointments, ... |
void |
disable(Context ctx,
Credentials auth)
Disable given context.
|
void |
disableAll(Credentials auth)
Disable all contexts.
|
void |
downgrade(Context ctx,
Credentials auth)
If context was changed, call this method to flush data
which is no longer needed due to access permission changes!
|
void |
enable(Context ctx,
Credentials auth)
Enable given context.
|
void |
enableAll(Credentials auth)
Enable all contexts.
|
boolean |
exists(Context ctx,
Credentials auth)
Determines whether a context already exists.
|
java.lang.String |
getAccessCombinationName(Context ctx,
Credentials auth)
Get current access combination name of the context based on the rights of the admin user!
|
int |
getAdminId(Context ctx,
Credentials auth)
Determines the user ID of the admin user for a given context
|
java.util.Set<java.lang.String> |
getCapabilities(Context ctx,
Credentials auth)
Gets specified context's capabilities.
|
Context[] |
getData(Context[] ctx,
Credentials auth)
Get specified context details
|
Context |
getData(Context ctx,
Credentials auth)
Get specified context details
|
UserModuleAccess |
getModuleAccess(Context ctx,
Credentials auth)
Get current module access rights of the context based on the rights of the admin user!
|
Context |
getOwnData(Context ctx,
Credentials auth)
Get specified context details
|
Context[] |
list(java.lang.String search_pattern,
Credentials auth)
Search for contexts
Returns all contexts matching the provided search_pattern. |
Context[] |
listAll(Credentials auth)
Convenience method for listing all contexts
Use this for search a context or list all contexts.
|
Context[] |
listByDatabase(Database db,
Credentials auth)
Search for context on specified db.
|
Context[] |
listByFilestore(Filestore fs,
Credentials auth)
Search for context which store data on specified filestore
|
Quota[] |
listQuotas(Context ctx,
Credentials auth)
Gets the configured quotas in given context.
|
int |
moveContextDatabase(Context ctx,
Database dst_database_id,
Credentials auth)
Move all data of a context contained in a database to another database
|
int |
moveContextFilestore(Context ctx,
Filestore dst_filestore_id,
Credentials auth)
Move all data of a context contained on the filestore to another filestore
|
static final java.lang.String RMI_NAME
Context create(Context ctx, User admin_user, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, ContextExistsException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.admin_user
- User data of administrative user account for this contextauth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.ContextExistsException
Context create(Context ctx, User admin_user, java.lang.String access_combination_name, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, ContextExistsException
ctx
- Context objectadmin_user
- User data of administrative user account for this contextaccess_combination_name
- String Access combination name!auth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.ContextExistsException
Context create(Context ctx, User admin_user, UserModuleAccess access, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, ContextExistsException
ctx
- Context objectadmin_user
- User data of administrative user account for this contextaccess
- UserModuleAccess Access rights!auth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.ContextExistsException
Context create(Context ctx, User admin_user, Credentials auth, SchemaSelectStrategy schemaSelectStrategy) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, ContextExistsException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.admin_user
- User data of administrative user account for this contextauth
- Credentials for authenticating against server.schemaSelectStrategy
- SchemaSelectStrategy to define how to select the schema where the context will be created.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.ContextExistsException
Context create(Context ctx, User admin_user, java.lang.String access_combination_name, Credentials auth, SchemaSelectStrategy schemaSelectStrategy) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, ContextExistsException
ctx
- Context objectadmin_user
- User data of administrative user account for this contextaccess_combination_name
- String Access combination name!auth
- Credentials for authenticating against server.schemaSelectStrategy
- SchemaSelectStrategy to define how to select the schema where the context will be created.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.ContextExistsException
Context create(Context ctx, User admin_user, UserModuleAccess access, Credentials auth, SchemaSelectStrategy schemaSelectStrategy) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, ContextExistsException
ctx
- Context objectadmin_user
- User data of administrative user account for this contextaccess
- UserModuleAccess Access rights!auth
- Credentials for authenticating against server.schemaSelectStrategy
- SchemaSelectStrategy to define how to select the schema where the context will be created.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.ContextExistsException
void delete(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, DatabaseUpdateException, InvalidDataException
auth
- Credentials for authenticating against server.ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.NoSuchContextException
- If the context does not exist in the system.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.DatabaseUpdateException
InvalidDataException
void downgrade(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, DatabaseUpdateException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.auth
- Credentials for authenticating against server.java.rmi.RemoteException
- General RMI ExceptionInvalidCredentialsException
NoSuchContextException
StorageException
- When an error in the subsystems occurred.DatabaseUpdateException
InvalidDataException
int moveContextFilestore(Context ctx, Filestore dst_filestore_id, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, NoSuchFilestoreException, NoSuchReasonException, OXContextException
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.
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.dst_filestore_id
- Id of the Filestore to move the context in.auth
- Credentials for authenticating against server.InvalidCredentialsException
- Credentials for authenticating against server.NoSuchContextException
- If the context does not exist in the system.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occured.NoSuchFilestoreException
NoSuchReasonException
OXContextException
int moveContextDatabase(Context ctx, Database dst_database_id, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, OXContextException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.dst_database_id
- ID of a registered Database to move all data of this context in.auth
- Credentials for authenticating against server.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.
InvalidCredentialsException
- When the supplied credentials were not correct or invalid.NoSuchContextException
- If the context does not exist in the system.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occured.DatabaseUpdateException
OXContextException
void disable(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, NoSuchReasonException, OXContextException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.auth
- Credentials for authenticating against server.InvalidCredentialsException
- Credentials for authenticating against server.NoSuchContextException
- If the context does not exist in the system.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.NoSuchReasonException
OXContextException
void enable(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
auth
- Credentials for authenticating against server.ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.NoSuchContextException
- If the context does not exist in the system.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.InvalidDataException
Context[] list(java.lang.String search_pattern, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException
auth
- Credentials for authenticating against server.search_pattern
- Search pattern e.g "*mycontext*".InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.Context[] listAll(Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException
auth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.void disableAll(Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, NoSuchReasonException
auth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.NoSuchReasonException
void enableAll(Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException
auth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.Context getOwnData(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API. The context IDs of these objects should be set.auth
- The context-specific credentialsjava.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
Context[] getData(Context[] ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API. The context IDs of these objects should be set.auth
- java.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
Context getData(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API. The context ID of this object should be set.auth
- Credentials for authenticating against server.java.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
void change(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API. Beside the context ID
or name for identifying the context itself the object should only contain those field which need to be changed.auth
- java.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
java.util.Set<java.lang.String> getCapabilities(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.auth
- The credentialsjava.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
void changeCapabilities(Context ctx, java.util.Set<java.lang.String> capsToAdd, java.util.Set<java.lang.String> capsToRemove, java.util.Set<java.lang.String> capsToDrop, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.capsToAdd
- The capabilities to addcapsToRemove
- The capabilities to removecapsToDrop
- The capabilities to drop; e.g. clean from storageauth
- The credentialsjava.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
Quota[] listQuotas(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- The contextauth
- The credentialsjava.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
void changeQuota(Context ctx, java.lang.String module, long quotaValue, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.module
- The module to apply quota toquotaValue
- The quota value to setauth
- The credentialsjava.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
void changeModuleAccess(Context ctx, UserModuleAccess access, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.access
- auth
- java.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
void changeModuleAccess(Context ctx, java.lang.String access_combination_name, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.access
- auth
- java.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
UserModuleAccess getModuleAccess(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.auth
- java.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
java.lang.String getAccessCombinationName(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.auth
- java.rmi.RemoteException
InvalidCredentialsException
NoSuchContextException
StorageException
InvalidDataException
Context[] listByDatabase(Database db, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, NoSuchDatabaseException
db
- Database on which to search for contexts.auth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.NoSuchDatabaseException
Context[] listByFilestore(Filestore fs, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException, NoSuchFilestoreException
fs
- Filestoreauth
- Credentials for authenticating against server.InvalidCredentialsException
- When the supplied credentials were not correct or invalid.InvalidDataException
- If the data sent within the method contained invalid data.java.rmi.RemoteException
- General RMI ExceptionStorageException
- When an error in the subsystems occurred.NoSuchFilestoreException
int getAdminId(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidCredentialsException, StorageException, NoSuchContextException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API. This context will be used for determining the userId of the admin.auth
- Credentials for authenticating against the server.java.rmi.RemoteException
- General RMI ExceptionInvalidCredentialsException
- Thrown when the login failsStorageException
- Thrown when an error in a subsystem occurred.NoSuchContextException
boolean exists(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidDataException, StorageException, InvalidCredentialsException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.auth
- Credentials for authenticating against the server.java.rmi.RemoteException
InvalidDataException
StorageException
InvalidCredentialsException
@Deprecated boolean checkExists(Context ctx, Credentials auth) throws java.rmi.RemoteException, InvalidDataException, StorageException, InvalidCredentialsException
ctx
- A new Context object, this should not have been used before or a one returned from a previous call to this API.auth
- Credentials for authenticating against the server.java.rmi.RemoteException
InvalidDataException
StorageException
InvalidCredentialsException