Interface ProjectService

All Known Implementing Classes:
ProjectServiceImpl

public interface ProjectService
  • Method Details

    • getProject

      ProjectDto getProject(Long projectId) throws EntityNotFoundException
      Return the project with given projectId.
      Parameters:
      projectId - the project id.
      Returns:
      get the given project.
      Throws:
      EntityNotFoundException - when user is not authorized to get project.
    • findCollaboratedProjects

      List<ProjectDto> findCollaboratedProjects(String userName, String keyword, int offset, int limit)
    • findNotEmptyProjects

      List<ProjectDto> findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit)
    • countCollaboratedProjects

      int countCollaboratedProjects(String userName, String keyword)
    • countNotEmptyProjects

      int countNotEmptyProjects(List<String> memberships, String keyword)
    • countProjects

      int countProjects(List<String> memberships, String keyword)
    • getManager

      Set<String> getManager(long projectId)
    • getParticipator

      Set<String> getParticipator(long projectId)
    • createProject

      ProjectDto createProject(ProjectDto project)
      Create a project with given project model object.
      Parameters:
      project - the given project.
      Returns:
      create the given project.
    • createProject

      ProjectDto createProject(ProjectDto project, long parentId) throws EntityNotFoundException
      Create a sub-project with given project model 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 with parentId doesn't exist.
    • updateProjectNoReturn

      void updateProjectNoReturn(ProjectDto project)
      Update the project.

      It should throws EntityNotFoundException if the project has been removed OR not existed from database.

      Parameters:
      project - the given project.
    • updateProject

      ProjectDto updateProject(ProjectDto project)
      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

      void removeProject(long projectId, boolean deleteChild) throws EntityNotFoundException
      Remove the project with given projectId, and also its descendants if deleteChild is 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 given projectId. If cloneTask is 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

      List<ProjectDto> getSubProjects(long parentId, int offset, int limit)
      Return a list of children of a parent project with given parentId.
      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

      List<ProjectDto> findProjects(ProjectQuery query, int offset, int limit)
    • countProjects

      int countProjects(ProjectQuery query)
    • findProjects

      List<ProjectDto> findProjects(List<String> memberships, String keyword, OrderBy order, int offset, int limit)