com.openexchange.admin.reseller.rmi
Interface OXResellerInterface

All Superinterfaces:
java.rmi.Remote

public interface OXResellerInterface
extends java.rmi.Remote

Author:
choeger

Field Summary
static java.lang.String RMI_NAME
          RMI name to be used in the naming lookup.
 
Method Summary
 void change(ResellerAdmin adm, com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Change ResellerAdmin parameters
 ResellerAdmin create(ResellerAdmin adm, com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Creates a ResellerAdmin subadmin account in the database.
 void delete(ResellerAdmin adm, com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Delete ResellerAdmin from database If any objects still belong to this subadmin, the deletion will fail
 Restriction[] getAvailableRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Retrieve a list of all currently available Restriction objects
 ResellerAdmin getData(ResellerAdmin adm, com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Get complete data from subadmin object.
 ResellerAdmin[] getMultipleData(ResellerAdmin[] admins, com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Get complete data from all subadmin objects contained in array.
 Restriction[] getRestrictionsFromContext(com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Retrieve a list of all restrictions applied to given Context
 void initDatabaseRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Initialize the database with all currently possible restrictions.
 ResellerAdmin[] list(java.lang.String search_pattern, com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Search for specific or all subadmins in the database
 void removeDatabaseRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Remove all restrictions from database
 void updateDatabaseModuleAccessRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Update all restrictions based on module access combinations in case of changes to /opt/open-xchange/etc/admindaemon/ModuleAccessDefinitions.properties
 void updateDatabaseRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
          Update list of restrictions.
 

Field Detail

RMI_NAME

static final java.lang.String RMI_NAME
RMI name to be used in the naming lookup.

See Also:
Constant Field Values
Method Detail

create

ResellerAdmin create(ResellerAdmin adm,
                     com.openexchange.admin.rmi.dataobjects.Credentials creds)
                     throws java.rmi.RemoteException,
                            com.openexchange.admin.rmi.exceptions.InvalidDataException,
                            com.openexchange.admin.rmi.exceptions.StorageException,
                            com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                            OXResellerException
Creates a ResellerAdmin subadmin account in the database. Example: final ResellerAdmin ra = new ResellerAdmin("reselleradm"); ra.setDisplayname("Reseller Admin"); ra.setPassword("secret"); HashSet rss = new HashSet(); rss.add(new Restriction(Restriction.MAX_CONTEXT_PER_SUBADMIN, "100")); rss.add(new Restriction(Restriction.MAX_OVERALL_USER_PER_SUBADMIN,"1000"));

Parameters:
adm - ResellerAdmin object
creds - Credentials of the master admin
Returns:
ResellerAdmin object
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidDataException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
OXResellerException

delete

void delete(ResellerAdmin adm,
            com.openexchange.admin.rmi.dataobjects.Credentials creds)
            throws java.rmi.RemoteException,
                   com.openexchange.admin.rmi.exceptions.InvalidDataException,
                   com.openexchange.admin.rmi.exceptions.StorageException,
                   OXResellerException,
                   com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
Delete ResellerAdmin from database If any objects still belong to this subadmin, the deletion will fail

Parameters:
adm - ResellerAdmin object
creds - Credentials of the master admin
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidDataException
com.openexchange.admin.rmi.exceptions.StorageException
OXResellerException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException

change

void change(ResellerAdmin adm,
            com.openexchange.admin.rmi.dataobjects.Credentials creds)
            throws java.rmi.RemoteException,
                   com.openexchange.admin.rmi.exceptions.InvalidDataException,
                   com.openexchange.admin.rmi.exceptions.StorageException,
                   OXResellerException,
                   com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
Change ResellerAdmin parameters

Parameters:
adm - ResellerAdmin object
creds - Credentials of the master admin
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidDataException
com.openexchange.admin.rmi.exceptions.StorageException
OXResellerException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException

list

ResellerAdmin[] list(java.lang.String search_pattern,
                     com.openexchange.admin.rmi.dataobjects.Credentials creds)
                     throws java.rmi.RemoteException,
                            com.openexchange.admin.rmi.exceptions.InvalidDataException,
                            com.openexchange.admin.rmi.exceptions.StorageException,
                            com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
Search for specific or all subadmins in the database

Parameters:
search_pattern - search pattern like e.g. "*foo*"
creds - Credentials of the master admin
Returns:
ResellerAdmin array containing search result
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidDataException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException

getMultipleData

ResellerAdmin[] getMultipleData(ResellerAdmin[] admins,
                                com.openexchange.admin.rmi.dataobjects.Credentials creds)
                                throws java.rmi.RemoteException,
                                       com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                       com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                       com.openexchange.admin.rmi.exceptions.StorageException,
                                       OXResellerException
Get complete data from all subadmin objects contained in array. It is required to either specify subadmin objects name or id.

Parameters:
Array - containing ResellerAdmin objects
creds - Credentials of the master admin
Returns:
ResellerAdmin array containing complete data
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidDataException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.StorageException
OXResellerException

getData

ResellerAdmin getData(ResellerAdmin adm,
                      com.openexchange.admin.rmi.dataobjects.Credentials creds)
                      throws java.rmi.RemoteException,
                             com.openexchange.admin.rmi.exceptions.InvalidDataException,
                             com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                             com.openexchange.admin.rmi.exceptions.StorageException,
                             OXResellerException
Get complete data from subadmin object. It is required to either specify subadmin objects name or id.

Parameters:
{@link - ResellerAdmin} object
creds - Credentials of the master admin
Returns:
ResellerAdmin containing complete data
Throws:
java.rmi.RemoteException
OXResellerException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.InvalidDataException

getAvailableRestrictions

Restriction[] getAvailableRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
                                       throws java.rmi.RemoteException,
                                              com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                              com.openexchange.admin.rmi.exceptions.StorageException,
                                              OXResellerException
Retrieve a list of all currently available Restriction objects

Parameters:
creds - Credentials of the master admin
Returns:
HashSet of available restrictions
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.StorageException
OXResellerException

getRestrictionsFromContext

Restriction[] getRestrictionsFromContext(com.openexchange.admin.rmi.dataobjects.Context ctx,
                                         com.openexchange.admin.rmi.dataobjects.Credentials creds)
                                         throws java.rmi.RemoteException,
                                                com.openexchange.admin.rmi.exceptions.InvalidDataException,
                                                OXResellerException,
                                                com.openexchange.admin.rmi.exceptions.StorageException,
                                                com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
Retrieve a list of all restrictions applied to given Context

Parameters:
{@link - Context} object
creds - Credentials of the master admin
Returns:
HashSet of restrictions applied to context
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidDataException
OXResellerException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException

initDatabaseRestrictions

void initDatabaseRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
                              throws java.rmi.RemoteException,
                                     com.openexchange.admin.rmi.exceptions.StorageException,
                                     com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                     OXResellerException
Initialize the database with all currently possible restrictions. There's a set of static restrictions (see Restriction) as well as every such restriction per defined module access combination from /opt/open-xchange/etc/admindaemon/ModuleAccessDefinitions.properties

Parameters:
creds - Credentials of the master admin
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
OXResellerException
java.rmi.RemoteException

removeDatabaseRestrictions

void removeDatabaseRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
                                throws java.rmi.RemoteException,
                                       com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                       com.openexchange.admin.rmi.exceptions.StorageException,
                                       OXResellerException
Remove all restrictions from database

Parameters:
creds - Credentials of the master admin
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
com.openexchange.admin.rmi.exceptions.StorageException
OXResellerException

updateDatabaseModuleAccessRestrictions

void updateDatabaseModuleAccessRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
                                            throws java.rmi.RemoteException,
                                                   com.openexchange.admin.rmi.exceptions.StorageException,
                                                   com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                                   OXResellerException
Update all restrictions based on module access combinations in case of changes to /opt/open-xchange/etc/admindaemon/ModuleAccessDefinitions.properties

Parameters:
creds - Credentials of the master admin
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
OXResellerException

updateDatabaseRestrictions

void updateDatabaseRestrictions(com.openexchange.admin.rmi.dataobjects.Credentials creds)
                                throws java.rmi.RemoteException,
                                       com.openexchange.admin.rmi.exceptions.StorageException,
                                       com.openexchange.admin.rmi.exceptions.InvalidCredentialsException,
                                       OXResellerException
Update list of restrictions. This is going to add new restrictions that might ship with a newer version of the reseller plugin.

Parameters:
creds - Credentials of the master admin
Throws:
java.rmi.RemoteException
com.openexchange.admin.rmi.exceptions.StorageException
com.openexchange.admin.rmi.exceptions.InvalidCredentialsException
OXResellerException