public interface ProjectStorage
| Modifier and Type | Method and Description |
|---|---|
ProjectDto |
cloneProject(long projectId,
boolean cloneTask)
Clone a project with given
projectId. |
int |
countCollaboratedProjects(String userName,
String keyword) |
int |
countNotEmptyProjects(List<String> memberships,
String keyword) |
int |
countProjects(List<String> memberships,
String keyword) |
int |
countProjects(ProjectQuery query) |
ProjectDto |
createProject(ProjectDto project)
Create a project with given
project model object. |
ProjectDto |
createProject(ProjectDto project,
long parentId)
Create a sub-project with given
project model 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) |
ProjectDto |
getProject(Long projectId)
Return the project with given
projectId. |
List<ProjectDto> |
getSubProjects(long parentId,
int offset,
int limit)
Return a list of children of a parent project with given
parentId. |
ProjectDto |
projectToDto(Project project) |
Project |
projectToEntity(ProjectDto projectDto) |
void |
removeProject(long projectId,
boolean deleteChild)
Remove the project with given
projectId,
and also its descendants if deleteChild is true. |
ProjectDto |
updateProject(ProjectDto project)
Update the project.
|
ProjectDto getProject(Long projectId) throws EntityNotFoundException
projectId.projectId - the project id.EntityNotFoundException - when user is not authorized to get project.ProjectDto createProject(ProjectDto project)
project model object.project - the given project.ProjectDto createProject(ProjectDto project, long parentId) throws EntityNotFoundException
project model object and parent project ID.project - the project metadata to create.parentId - parent project IDEntityNotFoundException - the project associated with parentId doesn't exist.ProjectDto updateProject(ProjectDto project)
It should throws EntityNotFoundException if the project has been removed OR not existed from database.
project - the given project.void removeProject(long projectId,
boolean deleteChild)
throws EntityNotFoundException
projectId,
and also its descendants if deleteChild is true.projectId - the given project id.deleteChild - delete Child.EntityNotFoundException - when user is not authorized to remove project.ProjectDto cloneProject(long projectId, boolean cloneTask) throws EntityNotFoundException
projectId. If cloneTask is true,
it will also clone all non-completed tasks from the project.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.EntityNotFoundException - when user is not authorized to clone project.List<ProjectDto> getSubProjects(long parentId, int offset, int limit) throws Exception
parentId.parentId - The parent id of a project.ExceptionList<ProjectDto> findProjects(ProjectQuery query, int offset, int limit)
int countProjects(ProjectQuery query)
List<ProjectDto> findProjects(List<String> memberships, String keyword, OrderBy order, int offset, int limit)
List<ProjectDto> findCollaboratedProjects(String userName, String keyword, int offset, int limit)
List<ProjectDto> findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit)
Project projectToEntity(ProjectDto projectDto)
ProjectDto projectToDto(Project project)
Copyright © 2003–2021 eXo Platform SAS. All rights reserved.