public class TaskStorageImpl extends Object implements TaskStorage
| Constructor and Description |
|---|
TaskStorageImpl(DAOHandler daoHandler,
UserService userService) |
| Modifier and Type | Method and Description |
|---|---|
ChangeLogEntry |
addTaskLog(ChangeLogEntry changeLogEntry)
Create a log associated with a task with given
changeLogEntry. |
void |
addWatcherToTask(String username,
TaskDto task) |
ChangeLogEntry |
changeLogToDto(ChangeLog changeLog) |
ChangeLog |
changeLogToEntity(ChangeLogEntry changeLogEntry) |
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 |
delete(TaskDto task)
Delete the provided task.
|
void |
deleteWatcherOfTask(String username,
TaskDto task) |
List<TaskDto> |
findByUser(String user) |
TaskDto |
findTaskByActivityId(String activityId) |
List<TaskDto> |
findTasks(String user,
String query,
int limit)
Find tasks assigned to a user using a term to find in title or description
of the task
|
List<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) |
TaskDto |
getTaskById(long id)
Find task by its id
|
List<ChangeLogEntry> |
getTaskLogs(long taskId,
int offset,
int limit) |
TaskDto |
getTaskWithCoworkers(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) |
TaskDto |
toDto(Task taskEntity) |
Task |
toEntity(TaskDto taskDto) |
TaskDto |
update(TaskDto task)
Update the provided task.
|
void |
updateStatus(Status stOld,
Status stNew) |
void |
updateTaskOrder(long currentTaskId,
Status newStatus,
long[] orders) |
public TaskStorageImpl(DAOHandler daoHandler, UserService userService)
public TaskDto getTaskById(long id)
TaskStoragegetTaskById in interface TaskStorageid - the given id.TaskDtopublic TaskDto createTask(TaskDto task)
TaskStoragecreateTask in interface TaskStoragetask - the given taskTaskDtopublic TaskDto update(TaskDto task)
TaskStorageupdate in interface TaskStoragetask - the given task.TaskDtopublic void delete(TaskDto task)
TaskStoragedelete in interface TaskStoragetask - the provided task.public List<TaskDto> findTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy, int offset, int limit) throws Exception
findTasksByLabel in interface TaskStorageExceptionpublic int countTasksByLabel(LabelDto label, List<Long> projectIds, String username, OrderBy orderBy) throws Exception
countTasksByLabel in interface TaskStorageExceptionpublic List<TaskDto> findByUser(String user)
findByUser in interface TaskStoragepublic List<TaskDto> findTasks(TaskQuery query, int offset, int limit) throws Exception
findTasks in interface TaskStorageExceptionpublic int countTasks(TaskQuery query) throws Exception
countTasks in interface TaskStorageExceptionpublic <T> List<T> selectTaskField(TaskQuery query, String fieldName)
selectTaskField in interface TaskStoragepublic TaskDto findTaskByActivityId(String activityId)
findTaskByActivityId in interface TaskStoragepublic void updateStatus(Status stOld, Status stNew)
updateStatus in interface TaskStoragepublic void updateTaskOrder(long currentTaskId,
Status newStatus,
long[] orders)
updateTaskOrder in interface TaskStoragepublic Set<String> getCoworker(long taskid)
getCoworker in interface TaskStoragepublic TaskDto getTaskWithCoworkers(long id)
getTaskWithCoworkers in interface TaskStoragepublic List<TaskDto> getUncompletedTasks(String user, int limit)
getUncompletedTasks in interface TaskStoragepublic Long countUncompletedTasks(String user)
countUncompletedTasks in interface TaskStoragepublic List<TaskDto> getAssignedTasks(String user, int limit)
getAssignedTasks in interface TaskStoragepublic Long countAssignedTasks(String user)
countAssignedTasks in interface TaskStoragepublic List<TaskDto> getWatchedTasks(String user, int limit)
getWatchedTasks in interface TaskStoragepublic Long countWatchedTasks(String user)
countWatchedTasks in interface TaskStoragepublic List<TaskDto> getCollaboratedTasks(String user, int limit)
getCollaboratedTasks in interface TaskStoragepublic Long countCollaboratedTasks(String user)
countCollaboratedTasks in interface TaskStoragepublic List<TaskDto> getIncomingTasks(String user, int offset, int limit) throws Exception
getIncomingTasks in interface TaskStorageExceptionpublic int countIncomingTasks(String user) throws Exception
countIncomingTasks in interface TaskStorageExceptionpublic List<TaskDto> getOverdueTasks(String user, int limit)
getOverdueTasks in interface TaskStoragepublic Long countOverdueTasks(String user)
countOverdueTasks in interface TaskStoragepublic void addWatcherToTask(String username, TaskDto task)
addWatcherToTask in interface TaskStoragepublic void deleteWatcherOfTask(String username, TaskDto task) throws Exception
deleteWatcherOfTask in interface TaskStorageExceptionpublic Set<String> getWatchersOfTask(TaskDto task)
getWatchersOfTask in interface TaskStoragepublic List<TaskDto> findTasks(String user, String query, int limit)
findTasks in interface TaskStorageuser - usernamequery - term to search in title or descriptionlimit - List of Taskpublic long countTasks(String user, String query)
countTasks in interface TaskStorageuser - usernamequery - term to search in title or descriptionpublic ChangeLogEntry addTaskLog(ChangeLogEntry changeLogEntry) throws EntityNotFoundException
TaskStoragechangeLogEntry.addTaskLog in interface TaskStoragechangeLogEntry - changeLogEntryEntityNotFoundException - when user is not authorized to add taskLog.public List<ChangeLogEntry> getTaskLogs(long taskId, int offset, int limit) throws Exception
getTaskLogs in interface TaskStorageExceptionpublic List<Object[]> countTaskStatusByProject(long projectId)
countTaskStatusByProject in interface TaskStoragepublic ChangeLog changeLogToEntity(ChangeLogEntry changeLogEntry)
changeLogToEntity in interface TaskStoragepublic ChangeLogEntry changeLogToDto(ChangeLog changeLog)
changeLogToDto in interface TaskStoragepublic Task toEntity(TaskDto taskDto)
toEntity in interface TaskStoragepublic TaskDto toDto(Task taskEntity)
toDto in interface TaskStorageCopyright © 2003–2021 eXo Platform SAS. All rights reserved.