Package org.exoplatform.task.service
Interface ProjectService
- All Known Implementing Classes:
ProjectServiceImpl
public interface ProjectService
-
Method Summary
Modifier and TypeMethodDescriptioncloneProject(long projectId, boolean cloneTask) Clone a project with givenprojectId.intcountCollaboratedProjects(String userName, String keyword) intcountNotEmptyProjects(List<String> memberships, String keyword) intcountProjects(List<String> memberships, String keyword) intcountProjects(ProjectQuery query) createProject(ProjectDto project) Create a project with givenprojectmodel object.createProject(ProjectDto project, long parentId) Create a sub-project with givenprojectmodel object and parent project ID.findCollaboratedProjects(String userName, String keyword, int offset, int limit) findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit) findProjects(List<String> memberships, String keyword, OrderBy order, int offset, int limit) findProjects(ProjectQuery query, int offset, int limit) getManager(long projectId) getParticipator(long projectId) getProject(Long projectId) Return the project with givenprojectId.getSubProjects(long parentId, int offset, int limit) Return a list of children of a parent project with givenparentId.voidremoveProject(long projectId, boolean deleteChild) Remove the project with givenprojectId, and also its descendants ifdeleteChildis true.updateProject(ProjectDto project) Update the project.voidupdateProjectNoReturn(ProjectDto project) Update the project.
-
Method Details
-
getProject
Return the project with givenprojectId.- Parameters:
projectId- the project id.- Returns:
- get the given project.
- Throws:
EntityNotFoundException- when user is not authorized to get project.
-
findCollaboratedProjects
-
findNotEmptyProjects
List<ProjectDto> findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit) -
countCollaboratedProjects
-
countNotEmptyProjects
-
countProjects
-
getManager
-
getParticipator
-
createProject
Create a project with givenprojectmodel object.- Parameters:
project- the given project.- Returns:
- create the given project.
-
createProject
Create a sub-project with givenprojectmodel object and parent project ID.- Parameters:
project- the project metadata to create.parentId- parent project ID- Returns:
- Create a sub-project.
- Throws:
EntityNotFoundException- the project associated withparentIddoesn't exist.
-
updateProjectNoReturn
Update the project.It should throws EntityNotFoundException if the project has been removed OR not existed from database.
- Parameters:
project- the given project.
-
updateProject
Update the project.It should throws EntityNotFoundException if the project has been removed OR not existed from database.
- Parameters:
project- the given project.- Returns:
- The updated project.
-
removeProject
Remove the project with givenprojectId, and also its descendants ifdeleteChildis true.- Parameters:
projectId- the given project id.deleteChild- delete Child.- Throws:
EntityNotFoundException- when user is not authorized to remove project.
-
cloneProject
ProjectDto cloneProject(long projectId, boolean cloneTask) throws EntityNotFoundException, Exception Clone a project with givenprojectId. IfcloneTaskis true, it will also clone all non-completed tasks from the project.- Parameters:
projectId- The id of a project which it copies from.cloneTask- If false, it will clone only project metadata. Otherwise, it also clones all non-completed tasks from the project.- Returns:
- The cloned project.
- Throws:
EntityNotFoundException- when user is not authorized to clone project.Exception
-
getSubProjects
Return a list of children of a parent project with givenparentId.- Parameters:
parentId- The parent id of a project.offset- term to offset results.limit- term to limit results.- Returns:
- The list of children of a parent project.
-
findProjects
-
countProjects
-
findProjects
-