|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.molgenis.omx.auth.service.permissionmanagement.PermissionManagementService
public class PermissionManagementService
| Method Summary | |
|---|---|
boolean |
exists(MolgenisPermission mp)
Check to see if a given permission exists |
List<MolgenisEntity> |
findEntities()
Find all Molgenis Users |
MolgenisEntity |
findEntity(Integer id)
Find a MolgenisEntity by id |
MolgenisPermission |
findPermission(Integer id)
Finds permission based on a MolgenisPermission id |
List<MolgenisPermission> |
findPermissions(Integer id)
Given a role id, finds all MolgenisPermissions for the role. |
MolgenisPermission |
findPermissions(Integer roleId,
Integer entityId)
Given a role id and an entity id, searches for a MolgenisPermission on a particular entity for the given role. |
MolgenisPermission |
findPermissions(Integer roleId,
Integer entityId,
String permType)
Given a role id, entity id, and a permission type, check to see whether a MolgenisPermission exists |
List<MolgenisPermission> |
findPermissions(Integer roleId,
String permType)
Given a role id and a permission type (i.e. |
MolgenisRole |
findRole(Integer id)
Find a MolgenisUser |
List<MolgenisRole> |
findRoles()
Find all Molgenis Users |
List<MolgenisPermission> |
findUserPermissions(Integer roleId,
boolean includeOwnership)
Given a role id, return a list of MolgenisPermissions for all users, where the given roleId owns the entity in the matched MolgenisPermissions. |
List<MolgenisPermission> |
findUserPermissions(Integer roleId,
Integer entityId)
Given a role id and an entity id, return a list of MolgenisPermissions for all users, where the given roleId owns the entity in the matched MolgenisPermissions (and only the entity passed in). |
static PermissionManagementService |
getInstance()
Get an instance of PermissionManagementService |
void |
insert(Integer userId,
MolgenisPermission mp)
Inserts a given MolgenisPermission iff the given user is owner on the entity for whom a permission is being made. |
void |
remove(int roleId,
int permId)
Remove a permission based on permission id. |
void |
setDb(Database db)
|
void |
update(Integer userId,
MolgenisPermission mp)
Updates a given MolgenisPermission iff the given user is owner on that entity |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setDb(Database db)
public static PermissionManagementService getInstance()
Database - object
public List<MolgenisPermission> findPermissions(Integer id)
throws DatabaseException,
ParseException
id - MolgenisRole id
DatabaseException
ParseException
public MolgenisPermission findPermissions(Integer roleId,
Integer entityId)
throws DatabaseException,
ParseException
roleId - role IdentityId - entity Id
DatabaseException
ParseException
public MolgenisPermission findPermissions(Integer roleId,
Integer entityId,
String permType)
throws DatabaseException,
ParseException
roleId - the role identityId - the entity idpermType - the type of permission (i.e. READ, WRITE, EXECUTE, or OWN)
DatabaseException
ParseException
public List<MolgenisPermission> findPermissions(Integer roleId,
String permType)
throws DatabaseException,
ParseException
id - permType -
DatabaseException
ParseException
public List<MolgenisPermission> findUserPermissions(Integer roleId,
boolean includeOwnership)
throws DatabaseException,
ParseException
roleId - role idincludeOwnership - whether to include the permission for ownership from the given
role
ParseException
DatabaseException
public List<MolgenisPermission> findUserPermissions(Integer roleId,
Integer entityId)
throws DatabaseException,
ParseException
roleId - role identityId - entity id
ParseException
DatabaseException
public MolgenisPermission findPermission(Integer id)
throws DatabaseException,
ParseException
id -
DatabaseException
ParseException
public void update(Integer userId,
MolgenisPermission mp)
throws DatabaseException,
ParseException,
IOException
userId - userId of user trying to updatemp - MolgenisPermission to update
ParseException
DatabaseException
IOException
public void insert(Integer userId,
MolgenisPermission mp)
throws DatabaseException,
ParseException,
IOException
userId - userId of user trying to insertmp - MolgenisPermission to insert
ParseException
DatabaseException
IOException
public boolean exists(MolgenisPermission mp)
throws DatabaseException,
ParseException
mp -
DatabaseException
ParseException
public MolgenisRole findRole(Integer id)
throws DatabaseException,
ParseException
id - UserId
DatabaseException
ParseException
public MolgenisEntity findEntity(Integer id)
throws DatabaseException,
ParseException
id - EntityId
DatabaseException
ParseException
public List<MolgenisRole> findRoles()
throws DatabaseException,
ParseException
id - EntityId
DatabaseException
ParseException
public List<MolgenisEntity> findEntities()
throws DatabaseException,
ParseException
id - EntityId
DatabaseException
ParseException
public void remove(int roleId,
int permId)
throws DatabaseException,
IOException,
ParseException
roleId - MolgenisRole idpermId - MolgenisPermission id
DatabaseException
IOException
ParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||