|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OXResourceInterface
This interface defines the Open-Xchange API Version 2 for creating and
manipulating OX resources within an OX context.
Example:
final OXResourceInterface iface = (OXResourceInterface)Naming.lookup("rmi:///oxhost/"+OXResourceInterface.RMI_NAME); final Context ctx = new Context(1); final Credentials auth = new Credentials(); auth.setLogin("myuser"); auth.setPassword("secret"); final Resource res = new Resource(); res.setName("resource"); res.setDisplayName("my resource display name"); Resource res_created = iface.create(ctx,res,auth);
Field Summary | |
---|---|
static String |
RMI_NAME
RMI name to be used in the naming lookup. |
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. |
Field Detail |
---|
static final String RMI_NAME
Method Detail |
---|
Resource create(Context ctx, Resource res, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException
ctx
- Create Resource in this Contextres
- Resource which should be createdauth
- Credentials for authenticating against server.
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.
RemoteException
- General RMI Exception
DatabaseUpdateException
void change(Context ctx, Resource res, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException, NoSuchResourceException
ctx
- Change Resource in this Context.res
- Resource containing the data.auth
- Credentials for authenticating against server.
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.
RemoteException
- General RMI Exception
DatabaseUpdateException
NoSuchResourceException
void delete(Context ctx, Resource res, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException, NoSuchResourceException
ctx
- Context object.res
- Resource which should be deleted.auth
- Credentials for authenticating against server.
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.
RemoteException
- General RMI Exception
DatabaseUpdateException
NoSuchResourceException
Resource getData(Context ctx, Resource res, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException, NoSuchResourceException
ctx
- Context object.res
- Resource containing the resource id.auth
- Credentials for authenticating against server.
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.
RemoteException
- General RMI Exception
DatabaseUpdateException
NoSuchResourceException
Resource[] getData(Context ctx, Resource[] resources, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, NoSuchResourceException, DatabaseUpdateException
ctx
- resources
- auth
-
RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
NoSuchResourceException
DatabaseUpdateException
Resource[] list(Context ctx, String pattern, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException
pattern
in given context.
ctx
- Context object.pattern
- Search pattern like * or mon* (e.g. for monitor)auth
- Credentials for authenticating against server.
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.
RemoteException
- General RMI Exception
DatabaseUpdateException
Resource[] listAll(Context ctx, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException
ctx
- Context object.auth
- Credentials for authenticating against server.
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.
RemoteException
- General RMI Exception
DatabaseUpdateException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |