Package org.exoplatform.task.storage
Interface TaskStorage
-
- All Known Implementing Classes:
TaskStorageImpl
public interface TaskStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChangeLogEntryaddTaskLog(ChangeLogEntry changeLogEntry)Create a log associated with a task with givenchangeLogEntry.voidaddWatcherToTask(String username, TaskDto task)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.voiddelete(TaskDto task)Delete the provided task.voiddeleteWatcherOfTask(String username, TaskDto task)List<TaskDto>findByUser(String user)TaskDtofindTaskByActivityId(String activityId)List<TaskDto>findTasks(String user, List<String> memberships, String query, int limit)Find tasks assigned to a user using a term to find in title or description of the taskList<TaskDto>findTasks(TaskQuery query, int offset, int limit)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)List<TaskDto>getOverdueTasks(String user, int limit)TaskDtogetTaskById(long id)Find task by its idList<ChangeLogEntry>getTaskLogs(long taskId, int offset, int limit)TaskDtogetTaskWithCoworkers(long id)List<TaskDto>getUncompletedTasks(String user, int limit)List<TaskDto>getWatchedTasks(String user, int limit)Set<String>getWatchersOfTask(TaskDto task)<T> List<T>selectTaskField(TaskQuery query, String fieldName)TaskDtoupdate(TaskDto task)Update the provided task.voidupdateStatus(Status stOld, Status stNew)voidupdateTaskOrder(long currentTaskId, Status newStatus, long[] orders)
-
-
-
Method Detail
-
getTaskById
TaskDto getTaskById(long id)
Find task by its id- Parameters:
id- the given id.- Returns:
TaskDto
-
createTask
TaskDto createTask(TaskDto task)
Create a new task.- Parameters:
task- the given task- Returns:
TaskDto
-
update
TaskDto update(TaskDto task)
Update the provided task.- Parameters:
task- the given task.- Returns:
TaskDto
-
delete
void delete(TaskDto task)
Delete the provided task.- Parameters:
task- the provided task.
-
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
-
findTasks
List<TaskDto> findTasks(TaskQuery query, int offset, int limit) throws Exception
- Throws:
Exception
-
updateTaskOrder
void updateTaskOrder(long currentTaskId, Status newStatus, long[] orders)
-
getTaskWithCoworkers
TaskDto getTaskWithCoworkers(long id)
-
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(String user, List<String> memberships, String query, int limit)
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
-
addTaskLog
ChangeLogEntry addTaskLog(ChangeLogEntry changeLogEntry) throws EntityNotFoundException
Create a log associated with a task with givenchangeLogEntry.- Parameters:
changeLogEntry- changeLogEntry- Returns:
- Create a log associated
- Throws:
EntityNotFoundException- when user is not authorized to add taskLog.
-
getTaskLogs
List<ChangeLogEntry> getTaskLogs(long taskId, int offset, int limit) throws Exception
- Throws:
Exception
-
-