Class ProjectServiceImpl
java.lang.Object
org.exoplatform.task.service.impl.ProjectServiceImpl
- All Implemented Interfaces:
ProjectService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProjectServiceImpl(StatusService statusService, TaskService taskService, DAOHandler daoHandler, ProjectStorage projectStorage, org.exoplatform.services.listener.ListenerService listenerService) -
Method Summary
Modifier and TypeMethodDescriptioncloneProject(long id, 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 id) 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 id, boolean deleteChild) Remove the project with givenprojectId, and also its descendants ifdeleteChildis true.updateProject(ProjectDto proj) Update the project.voidUpdate the project.
-
Field Details
-
PREFIX_CLONE
- See Also:
-
-
Constructor Details
-
ProjectServiceImpl
public ProjectServiceImpl() -
ProjectServiceImpl
public ProjectServiceImpl(StatusService statusService, TaskService taskService, DAOHandler daoHandler, ProjectStorage projectStorage, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Details
-
createProject
Description copied from interface:ProjectServiceCreate a project with givenprojectmodel object.- Specified by:
createProjectin interfaceProjectService- Parameters:
project- the given project.- Returns:
- create the given project.
-
createProject
Description copied from interface:ProjectServiceCreate a sub-project with givenprojectmodel object and parent project ID.- Specified by:
createProjectin interfaceProjectService- Parameters:
project- the project metadata to create.parentId- parent project ID- Returns:
- Create a sub-project.
- Throws:
EntityNotFoundException- the project associated withparentIddoesn't exist.
-
updateProject
Description copied from interface:ProjectServiceUpdate the project.It should throws EntityNotFoundException if the project has been removed OR not existed from database.
- Specified by:
updateProjectin interfaceProjectService- Parameters:
proj- the given project.- Returns:
- The updated project.
-
updateProjectNoReturn
Description copied from interface:ProjectServiceUpdate the project.It should throws EntityNotFoundException if the project has been removed OR not existed from database.
- Specified by:
updateProjectNoReturnin interfaceProjectService- Parameters:
proj- the given project.
-
removeProject
Description copied from interface:ProjectServiceRemove the project with givenprojectId, and also its descendants ifdeleteChildis true.- Specified by:
removeProjectin interfaceProjectService- Parameters:
id- the given project id.deleteChild- delete Child.- Throws:
EntityNotFoundException- when user is not authorized to remove project.
-
cloneProject
Description copied from interface:ProjectServiceClone a project with givenprojectId. IfcloneTaskis true, it will also clone all non-completed tasks from the project.- Specified by:
cloneProjectin interfaceProjectService- Parameters:
id- 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:
Exception
-
getProject
Description copied from interface:ProjectServiceReturn the project with givenprojectId.- Specified by:
getProjectin interfaceProjectService- Parameters:
id- the project id.- Returns:
- get the given project.
- Throws:
EntityNotFoundException- when user is not authorized to get project.
-
getSubProjects
Description copied from interface:ProjectServiceReturn a list of children of a parent project with givenparentId.- Specified by:
getSubProjectsin interfaceProjectService- 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
- Specified by:
findProjectsin interfaceProjectService
-
countProjects
- Specified by:
countProjectsin interfaceProjectService
-
findProjects
public List<ProjectDto> findProjects(List<String> memberships, String keyword, OrderBy order, int offset, int limit) - Specified by:
findProjectsin interfaceProjectService
-
findCollaboratedProjects
public List<ProjectDto> findCollaboratedProjects(String userName, String keyword, int offset, int limit) - Specified by:
findCollaboratedProjectsin interfaceProjectService
-
findNotEmptyProjects
public List<ProjectDto> findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit) - Specified by:
findNotEmptyProjectsin interfaceProjectService
-
countCollaboratedProjects
- Specified by:
countCollaboratedProjectsin interfaceProjectService
-
countNotEmptyProjects
- Specified by:
countNotEmptyProjectsin interfaceProjectService
-
countProjects
- Specified by:
countProjectsin interfaceProjectService
-
getManager
- Specified by:
getManagerin interfaceProjectService
-
getParticipator
- Specified by:
getParticipatorin interfaceProjectService
-