Class TaskStorageImpl
java.lang.Object
org.exoplatform.task.storage.impl.TaskStorageImpl
- All Implemented Interfaces:
TaskStorage
-
Constructor Summary
ConstructorsConstructorDescriptionTaskStorageImpl(DAOHandler daoHandler, UserService userService, ProjectStorage projectStorage, TaskSearchConnector taskSearchConnector) -
Method Summary
Modifier and TypeMethodDescriptionaddTaskLog(ChangeLogEntry changeLogEntry) Create a log associated with a task with givenchangeLogEntry.voidaddWatcherToTask(String username, TaskDto task) countAssignedTasks(String user) countCollaboratedTasks(String user) intcountIncomingTasks(String user) countOverdueTasks(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) intcountTaskStatusByProject(long projectId) countUncompletedTasks(String user) countWatchedTasks(String user) createTask(TaskDto task) Create a new task.voidDelete the provided task.voiddeleteWatcherOfTask(String username, TaskDto task) findByUser(String user) findTaskByActivityId(String activityId) Find tasks assigned to a user using a term to find in title or description of the taskfindTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy, int offset, int limit) getAllIds(int offset, int limit) Retrieves a paginated list of all task IDs.getAssignedTasks(String user, int limit) getCollaboratedTasks(String user, int limit) getCoworker(long taskid) getIncomingTasks(String user, int offset, int limit) getOverdueTasks(String user, int limit) getTaskById(long id) Find task by its idgetTaskLogs(long taskId, int offset, int limit) getTaskWithCoworkers(long id) getUncompletedTasks(String user, int limit) getWatchedTasks(String user, int limit) getWatchersOfTask(TaskDto task) <T> List<T> selectTaskField(TaskQuery query, String fieldName) Update the provided task.voidupdateStatus(Status stOld, Status stNew) voidupdateTaskOrder(long currentTaskId, Status newStatus, long[] orders)
-
Constructor Details
-
TaskStorageImpl
public TaskStorageImpl(DAOHandler daoHandler, UserService userService, ProjectStorage projectStorage, TaskSearchConnector taskSearchConnector)
-
-
Method Details
-
getTaskById
Description copied from interface:TaskStorageFind task by its id- Specified by:
getTaskByIdin interfaceTaskStorage- Parameters:
id- the given id.- Returns:
TaskDto
-
createTask
Description copied from interface:TaskStorageCreate a new task.- Specified by:
createTaskin interfaceTaskStorage- Parameters:
task- the given task- Returns:
TaskDto
-
update
Description copied from interface:TaskStorageUpdate the provided task.- Specified by:
updatein interfaceTaskStorage- Parameters:
task- the given task.- Returns:
TaskDto
-
delete
Description copied from interface:TaskStorageDelete the provided task.- Specified by:
deletein interfaceTaskStorage- Parameters:
task- the provided task.
-
findTasksByLabel
public List<TaskDto> findTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy, int offset, int limit) throws Exception - Specified by:
findTasksByLabelin interfaceTaskStorage- Throws:
Exception
-
countTasksByLabel
public int countTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy) throws Exception - Specified by:
countTasksByLabelin interfaceTaskStorage- Throws:
Exception
-
findByUser
- Specified by:
findByUserin interfaceTaskStorage
-
findTasks
- Specified by:
findTasksin interfaceTaskStorage- Throws:
Exception
-
countTasks
- Specified by:
countTasksin interfaceTaskStorage- Throws:
Exception
-
selectTaskField
- Specified by:
selectTaskFieldin interfaceTaskStorage
-
findTaskByActivityId
- Specified by:
findTaskByActivityIdin interfaceTaskStorage
-
updateStatus
- Specified by:
updateStatusin interfaceTaskStorage
-
updateTaskOrder
- Specified by:
updateTaskOrderin interfaceTaskStorage
-
getCoworker
- Specified by:
getCoworkerin interfaceTaskStorage
-
getTaskWithCoworkers
- Specified by:
getTaskWithCoworkersin interfaceTaskStorage
-
getUncompletedTasks
- Specified by:
getUncompletedTasksin interfaceTaskStorage
-
countUncompletedTasks
- Specified by:
countUncompletedTasksin interfaceTaskStorage
-
getAssignedTasks
- Specified by:
getAssignedTasksin interfaceTaskStorage
-
countAssignedTasks
- Specified by:
countAssignedTasksin interfaceTaskStorage
-
getWatchedTasks
- Specified by:
getWatchedTasksin interfaceTaskStorage
-
countWatchedTasks
- Specified by:
countWatchedTasksin interfaceTaskStorage
-
getCollaboratedTasks
- Specified by:
getCollaboratedTasksin interfaceTaskStorage
-
countCollaboratedTasks
- Specified by:
countCollaboratedTasksin interfaceTaskStorage
-
getIncomingTasks
- Specified by:
getIncomingTasksin interfaceTaskStorage- Throws:
Exception
-
countIncomingTasks
- Specified by:
countIncomingTasksin interfaceTaskStorage- Throws:
Exception
-
getOverdueTasks
- Specified by:
getOverdueTasksin interfaceTaskStorage
-
countOverdueTasks
- Specified by:
countOverdueTasksin interfaceTaskStorage
-
addWatcherToTask
- Specified by:
addWatcherToTaskin interfaceTaskStorage
-
deleteWatcherOfTask
- Specified by:
deleteWatcherOfTaskin interfaceTaskStorage- Throws:
Exception
-
getWatchersOfTask
- Specified by:
getWatchersOfTaskin interfaceTaskStorage
-
findTasks
Find tasks assigned to a user using a term to find in title or description of the task- Specified by:
findTasksin interfaceTaskStorage- Parameters:
user- usernamememberships- membershipsquery- term to search in title or descriptionlimit- term to limit results.- Returns:
ListofTask
-
countTasks
Count tasks assigned to a user using a search term to find in title or description of the task- Specified by:
countTasksin interfaceTaskStorage- Parameters:
user- usernamequery- term to search in title or description- Returns:
- tasks count
-
addTaskLog
Description copied from interface:TaskStorageCreate a log associated with a task with givenchangeLogEntry.- Specified by:
addTaskLogin interfaceTaskStorage- Parameters:
changeLogEntry- changeLogEntry- Returns:
- Create a log associated
- Throws:
EntityNotFoundException- when user is not authorized to add taskLog.
-
getTaskLogs
- Specified by:
getTaskLogsin interfaceTaskStorage- Throws:
Exception
-
countTaskStatusByProject
- Specified by:
countTaskStatusByProjectin interfaceTaskStorage
-
getAllIds
Description copied from interface:TaskStorageRetrieves a paginated list of all task IDs.- Specified by:
getAllIdsin interfaceTaskStorage- Parameters:
offset- the starting position of the first resultlimit- the maximum number of results to retrieve- Returns:
- a list of task IDs
-