|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.UserPermissions
public class UserPermissions
This class is used to specify permissions to share an item to users. It is a three-step procedure:
ItemKey using this object as one of the
input parameters to ItemKey.getNewOrExisting(DbControl, UserPermissions, GroupPermissions)
Shareable.setItemKey(ItemKey)
ItemKey,
GroupPermissions,
ProjectPermissions| Constructor Summary | |
|---|---|
UserPermissions()
Create a new empty object. |
|
UserPermissions(ItemKey itemKey)
Create a new object, and initialise it with the permissions from a ItemKey. |
|
| Method Summary | |
|---|---|
void |
addPermissions(User user,
Set<Permission> permissions)
Grant permissions to a user, keeping those that have already been set. |
Set<Permission> |
getPermissions(User user)
Get the permissions for a user. |
void |
setPermissions(User user,
Set<Permission> permissions)
Grant permissions to a user. |
int |
size()
Get the number of entries. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserPermissions()
public UserPermissions(ItemKey itemKey)
throws InvalidDataException
ItemKey.
itemKey - The item key from which we take the current permissions
InvalidDataException - If the item key is null| Method Detail |
|---|
public void setPermissions(User user,
Set<Permission> permissions)
throws InvalidDataException
Set or null
to remove all permissions for the user.
user - The Userpermissions - The permissions to grant
InvalidDataException - If the user is nullPermission
public void addPermissions(User user,
Set<Permission> permissions)
throws InvalidDataException
user - The Userpermissions - The permissions to grant
InvalidDataException - If the user is nullPermission
public Set<Permission> getPermissions(User user)
throws InvalidDataException
user - The User for which we want to get the permission
Set containing the granted permissions, or an
empty set if no permissions have been granted
InvalidDataException - If the user is nullPermissionpublic int size()
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||