com.openexchange.admin.rmi.impl
Class OXResource

java.lang.Object
  extended by com.openexchange.admin.rmi.impl.OXCommonImpl
      extended by com.openexchange.admin.rmi.impl.OXResource
All Implemented Interfaces:
OXResourceInterface, Remote

public class OXResource
extends OXCommonImpl
implements OXResourceInterface


Field Summary
 
Fields inherited from interface com.openexchange.admin.rmi.OXResourceInterface
RMI_NAME
 
Constructor Summary
OXResource(BundleContext context)
           
 
Method Summary
 void change(Context ctx, Resource res, Credentials auth)
          Change resource within the given context.
 Resource create(Context ctx, Resource res, Credentials auth)
          Creates a new resource within the given context.
 void delete(Context ctx, Resource res, Credentials auth)
          Delete resource from given context.
 Resource[] getData(Context ctx, Resource[] resources, Credentials auth)
          Get specified resources from server.
 Resource getData(Context ctx, Resource res, Credentials auth)
          Get Resource from given context.
 Resource[] list(Context ctx, String pattern, Credentials auth)
          List resources matching pattern in given context.
 Resource[] listAll(Context ctx, Credentials auth)
          List all resources in given context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXResource

public OXResource(BundleContext context)
           throws RemoteException,
                  StorageException
Throws:
RemoteException
StorageException
Method Detail

change

public void change(Context ctx,
                   Resource res,
                   Credentials auth)
            throws RemoteException,
                   StorageException,
                   InvalidCredentialsException,
                   NoSuchContextException,
                   InvalidDataException,
                   DatabaseUpdateException,
                   NoSuchResourceException
Description copied from interface: OXResourceInterface
Change resource within the given context.

Specified by:
change in interface OXResourceInterface
Parameters:
ctx - Change Resource in this Context.
res - Resource containing the data.
auth - Credentials for authenticating against server.
Throws:
RemoteException - General RMI Exception
StorageException - When an error in the subsystems occurred.
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.
DatabaseUpdateException
NoSuchResourceException

create

public Resource create(Context ctx,
                       Resource res,
                       Credentials auth)
                throws RemoteException,
                       StorageException,
                       InvalidCredentialsException,
                       NoSuchContextException,
                       InvalidDataException,
                       DatabaseUpdateException
Description copied from interface: OXResourceInterface
Creates a new resource within the given context.

Specified by:
create in interface OXResourceInterface
Parameters:
ctx - Create Resource in this Context
res - Resource which should be created
auth - Credentials for authenticating against server.
Returns:
Resource containing the resource id.
Throws:
RemoteException - General RMI Exception
StorageException - When an error in the subsystems occurred.
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.
DatabaseUpdateException

delete

public void delete(Context ctx,
                   Resource res,
                   Credentials auth)
            throws RemoteException,
                   StorageException,
                   InvalidCredentialsException,
                   NoSuchContextException,
                   InvalidDataException,
                   DatabaseUpdateException,
                   NoSuchResourceException
Description copied from interface: OXResourceInterface
Delete resource from given context.

Specified by:
delete in interface OXResourceInterface
Parameters:
ctx - Context object.
res - Resource which should be deleted.
auth - Credentials for authenticating against server.
Throws:
RemoteException - General RMI Exception
StorageException - When an error in the subsystems occurred.
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.
DatabaseUpdateException
NoSuchResourceException

getData

public Resource getData(Context ctx,
                        Resource res,
                        Credentials auth)
                 throws RemoteException,
                        StorageException,
                        InvalidCredentialsException,
                        NoSuchContextException,
                        InvalidDataException,
                        DatabaseUpdateException,
                        NoSuchResourceException
Description copied from interface: OXResourceInterface
Get Resource from given context.

Specified by:
getData in interface OXResourceInterface
Parameters:
ctx - Context object.
res - Resource containing the resource id.
auth - Credentials for authenticating against server.
Returns:
Resource object containing data.
Throws:
RemoteException - General RMI Exception
StorageException - When an error in the subsystems occurred.
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.
DatabaseUpdateException
NoSuchResourceException

getData

public Resource[] getData(Context ctx,
                          Resource[] resources,
                          Credentials auth)
                   throws RemoteException,
                          StorageException,
                          InvalidCredentialsException,
                          NoSuchContextException,
                          InvalidDataException,
                          NoSuchResourceException,
                          DatabaseUpdateException
Description copied from interface: OXResourceInterface
Get specified resources from server. Can be used to get resource data including extensions. Resources will be identified by id or by name.

Specified by:
getData in interface OXResourceInterface
Returns:
Resources including extension data if requested!
Throws:
RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
NoSuchResourceException
DatabaseUpdateException

list

public Resource[] list(Context ctx,
                       String pattern,
                       Credentials auth)
                throws RemoteException,
                       StorageException,
                       InvalidCredentialsException,
                       NoSuchContextException,
                       InvalidDataException,
                       DatabaseUpdateException
Description copied from interface: OXResourceInterface
List resources matching pattern in given context.

Specified by:
list in interface OXResourceInterface
Parameters:
ctx - Context object.
pattern - Search pattern like * or mon* (e.g. for monitor)
auth - Credentials for authenticating against server.
Returns:
Resource[] containing result objects.
Throws:
RemoteException - General RMI Exception
StorageException - When an error in the subsystems occurred.
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.
DatabaseUpdateException

listAll

public Resource[] listAll(Context ctx,
                          Credentials auth)
                   throws RemoteException,
                          StorageException,
                          InvalidCredentialsException,
                          NoSuchContextException,
                          InvalidDataException,
                          DatabaseUpdateException
Description copied from interface: OXResourceInterface
List all resources in given context.

Specified by:
listAll in interface OXResourceInterface
Parameters:
ctx - Context object.
auth - Credentials for authenticating against server.
Returns:
Resource[] containing result objects.
Throws:
RemoteException - General RMI Exception
StorageException - When an error in the subsystems occurred.
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.
DatabaseUpdateException