Class ProjectStorageImpl
java.lang.Object
org.exoplatform.task.storage.impl.ProjectStorageImpl
- All Implemented Interfaces:
ProjectStorage
-
Constructor Summary
Constructors -
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)
-
Constructor Details
-
ProjectStorageImpl
-
-
Method Details
-
getProject
Description copied from interface:ProjectStorageReturn the project with givenprojectId.- Specified by:
getProjectin interfaceProjectStorage- Parameters:
projectId- the project id.- Returns:
- get the given project.
- Throws:
EntityNotFoundException- when user is not authorized to get project.
-
getManager
- Specified by:
getManagerin interfaceProjectStorage
-
getParticipator
- Specified by:
getParticipatorin interfaceProjectStorage
-
createProject
Description copied from interface:ProjectStorageCreate a project with givenprojectmodel object.- Specified by:
createProjectin interfaceProjectStorage- Parameters:
project- the given project.- Returns:
- create the given project.
-
createProject
Description copied from interface:ProjectStorageCreate a sub-project with givenprojectmodel object and parent project ID.- Specified by:
createProjectin interfaceProjectStorage- 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
- Specified by:
updateProjectin interfaceProjectStorage
-
updateProjectNoReturn
- Specified by:
updateProjectNoReturnin interfaceProjectStorage
-
removeProject
Description copied from interface:ProjectStorageRemove the project with givenprojectId, and also its descendants ifdeleteChildis true.- Specified by:
removeProjectin interfaceProjectStorage- Parameters:
projectId- the given project id.deleteChild- delete Child.- Throws:
EntityNotFoundException- when user is not authorized to remove project.
-
cloneProject
Description copied from interface:ProjectStorageClone a project with givenprojectId. IfcloneTaskis true, it will also clone all non-completed tasks from the project.- Specified by:
cloneProjectin interfaceProjectStorage- 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
Description copied from interface:ProjectStorageReturn a list of children of a parent project with givenparentId.- Specified by:
getSubProjectsin interfaceProjectStorage- 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
- Specified by:
findProjectsin interfaceProjectStorage
-
countProjects
- Specified by:
countProjectsin interfaceProjectStorage
-
findProjects
public List<ProjectDto> findProjects(List<String> memberships, String keyword, OrderBy order, int offset, int limit) - Specified by:
findProjectsin interfaceProjectStorage
-
findCollaboratedProjects
public List<ProjectDto> findCollaboratedProjects(String userName, String keyword, int offset, int limit) - Specified by:
findCollaboratedProjectsin interfaceProjectStorage
-
findNotEmptyProjects
public List<ProjectDto> findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit) - Specified by:
findNotEmptyProjectsin interfaceProjectStorage
-
countCollaboratedProjects
- Specified by:
countCollaboratedProjectsin interfaceProjectStorage
-
countNotEmptyProjects
- Specified by:
countNotEmptyProjectsin interfaceProjectStorage
-
countProjects
- Specified by:
countProjectsin interfaceProjectStorage
-