Package org.exoplatform.task.service
Interface TaskService
-
- All Known Implementing Classes:
TaskServiceImpl
public interface TaskService
-
-
Field Summary
Fields Modifier and Type Field Description static StringTASK_COMMENT_CREATIONstatic StringTASK_CREATIONstatic StringTASK_UPDATE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChangeLogEntryaddTaskLog(long taskId, String username, String actionName, String target)Create a log associated with a task with giventaskId.voidaddWatcherToTask(String username, TaskDto task)TaskDtocloneTask(long taskId)Clone the task from a task with giventaskId.LongcountAssignedTasks(String user)LongcountCollaboratedTasks(String user)intcountIncomingTasks(String user)LongcountOverdueTasks(String user)longcountTasks(String user, String query)Count tasks assigned to a user using a search term to find in title or description of the taskintcountTasks(TaskQuery query)intcountTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy)List<Object[]>countTaskStatusByProject(long projectId)LongcountUncompletedTasks(String user)LongcountWatchedTasks(String user)TaskDtocreateTask(TaskDto task)Create a new task.voiddeleteWatcherOfTask(String username, TaskDto task)TasksListfilterTasks(String query, long projectId, String keyword, List<Long> labels, TaskUtil.DUE dueDate, Priority priority, List<String> assignees, List<String> coworkers, 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)TaskDtofindTaskByActivityId(String activityId)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 taskList<TaskDto>findTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy, int offset, int limit)List<TaskDto>findTasksByMemberShips(String user, List<String> memberships, String query, 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)TaskDtogetTask(long taskId)Return the task with giventaskId.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)booleanisExternal(String userId)voidremoveTask(long taskId)Remove the task with giventaskId<T> List<T>selectTaskField(TaskQuery query, String fieldName)TaskDtoupdateTask(TaskDto task)Update the task.voidupdateTaskOrder(long currentTaskId, Status newStatus, long[] orders)
-
-
-
Field Detail
-
TASK_CREATION
static final String TASK_CREATION
- See Also:
- Constant Field Values
-
TASK_UPDATE
static final String TASK_UPDATE
- See Also:
- Constant Field Values
-
TASK_COMMENT_CREATION
static final String TASK_COMMENT_CREATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
createTask
TaskDto createTask(TaskDto task)
Create a new task.- Parameters:
task- the given task.- Returns:
- the created task.
-
updateTask
TaskDto updateTask(TaskDto task)
Update the task.- Parameters:
task- the given task.- Returns:
- TaskDto the updated task.
-
updateTaskOrder
void updateTaskOrder(long currentTaskId, Status newStatus, long[] orders)
-
removeTask
void removeTask(long taskId) throws EntityNotFoundExceptionRemove the task with giventaskId- Parameters:
taskId- the given task id.- Throws:
EntityNotFoundException- when task is not found.
-
cloneTask
TaskDto cloneTask(long taskId) throws EntityNotFoundException
Clone the task from a task with giventaskId.- Parameters:
taskId- the task Id- Returns:
- the cloned task.
- Throws:
EntityNotFoundException- when task is not found.
-
getTask
TaskDto getTask(long taskId) throws EntityNotFoundException
Return the task with giventaskId.- Parameters:
taskId- the task Id- Returns:
- the given task.
- Throws:
EntityNotFoundException- when task is not found.
-
findTasksByMemberShips
List<TaskDto> findTasksByMemberShips(String user, List<String> memberships, String query, int limit)
-
findTasksByLabel
List<TaskDto> findTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy, int offset, int limit) throws Exception
- Throws:
Exception
-
countTasksByLabel
int countTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy) throws Exception
- Throws:
Exception
-
addTaskLog
ChangeLogEntry addTaskLog(long taskId, String username, String actionName, String target) throws EntityNotFoundException
Create a log associated with a task with giventaskId.- Parameters:
taskId- the given task id.username- the given username.actionName- the given action name.target- the given target.- Returns:
- add task log.
- Throws:
EntityNotFoundException- when task is not found.
-
getTaskLogs
List<ChangeLogEntry> getTaskLogs(long taskId, int offset, int limit) throws Exception
- Throws:
Exception
-
getIncomingTasks
List<TaskDto> getIncomingTasks(String user, int offset, int limit) throws Exception
- Throws:
Exception
-
addWatcherToTask
void addWatcherToTask(String username, TaskDto task) throws Exception
- Throws:
Exception
-
deleteWatcherOfTask
void deleteWatcherOfTask(String username, TaskDto task) throws Exception
- Throws:
Exception
-
findTasks
List<TaskDto> findTasks(TaskQuery query, int offset, int limit) throws Exception
Find tasks assigned to a user using a term to find in title or description of the task
-
countTasks
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- Parameters:
user- usernamequery- term to search in title or description- Returns:
- tasks count
-
filterTasks
TasksList filterTasks(String query, long projectId, String keyword, List<Long> labels, TaskUtil.DUE dueDate, Priority priority, List<String> assignees, List<String> coworkers, 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
- Throws:
Exception
-
isExternal
boolean isExternal(String userId)
-
-