public class RoleManagement extends java.lang.Object implements IRoleManagement
Modifier and Type | Field and Description |
---|---|
private EntityManager |
manager |
Constructor and Description |
---|
RoleManagement() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
createRole(Role role)
Creates a new role in the system .It returns the id of role
|
void |
deleteRole(java.lang.Integer roleId)
Delete the given role from the system
|
void |
deleteRoles(java.util.List<java.lang.Integer> roleIds)
Delete the given roles from the system
|
java.util.List<Role> |
findAllRoles()
List all existing role.
|
Role |
findRoleById(java.lang.Integer roleId)
Find a role identified by his Identifier
|
java.util.List<Role> |
findRoleByIds(java.util.List<java.lang.Integer> roleIds)
Find List of role identified by her Identifier
|
java.util.List<Role> |
findRolesByProject(java.lang.Integer projectId)
List all role of specified project.
|
java.util.List<Role> |
findRolesByProjectAndParticipant(java.lang.Integer projectId,
java.lang.Integer participantId)
List all role of participantId in specified project.
|
void |
updateRole(Role role)
Update the given role from the system
|
public java.util.List<Role> findRolesByProject(java.lang.Integer projectId) throws java.io.IOException
IRoleManagement
findRolesByProject
in interface IRoleManagement
projectId
- Identifier of projectjava.io.IOException
public java.util.List<Role> findAllRoles() throws java.io.IOException
IRoleManagement
findAllRoles
in interface IRoleManagement
java.io.IOException
public Role findRoleById(java.lang.Integer roleId) throws java.io.IOException
IRoleManagement
findRoleById
in interface IRoleManagement
roleId
- Identifier of rolejava.io.IOException
public java.util.List<Role> findRolesByProjectAndParticipant(java.lang.Integer projectId, java.lang.Integer participantId) throws java.io.IOException
IRoleManagement
findRolesByProjectAndParticipant
in interface IRoleManagement
participantId
- Identifier of participantjava.io.IOException
public java.util.List<Role> findRoleByIds(java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IRoleManagement
findRoleByIds
in interface IRoleManagement
java.io.IOException
public java.lang.Integer createRole(Role role) throws java.io.IOException
IRoleManagement
createRole
in interface IRoleManagement
java.io.IOException
public void deleteRole(java.lang.Integer roleId) throws java.io.IOException
IRoleManagement
deleteRole
in interface IRoleManagement
roleId
- Identifier of rolejava.io.IOException
public void deleteRoles(java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IRoleManagement
deleteRoles
in interface IRoleManagement
roleIds
- Identifier of rolesjava.io.IOException
public void updateRole(Role role) throws java.io.IOException
IRoleManagement
updateRole
in interface IRoleManagement
role
- Role Datajava.io.IOException