Interface ProjectStorage

All Known Implementing Classes:
ProjectStorageImpl

public interface ProjectStorage
  • 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.
    • 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.
    • updateProject

      ProjectDto updateProject(ProjectDto project)
    • updateProjectNoReturn

      void updateProjectNoReturn(ProjectDto 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.
    • getSubProjects

      List<ProjectDto> getSubProjects(long parentId, int offset, int limit) throws Exception
      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.
      Throws:
      Exception - when can't get sub projects.
    • 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)
    • 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)