@Singleton public class ProjectServiceImpl extends Object implements ProjectService
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFIX_CLONE |
| Constructor and Description |
|---|
ProjectServiceImpl() |
ProjectServiceImpl(StatusService statusService,
TaskService taskService,
DAOHandler daoHandler,
ProjectStorage projectStorage,
StatusStorage statusStorage,
org.exoplatform.services.listener.ListenerService listenerService) |
| Modifier and Type | Method and Description |
|---|---|
ProjectDto |
cloneProject(long id,
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 id)
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. |
void |
removeProject(long id,
boolean deleteChild)
Remove the project with given
projectId,
and also its descendants if deleteChild is true. |
ProjectDto |
updateProject(ProjectDto proj)
Update the project.
|
public static final String PREFIX_CLONE
public ProjectServiceImpl()
public ProjectServiceImpl(StatusService statusService, TaskService taskService, DAOHandler daoHandler, ProjectStorage projectStorage, StatusStorage statusStorage, org.exoplatform.services.listener.ListenerService listenerService)
public ProjectDto createProject(ProjectDto project)
ProjectServiceproject model object.createProject in interface ProjectServiceproject - the given project.public ProjectDto createProject(ProjectDto project, long parentId) throws EntityNotFoundException
ProjectServiceproject model object and parent project ID.createProject in interface ProjectServiceproject - the project metadata to create.parentId - parent project IDEntityNotFoundException - the project associated with parentId doesn't exist.public ProjectDto updateProject(ProjectDto proj)
ProjectServiceIt should throws EntityNotFoundException if the project has been removed OR not existed from database.
updateProject in interface ProjectServiceproj - the given project.public void removeProject(long id,
boolean deleteChild)
throws EntityNotFoundException
ProjectServiceprojectId,
and also its descendants if deleteChild is true.removeProject in interface ProjectServiceid - the given project id.deleteChild - delete Child.EntityNotFoundException - when user is not authorized to remove project.public ProjectDto cloneProject(long id, boolean cloneTask) throws Exception
ProjectServiceprojectId. If cloneTask is true,
it will also clone all non-completed tasks from the project.cloneProject in interface ProjectServiceid - 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.Exceptionpublic ProjectDto getProject(Long id) throws EntityNotFoundException
ProjectServiceprojectId.getProject in interface ProjectServiceid - the project id.EntityNotFoundException - when user is not authorized to get project.public List<ProjectDto> getSubProjects(long parentId, int offset, int limit)
ProjectServiceparentId.getSubProjects in interface ProjectServiceparentId - The parent id of a project.public List<ProjectDto> findProjects(ProjectQuery query, int offset, int limit)
findProjects in interface ProjectServicepublic int countProjects(ProjectQuery query)
countProjects in interface ProjectServicepublic List<ProjectDto> findProjects(List<String> memberships, String keyword, OrderBy order, int offset, int limit)
findProjects in interface ProjectServicepublic List<ProjectDto> findCollaboratedProjects(String userName, String keyword, int offset, int limit)
findCollaboratedProjects in interface ProjectServicepublic List<ProjectDto> findNotEmptyProjects(List<String> memberships, String keyword, int offset, int limit)
findNotEmptyProjects in interface ProjectServicepublic int countCollaboratedProjects(String userName, String keyword)
countCollaboratedProjects in interface ProjectServicepublic int countNotEmptyProjects(List<String> memberships, String keyword)
countNotEmptyProjects in interface ProjectServicepublic int countProjects(List<String> memberships, String keyword)
countProjects in interface ProjectServicepublic Set<String> getManager(long projectId)
getManager in interface ProjectServicepublic Set<String> getParticipator(long projectId)
getParticipator in interface ProjectServiceCopyright © 2003–2021 eXo Platform SAS. All rights reserved.