|
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.ProjectPermissions
public class ProjectPermissions
This class is used to specify permissions to share an item to projects. It is a three-step procedure:
ProjectKey using this object as the
input parameter to ProjectKey.getNewOrExisting(DbControl, ProjectPermissions)
Shareable.setProjectKey(ProjectKey)
ProjectKey| Constructor Summary | |
|---|---|
ProjectPermissions()
Create a new empty object. |
|
ProjectPermissions(ProjectKey projectKey)
Create a new object, and initialise it with the permissions from a ProjectKey. |
|
| Method Summary | |
|---|---|
void |
addPermissions(Project project,
Set<Permission> permissions)
Grant permissions to a project, keeping those that have already been set. |
Set<Permission> |
getPermissions(Project project)
Get the permissions for a project. |
void |
setPermissions(Project project,
Set<Permission> permissions)
Grant permissions to a project. |
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 ProjectPermissions()
public ProjectPermissions(ProjectKey projectKey)
throws InvalidDataException
ProjectKey.
projectKey - The project key from which we take the current permissions
InvalidDataException - If the project key is null| Method Detail |
|---|
public void setPermissions(Project project,
Set<Permission> permissions)
throws PermissionDeniedException,
InvalidDataException
Set or null
to remove all permissions for the project.
project - The Projectpermissions - The permissions to grant
PermissionDeniedException - If the logged in user doesn't have
Permission.USE permission for the project
InvalidDataException - If the project is nullPermission
public void addPermissions(Project project,
Set<Permission> permissions)
throws PermissionDeniedException,
InvalidDataException
project - The Projectpermissions - The permissions to grant
PermissionDeniedException - If the logged in user doesn't have
Permission.USE permission for the project
InvalidDataException - If the project is nullPermission
public Set<Permission> getPermissions(Project project)
throws InvalidDataException
project - The Project 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 project 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 | |||||||||