Package org.exoplatform.task.storage
Interface ProjectStorage
- All Known Implementing Classes:
ProjectStorageImpl
public interface ProjectStorage
-
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) voidupdateProjectNoReturn(ProjectDto 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.
-
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.
-
updateProject
-
updateProjectNoReturn
-
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
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
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
-
countProjects
-
findProjects
-
findCollaboratedProjects
-
findNotEmptyProjects
List<ProjectDto> findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit) -
countCollaboratedProjects
-
countNotEmptyProjects
-
countProjects
-