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, Credentials creds)
          Change ResellerAdmin parameters
 ResellerAdmin create(ResellerAdmin adm, Credentials creds)
          Creates a ResellerAdmin subadmin account in the database.
 void delete(ResellerAdmin adm, Credentials creds)
          Delete ResellerAdmin from database If any objects still belong to this subadmin, the deletion will fail
 Restriction[] getAvailableRestrictions(Credentials creds)
          Retrieve a list of all currently available Restriction objects
 ResellerAdmin getData(ResellerAdmin adm, Credentials creds)
          Get complete data from subadmin object.
 ResellerAdmin[] getMultipleData(ResellerAdmin[] admins, Credentials creds)
          Get complete data from all subadmin objects contained in array.
 Restriction[] getRestrictionsFromContext(Context ctx, Credentials creds)
          Retrieve a list of all restrictions applied to given Context
 void initDatabaseRestrictions(Credentials creds)
          Initialize the database with all currently possible restrictions.
 ResellerAdmin[] list(java.lang.String search_pattern, Credentials creds)
          Search for specific or all subadmins in the database
 void removeDatabaseRestrictions(Credentials creds)
          Remove all restrictions from database
 void updateDatabaseModuleAccessRestrictions(Credentials creds)
          Update all restrictions based on module access combinations in case of changes to /opt/open-xchange/etc/admindaemon/ModuleAccessDefinitions.properties
 void updateDatabaseRestrictions(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,
                     Credentials creds)
                     throws java.rmi.RemoteException,
                            InvalidDataException,
                            StorageException,
                            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
InvalidDataException
StorageException
InvalidCredentialsException
OXResellerException

delete

void delete(ResellerAdmin adm,
            Credentials creds)
            throws java.rmi.RemoteException,
                   InvalidDataException,
                   StorageException,
                   OXResellerException,
                   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
InvalidDataException
StorageException
OXResellerException
InvalidCredentialsException

change

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

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

list

ResellerAdmin[] list(java.lang.String search_pattern,
                     Credentials creds)
                     throws java.rmi.RemoteException,
                            InvalidDataException,
                            StorageException,
                            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
InvalidDataException
StorageException
InvalidCredentialsException

getMultipleData

ResellerAdmin[] getMultipleData(ResellerAdmin[] admins,
                                Credentials creds)
                                throws java.rmi.RemoteException,
                                       InvalidDataException,
                                       InvalidCredentialsException,
                                       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
InvalidDataException
InvalidCredentialsException
StorageException
OXResellerException

getData

ResellerAdmin getData(ResellerAdmin adm,
                      Credentials creds)
                      throws java.rmi.RemoteException,
                             InvalidDataException,
                             InvalidCredentialsException,
                             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
StorageException
InvalidCredentialsException
InvalidDataException

getAvailableRestrictions

Restriction[] getAvailableRestrictions(Credentials creds)
                                       throws java.rmi.RemoteException,
                                              InvalidCredentialsException,
                                              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
InvalidCredentialsException
StorageException
OXResellerException

getRestrictionsFromContext

Restriction[] getRestrictionsFromContext(Context ctx,
                                         Credentials creds)
                                         throws java.rmi.RemoteException,
                                                InvalidDataException,
                                                OXResellerException,
                                                StorageException,
                                                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
InvalidDataException
OXResellerException
StorageException
InvalidCredentialsException

initDatabaseRestrictions

void initDatabaseRestrictions(Credentials creds)
                              throws java.rmi.RemoteException,
                                     StorageException,
                                     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:
StorageException
InvalidCredentialsException
OXResellerException
java.rmi.RemoteException

removeDatabaseRestrictions

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

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

updateDatabaseModuleAccessRestrictions

void updateDatabaseModuleAccessRestrictions(Credentials creds)
                                            throws java.rmi.RemoteException,
                                                   StorageException,
                                                   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
StorageException
InvalidCredentialsException
OXResellerException

updateDatabaseRestrictions

void updateDatabaseRestrictions(Credentials creds)
                                throws java.rmi.RemoteException,
                                       StorageException,
                                       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
StorageException
InvalidCredentialsException
OXResellerException