@Singleton public class TaskServiceImpl extends Object implements TaskService
TASK_CREATION, TASK_UPDATE| Constructor and Description |
|---|
TaskServiceImpl(TaskStorage taskStorage,
DAOHandler daoHandler,
org.exoplatform.services.listener.ListenerService listenerService) |
| Modifier and Type | Method and Description |
|---|---|
ChangeLogEntry |
addTaskLog(long id,
String username,
String actionName,
String target)
Create a log associated with a task with given
taskId. |
void |
addWatcherToTask(String user,
TaskDto task) |
TaskDto |
cloneTask(long id)
Clone the task from a task with given
taskId. |
Long |
countAssignedTasks(String user) |
Long |
countCollaboratedTasks(String user) |
int |
countIncomingTasks(String user) |
Long |
countOverdueTasks(String user) |
long |
countTasks(String user,
String query)
Count tasks assigned to a user using a search term to find in title or
description of the task
|
int |
countTasks(TaskQuery query) |
int |
countTasksByLabel(LabelDto label,
List<Long> projectIds,
String username,
OrderBy orderBy) |
List<Object[]> |
countTaskStatusByProject(long projectId) |
Long |
countUncompletedTasks(String user) |
Long |
countWatchedTasks(String user) |
TaskDto |
createTask(TaskDto task)
Create a new task.
|
void |
deleteWatcherOfTask(String user,
TaskDto task) |
TasksList |
filterTasks(String query,
long projectId,
String keyword,
List<Long> labels,
TaskUtil.DUE dueDate,
Priority priority,
List<String> assignees,
List<String> coworker,
List<String> watchers,
Long labelId,
Long statusId,
org.exoplatform.services.security.Identity currIdentity,
String dueCategory,
String space_group_id,
TimeZone userTimezone,
boolean isShowCompleted,
boolean advanceSearch,
boolean noProjPermission,
boolean noLblPermission,
String orderBy,
String groupBy,
int offset,
int limit) |
TaskDto |
findTaskByActivityId(String id) |
List<TaskDto> |
findTasks(String user,
String query,
int limit) |
List<TaskDto> |
findTasks(TaskQuery query,
int offset,
int limit)
Find tasks assigned to a user using a term to find in title or description
of the task
|
List<TaskDto> |
findTasksByLabel(LabelDto label,
List<Long> projectIds,
String username,
OrderBy orderBy,
int offset,
int limit) |
List<TaskDto> |
getAssignedTasks(String user,
int limit) |
List<TaskDto> |
getCollaboratedTasks(String user,
int limit) |
Set<String> |
getCoworker(long taskId) |
List<TaskDto> |
getIncomingTasks(String user,
int offset,
int limit) |
Set<String> |
getMentionedUsers(long taskId) |
List<TaskDto> |
getOverdueTasks(String user,
int limit) |
TaskDto |
getTask(long id)
Return the task with given
taskId. |
List<ChangeLogEntry> |
getTaskLogs(long taskId,
int offset,
int limit) |
List<TaskDto> |
getUncompletedTasks(String user,
int limit) |
List<TaskDto> |
getWatchedTasks(String user,
int limit) |
Set<String> |
getWatchersOfTask(TaskDto task) |
boolean |
isExternal(String userId) |
void |
removeTask(long id)
Remove the task with given
taskId |
<T> List<T> |
selectTaskField(TaskQuery query,
String fieldName) |
TaskDto |
updateTask(TaskDto task)
Update the task.
|
void |
updateTaskOrder(long currentTaskId,
Status newStatus,
long[] orders) |
public TaskServiceImpl(TaskStorage taskStorage, DAOHandler daoHandler, org.exoplatform.services.listener.ListenerService listenerService)
public TaskDto createTask(TaskDto task)
TaskServicecreateTask in interface TaskServicetask - the given task.public TaskDto updateTask(TaskDto task)
TaskServiceupdateTask in interface TaskServicetask - the given task.public void updateTaskOrder(long currentTaskId,
Status newStatus,
long[] orders)
updateTaskOrder in interface TaskServicepublic void removeTask(long id)
throws EntityNotFoundException
TaskServicetaskIdremoveTask in interface TaskServiceid - the given task id.EntityNotFoundException - when user is not authorized to remove taskpublic TaskDto cloneTask(long id) throws EntityNotFoundException
TaskServicetaskId.cloneTask in interface TaskServiceEntityNotFoundExceptionpublic TaskDto getTask(long id) throws EntityNotFoundException
TaskServicetaskId.getTask in interface TaskServiceEntityNotFoundException - when user is not authorized to get task.public Set<String> getMentionedUsers(long taskId)
getMentionedUsers in interface TaskServicepublic ChangeLogEntry addTaskLog(long id, String username, String actionName, String target) throws EntityNotFoundException
TaskServicetaskId.addTaskLog in interface TaskServiceid - the given task id.username - the given username.actionName - the given action name.target - the given target.EntityNotFoundException - when user is not authorized to add taskLog.public List<ChangeLogEntry> getTaskLogs(long taskId, int offset, int limit) throws Exception
getTaskLogs in interface TaskServiceExceptionpublic List<TaskDto> findTasks(TaskQuery query, int offset, int limit) throws Exception
TaskServicefindTasks in interface TaskServicequery - term to search in title or descriptionlimit - term to limit results.List of TaskDtoExceptionpublic int countTasks(TaskQuery query) throws Exception
countTasks in interface TaskServiceExceptionpublic <T> List<T> selectTaskField(TaskQuery query, String fieldName)
selectTaskField in interface TaskServicepublic List<TaskDto> findTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy, int offset, int limit) throws Exception
findTasksByLabel in interface TaskServiceExceptionpublic int countTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy) throws Exception
countTasksByLabel in interface TaskServiceExceptionpublic TaskDto findTaskByActivityId(String id)
findTaskByActivityId in interface TaskServicepublic Set<String> getCoworker(long taskId)
getCoworker in interface TaskServicepublic List<TaskDto> getUncompletedTasks(String user, int limit)
getUncompletedTasks in interface TaskServicepublic Long countUncompletedTasks(String user)
countUncompletedTasks in interface TaskServicepublic List<TaskDto> getWatchedTasks(String user, int limit)
getWatchedTasks in interface TaskServicepublic Long countWatchedTasks(String user)
countWatchedTasks in interface TaskServicepublic List<TaskDto> getAssignedTasks(String user, int limit)
getAssignedTasks in interface TaskServicepublic Long countAssignedTasks(String user)
countAssignedTasks in interface TaskServicepublic List<TaskDto> getCollaboratedTasks(String user, int limit)
getCollaboratedTasks in interface TaskServicepublic Long countCollaboratedTasks(String user)
countCollaboratedTasks in interface TaskServicepublic List<TaskDto> findTasks(String user, String query, int limit)
findTasks in interface TaskServicepublic long countTasks(String user, String query)
TaskServicecountTasks in interface TaskServiceuser - usernamequery - term to search in title or descriptionpublic List<TaskDto> getIncomingTasks(String user, int offset, int limit) throws Exception
getIncomingTasks in interface TaskServiceExceptionpublic int countIncomingTasks(String user) throws Exception
countIncomingTasks in interface TaskServiceExceptionpublic List<TaskDto> getOverdueTasks(String user, int limit)
getOverdueTasks in interface TaskServicepublic Long countOverdueTasks(String user)
countOverdueTasks in interface TaskServicepublic void addWatcherToTask(String user, TaskDto task) throws Exception
addWatcherToTask in interface TaskServiceExceptionpublic void deleteWatcherOfTask(String user, TaskDto task) throws Exception
deleteWatcherOfTask in interface TaskServiceExceptionpublic Set<String> getWatchersOfTask(TaskDto task)
getWatchersOfTask in interface TaskServicepublic List<Object[]> countTaskStatusByProject(long projectId)
countTaskStatusByProject in interface TaskServicepublic TasksList filterTasks(String query, long projectId, String keyword, List<Long> labels, TaskUtil.DUE dueDate, Priority priority, List<String> assignees, List<String> coworker, List<String> watchers, Long labelId, Long statusId, org.exoplatform.services.security.Identity currIdentity, String dueCategory, String space_group_id, TimeZone userTimezone, boolean isShowCompleted, boolean advanceSearch, boolean noProjPermission, boolean noLblPermission, String orderBy, String groupBy, int offset, int limit) throws Exception
filterTasks in interface TaskServiceExceptionpublic boolean isExternal(String userId)
isExternal in interface TaskServiceCopyright © 2003–2021 eXo Platform SAS. All rights reserved.