public class ProjectManagement extends java.lang.Object implements IProjectManagement
Modifier and Type | Field and Description |
---|---|
private EntityManager |
manager |
Constructor and Description |
---|
ProjectManagement() |
Modifier and Type | Method and Description |
---|---|
void |
addParticipant(java.lang.Integer projectId,
java.lang.Integer participantId,
java.util.List<java.lang.Integer> roleIds)
Add specified Participant to Project with specified roles
Roles must be roles of project
|
void |
addParticipants(java.lang.Integer projectId,
java.util.List<java.lang.Integer> participantIds,
java.util.List<java.lang.Integer> roleIds)
Add specified participant to Project
|
void |
addRole(java.lang.Integer projectId,
java.lang.Integer roleId)
Add specified Role to specified Project
|
void |
addRoles(java.lang.Integer projectId,
java.util.List<java.lang.Integer> roleIds)
Add specified roles to Project
|
java.lang.Integer |
createProject(Project project)
Creates a new project in the system .It returns the id of project
|
void |
deleteProject(java.lang.Integer projectId)
Delete the given project from the system
|
void |
deleteProjects(java.util.List<java.lang.Integer> projectIds)
Delete the given projects from the system
|
java.util.List<Project> |
findAllProjects()
List all existing projects.
|
Project |
findProjectById(java.lang.Integer projectId)
Find a project identified by his Identifier
|
java.util.List<Project> |
findProjectByIds(java.util.List<java.lang.Integer> projectIds)
Find a list project identified by her Identifier
|
java.util.List<Project> |
findProjectsByParticipant(java.lang.Integer participantId)
List all project of specified participant.
|
void |
removeParticipant(java.lang.Integer projectId,
java.lang.Integer participantId,
java.util.List<java.lang.Integer> roleIds)
Remove specified Participant from Project with specified role
Roles must be roles of project
|
void |
removeParticipants(java.lang.Integer projectId,
java.util.List<java.lang.Integer> participantIds,
java.util.List<java.lang.Integer> roleIds)
Remove specified participant from Project
|
void |
removeRole(java.lang.Integer projectId,
java.lang.Integer roleId)
Add specified Role of specified Project
|
void |
removeRoles(java.lang.Integer projectId,
java.util.List<java.lang.Integer> roleIds)
Remove List of roles to Project
|
void |
updateProject(Project project)
Update the given project from the system
|
public void addParticipant(java.lang.Integer projectId, java.lang.Integer participantId, java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IProjectManagement
addParticipant
in interface IProjectManagement
projectId
- Identifier of projectparticipantId
- Identifier of participantjava.io.IOException
public void removeParticipant(java.lang.Integer projectId, java.lang.Integer participantId, java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IProjectManagement
removeParticipant
in interface IProjectManagement
projectId
- Identifier of ProjectparticipantId
- Identifier of ParticipantroleIds
- List of role Identifierjava.io.IOException
public void addRole(java.lang.Integer projectId, java.lang.Integer roleId) throws java.io.IOException
IProjectManagement
addRole
in interface IProjectManagement
projectId
- Identifier of projectroleId
- Identifier of rolejava.io.IOException
public void removeRole(java.lang.Integer projectId, java.lang.Integer roleId) throws java.io.IOException
IProjectManagement
removeRole
in interface IProjectManagement
projectId
- Identifier of projectroleId
- Identifier of rolejava.io.IOException
public Project findProjectById(java.lang.Integer projectId) throws java.io.IOException
IProjectManagement
findProjectById
in interface IProjectManagement
projectId
- Identifier of projectjava.io.IOException
public java.util.List<Project> findProjectByIds(java.util.List<java.lang.Integer> projectIds) throws java.io.IOException
IProjectManagement
findProjectByIds
in interface IProjectManagement
java.io.IOException
public java.util.List<Project> findAllProjects() throws java.io.IOException
IProjectManagement
findAllProjects
in interface IProjectManagement
java.io.IOException
public void addParticipants(java.lang.Integer projectId, java.util.List<java.lang.Integer> participantIds, java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IProjectManagement
addParticipants
in interface IProjectManagement
projectId
- identifiers of projectparticipantIds
- List of participant's identifiersroleIds
- List of role's identifiersjava.io.IOException
public void removeParticipants(java.lang.Integer projectId, java.util.List<java.lang.Integer> participantIds, java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IProjectManagement
removeParticipants
in interface IProjectManagement
projectId
- identifiers of projectroleIds
- List of role's identifiersjava.io.IOException
public void addRoles(java.lang.Integer projectId, java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IProjectManagement
addRoles
in interface IProjectManagement
projectId
- identifiers of projectroleIds
- List of role's identifiersjava.io.IOException
public void removeRoles(java.lang.Integer projectId, java.util.List<java.lang.Integer> roleIds) throws java.io.IOException
IProjectManagement
removeRoles
in interface IProjectManagement
projectId
- identifiers of projectroleIds
- identifiers of rolesjava.io.IOException
public java.util.List<Project> findProjectsByParticipant(java.lang.Integer participantId) throws java.io.IOException
IProjectManagement
findProjectsByParticipant
in interface IProjectManagement
java.io.IOException
public java.lang.Integer createProject(Project project) throws java.io.IOException
IProjectManagement
createProject
in interface IProjectManagement
project
- Project Datajava.io.IOException
public void deleteProjects(java.util.List<java.lang.Integer> projectIds) throws java.io.IOException
IProjectManagement
deleteProjects
in interface IProjectManagement
projectIds
- Identifier of projectsjava.io.IOException
public void updateProject(Project project) throws java.io.IOException
IProjectManagement
updateProject
in interface IProjectManagement
project
- Project Datajava.io.IOException
public void deleteProject(java.lang.Integer projectId) throws java.io.IOException
IProjectManagement
deleteProject
in interface IProjectManagement
projectId
- Identifier of projectjava.io.IOException