|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OXGroupInterface
This interface defines the Open-Xchange API Version 2 for creating and
manipulating OX groups within an OX context.
Example:
final OXGroupInterface iface = (OXGroupInterface)Naming.lookup("rmi:///oxhost/"+OXGroupInterface.RMI_NAME); final Context ctx = new Context(1); Group grp = new Group(); grp.setDisplayname("display name"); grp.setName("name"); final Credentials auth = new Credentials(); auth.setLogin("admin"); auth.setPassword("secret"); Group created = iface.create(ctx,group,auth);
Field Summary | |
---|---|
static String |
RMI_NAME
RMI name to be used in the naming lookup. |
Method Summary | |
---|---|
void |
addMember(Context ctx,
Group grp,
User[] members,
Credentials auth)
Adds a new member to the group within given context. |
void |
change(Context ctx,
Group grp,
Credentials auth)
Method for changing group data in given context |
Group |
create(Context ctx,
Group grp,
Credentials auth)
Create new group in given context. |
void |
delete(Context ctx,
Group[] grps,
Credentials auth)
Delete group within given context. |
void |
delete(Context ctx,
Group grp,
Credentials auth)
Method for deleting group within given context. |
Group[] |
getData(Context ctx,
Group[] grps,
Credentials auth)
Fetch specified groups from server. |
Group |
getData(Context ctx,
Group grp,
Credentials auth)
Fetch a group from server. |
Group |
getDefaultGroup(Context ctx,
Credentials auth)
Gets the default group of the specified context. |
User[] |
getMembers(Context ctx,
Group grp,
Credentials auth)
Get User IDs of the members of this group. |
Group[] |
list(Context ctx,
String pattern,
Credentials auth)
List groups within context matching the pattern. |
Group[] |
listAll(Context ctx,
Credentials auth)
List all groups within context. |
Group[] |
listGroupsForUser(Context ctx,
User usr,
Credentials auth)
|
void |
removeMember(Context ctx,
Group grp,
User[] members,
Credentials auth)
Remove member(s) from group. |
Field Detail |
---|
static final String RMI_NAME
Method Detail |
---|
void addMember(Context ctx, Group grp, User[] members, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchUserException, NoSuchGroupException
ctx
- Context objectgrp_id
- The ID of the group in which the new members should be
added.members
- User objects with the user_id field set.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchUserException
NoSuchGroupException
void change(Context ctx, Group grp, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, NoSuchUserException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchGroupException
ctx
- Context objectgrp
- Group to change.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchGroupException
NoSuchUserException
Group create(Context ctx, Group grp, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, NoSuchUserException, StorageException, InvalidDataException, DatabaseUpdateException
ctx
- Context object.grp
- Group which should be created.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchUserException
void delete(Context ctx, Group grp, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchGroupException
ctx
- Context objectgrp
- Group which should be deleted from the server.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchGroupException
void delete(Context ctx, Group[] grps, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchGroupException
ctx
- Context objectgrps
- Contains all groups which should be deleted from the
server.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchGroupException
Group getData(Context ctx, Group grp, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchGroupException
ctx
- Context objectgrp
- the group to retrieve from server.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchGroupException
Group[] getData(Context ctx, Group[] grps, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, NoSuchGroupException, DatabaseUpdateException
ctx
- grps
- auth
-
RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
NoSuchGroupException
DatabaseUpdateException
Group getDefaultGroup(Context ctx, Credentials auth) throws RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException
ctx
- auth
-
RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
DatabaseUpdateException
User[] getMembers(Context ctx, Group grp, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchGroupException
ctx
- Context objectgrp
- group from which to retrieve the members.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchGroupException
Group[] list(Context ctx, String pattern, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException
ctx
- Context object.pattern
- Search pattern to search for e.g. "*mygroup*"auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occured.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
Group[] listAll(Context ctx, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException
ctx
- Context object.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
Group[] listGroupsForUser(Context ctx, User usr, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchUserException
ctx
- Context object.usr
- User objectauth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- if the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchUserException
void removeMember(Context ctx, Group grp, User[] members, Credentials auth) throws RemoteException, InvalidCredentialsException, NoSuchContextException, StorageException, InvalidDataException, DatabaseUpdateException, NoSuchGroupException, NoSuchUserException
ctx
- Context objectgrp
- the group from which the members should be removed.members
- User IDs.auth
- Credentials for authenticating against server.
RemoteException
- General RMI Exception
InvalidCredentialsException
- When the supplied credentials were not correct or
invalid.
NoSuchContextException
- If the context does not exist in the system.
StorageException
- When an error in the subsystems occurred.
InvalidDataException
- If the data sent within the method contained invalid
data.
DatabaseUpdateException
NoSuchGroupException
NoSuchUserException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |