Package org.exoplatform.task.storage
Interface ProjectStorage
-
- All Known Implementing Classes:
ProjectStorageImpl
public interface ProjectStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProjectDtocloneProject(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)ProjectDtocreateProject(ProjectDto project)Create a project with givenprojectmodel object.ProjectDtocreateProject(ProjectDto project, long parentId)Create a sub-project with givenprojectmodel object and parent project ID.List<ProjectDto>findCollaboratedProjects(String userName, String keyword, int offset, int limit)List<ProjectDto>findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit)List<ProjectDto>findProjects(List<String> memberships, String keyword, OrderBy order, int offset, int limit)List<ProjectDto>findProjects(ProjectQuery query, int offset, int limit)Set<String>getManager(long projectId)Set<String>getParticipator(long projectId)ProjectDtogetProject(Long projectId)Return the project with givenprojectId.List<ProjectDto>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.ProjectDtoupdateProject(ProjectDto project)voidupdateProjectNoReturn(ProjectDto project)
-
-
-
Method Detail
-
getProject
ProjectDto getProject(Long projectId) throws EntityNotFoundException
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.
-
createProject
ProjectDto createProject(ProjectDto project)
Create a project with givenprojectmodel 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 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.
-
updateProject
ProjectDto updateProject(ProjectDto project)
-
updateProjectNoReturn
void updateProjectNoReturn(ProjectDto project)
-
removeProject
void removeProject(long projectId, boolean deleteChild) throws EntityNotFoundExceptionRemove 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
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.
-
getSubProjects
List<ProjectDto> getSubProjects(long parentId, int offset, int limit) throws Exception
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.
- 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)
-
-