Class TaskMcpTool
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin
-
Field Summary
Fields inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin
DEFAULT_LIMIT, DEFAULT_OFFSET -
Constructor Summary
ConstructorsConstructorDescriptionTaskMcpTool(ProjectService projectService, StatusService statusService, TaskService taskService, CommentService commentService, LabelService labelService, org.exoplatform.social.core.space.spi.SpaceService spaceService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.services.resources.ResourceBundleService resourceBundleService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.portal.config.UserACL userAcl, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.metadata.favorite.FavoriteService favoriteService, TaskSpaceScopeResolver spaceScopeResolver) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProjectLabelToTask(Long taskId, Long labelId) Adds one of the labels of the task's project to the task.addProjectMember(Long projectId, String username) addTaskComment(long taskId, String text) Comments on a task the current user can access.addTaskCoworker(long taskId, String username) Adds a coworker who can access the task; in a call limited to a space, the coworker must also be a member or a super manager of that space.assignTask(long taskId, String username) Assigns a task to a user who can access it; in a call limited to a space, the user must also be a member or a super manager of that space.assignTaskToMe(long taskId) completeTask(long taskId) createPersonalTask(String title, String description, String assignee, Set<String> coworkers, String startDate, String dueDate, Priority priority, Long statusId) Creates a personal (label-less, project-less) task.createProjectInSpace(Long spaceId, String title, String description, String dueDate) createProjectLabel(Long projectId, String labelName) createProjectStatus(Long projectId, String name) createTaskInProject(long projectId, String title, String description, String assignee, Set<String> coworkers, String startDate, String dueDate, Priority priority, Long statusId) Creates a task inside a project.voiddeleteProjectLabel(long labelId) voiddeleteTaskComment(long commentId) voidfavoriteProject(Long projectId) voidfavoriteTask(long taskId) protected ZoneIdgetProjectById(Long projectId) getProjectIdByTaskId(Long taskId) getProjectStatistics(Long projectId) protected LonggetTaskById(Long taskId) protected LocalDateprotected booleanlistAssignedTasks(Integer offset, Integer limit, Boolean overdueOnly, String changedSince, String completedSince, Boolean includeDescription) Lists the open tasks assigned to the current user, or of which they are a coworker; withoverdueOnly, only those whose due date is before today in the user's time zone (EXO-91122).listProjectActivitySince(Long projectId, Integer days) listProjectLabels(Long projectId) listProjects(Long spaceId, Integer offset, Integer limit, String name) Lists the task projects of the current user or, given a space, those of that space the current user holds a role of the space group for.listProjectStatuses(Long projectId) listTaskCommentsById(Long taskId, Integer offset, Integer limit) Lists the comments of a task, each followed by its replies.listTaskLabels(long taskId) listTasks(Long projectId, Boolean hideCompletedTasks, Boolean includeChangeLog, Boolean overdueOnly, Integer offset, Integer limit, String title, String changedSince, String completedSince, String assignee, Long statusId, Boolean includeDescription) Lists the tasks of a project, or, without one, every task the current user can access, personal tasks included; withoverdueOnly, only the open tasks whose due date is before today in the user's time zone (EXO-91122).listUnscheduledTasks(Long projectId, Integer limit, Boolean includeDescription) Lists the open tasks of a project that have neither a start nor a due date, among its 100 most recently active open tasks.moveTasksToProject(List<Long> taskIds, long projectId, Long statusId) Moves tasks to another project, all or none: every task, the target project and the status are checked first, and the move itself is one transaction (TaskService.moveTasks(List, long, Identity)), so a refusal moves nothing.voidremoveProjectLabelFromTask(Long taskId, Long labelId) Removes one of the labels of the task's project from the task.removeProjectManager(Long projectId, String username) removeProjectMember(Long projectId, String username) renameProjectStatus(Long statusId, String name) reopenTask(long taskId) searchTasks(String query, Long projectId, Boolean includeCompleted, Integer limit) Searches the tasks the current user can view by a text in their title or description, ignoring case and accents: the tool's adapter ofTaskService.searchTasks(String, Long, boolean, int, Identity), which holds the rules.setProjectManager(Long projectId, String username) setTaskDates(long taskId, String startDate, String dueDate) Patches a task's start and due dates.setTaskPriority(long taskId, Priority priority) unassignMeFromTasks(List<Long> taskIds) Removes the current user from tasks, all or none: on each task the user is no longer its assignee nor one of its coworkers, the two roleslistAssignedTasks(Integer, Integer, Boolean, String, String, Boolean)counts; the other coworkers stay.voidunfavoriteProject(Long projectId) voidunfavoriteTask(long taskId) updateProject(Long projectId, String name, String description, String color) updateProjectLabel(long labelId, String name) updateTaskDescription(long taskId, String description) voidupdateTaskStatus(Long taskId, Long statusId) updateTaskTitle(long taskId, String title) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin
getCurrentUserAclIdentity, getCurrentUserLocale, getCurrentUserLocale, getCurrentUserName, getLocale
-
Constructor Details
-
TaskMcpTool
public TaskMcpTool(ProjectService projectService, StatusService statusService, TaskService taskService, CommentService commentService, LabelService labelService, org.exoplatform.social.core.space.spi.SpaceService spaceService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.services.resources.ResourceBundleService resourceBundleService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.portal.config.UserACL userAcl, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, org.exoplatform.social.metadata.favorite.FavoriteService favoriteService, TaskSpaceScopeResolver spaceScopeResolver) - Parameters:
projectService- reads and lists the projectsstatusService- reads and creates the statuses of a projecttaskService- reads and creates the taskscommentService- reads and writes the comments of a tasklabelService- reads and writes the labels of a projectspaceService- reads the spacestranslationService- translates the labels given back to the modelresourceBundleService- reads the resource bundlesidentityManager- reads the identities of the usersprofilePropertyService- reads the profile properties of the usersuserAcl- checks the permissions of the current userportalConfigService- reads the portal configurationpermanentLinkService- builds the permanent links of the objectsfavoriteService- reads and writes the favoritesspaceScopeResolver- tells the space of a project, for a run limited to a space
-
-
Method Details
-
listProjects
public ProjectCollectionModel listProjects(Long spaceId, Integer offset, Integer limit, String name) Lists the task projects of the current user or, given a space, those of that space the current user holds a role of the space group for. For a user who isn't a member of the space, and for a space id that names no space (missing or deleted), the list is empty.In a run limited to a space (a space scope on the call), the list is narrowed to the projects the space scope accepts for that space, those
TaskSpaceScopeResolver.spaceOfProject(ProjectDto)tells it for, so that the list never holds a project the space scope refuses to get. The selection is read in chunks of 50 projects, in the order of the plain list, and stops as soon as one more project than the page asks for is kept: it reads at most the projects the user reaches, a chunk at a time, and no more than the page needs when the space has enough of them. The count is the number of projects of the space when the scan reached the end; when it stopped earlier, it is the number kept so far, which is more than the offset and the page, and means that more exist;has_moreis exact in both cases.With
name, only the projects whose name holds all its words, each one ignoring case, among those the other arguments select; when none of them does andnameholds more than one word, those whose name holds any one of its words. Each project comes as a list item, without its description, statuses or labels, whichgetProjectById(Long)returns.- Parameters:
spaceId- the space whose projects are listed, null or not positive for the projects of the current useroffset- the first project returnedlimit- the most projects returned, 100 at mostname- words of the name of the projects listed, blank for any- Returns:
- the projects, with their count and whether more remain
-
getScopeSpaceId
- Returns:
- the space the current call is limited to, null when it isn't
- Throws:
IllegalStateException- when the call's identity can't be read
-
isSpaceScoped
protected boolean isSpaceScoped()- Returns:
- true when the current call is limited to a space; also true when its identity can't be read, which a limited call must never be taken for the opposite of
-
listAssignedTasks
public TaskCollectionModel listAssignedTasks(Integer offset, Integer limit, Boolean overdueOnly, String changedSince, String completedSince, Boolean includeDescription) Lists the open tasks assigned to the current user, or of which they are a coworker; withoverdueOnly, only those whose due date is before today in the user's time zone (EXO-91122). Each task past its due date carries its days overdue. WithchangedSince, only the tasks whose status, due date, assignee or completion changed since that date, and withcompletedSinceonly those completed since that date, completed tasks included, each with its changes since that date (EXO-91902). Asking both the overdue tasks and the tasks completed since a date is refused. Without any of these filters, the open tasks, the most recently active first. Each task comes as a list item, without its description or coworkers, whichgetTaskById(Long)returns; withincludeDescription, with its description as cut plain text.- Parameters:
offset- the first task returnedlimit- the most tasks returned, 100 at mostoverdueOnly- whether only the overdue tasks are listedchangedSince- a date or date-time, blank for no conditioncompletedSince- a date or date-time, blank for no conditionincludeDescription- whether each task carries its description as plain text, cut at 500 characters- Returns:
- the tasks, with their count and whether more remain
-
listTasks
public TaskCollectionModel listTasks(Long projectId, Boolean hideCompletedTasks, Boolean includeChangeLog, Boolean overdueOnly, Integer offset, Integer limit, String title, String changedSince, String completedSince, String assignee, Long statusId, Boolean includeDescription) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException Lists the tasks of a project, or, without one, every task the current user can access, personal tasks included; withoverdueOnly, only the open tasks whose due date is before today in the user's time zone (EXO-91122). Each open task past its due date carries its days overdue. Withtitle, only the tasks whose title contains it, ignoring case, among those the other filters select: the title narrows the project, or the accessible tasks, and never widens them. WithchangedSince, only the tasks whose status, due date, assignee or completion changed since that date; withcompletedSince, only the tasks completed since that date, whateverhideCompletedTaskssays; withassignee, only the tasks assigned to that user; withstatusId, only the tasks in that status (EXO-91902). A task listed withchangedSinceorcompletedSincecarries its changes since that date. Asking both the overdue tasks, which are open, and the tasks completed since a date is refused. The count is the count of the tasks the same filters select.Each task comes as a list item, without its description or coworkers, which
getTaskById(Long)returns; withincludeDescription, with its description as plain text, cut at 500 characters; withincludeChangeLog, each comes in full, with its change log.- Parameters:
projectId- the project, null for every accessible taskhideCompletedTasks- whether the completed tasks are left outincludeChangeLog- whether each task comes in full, with its change logoverdueOnly- whether only the overdue tasks are listedoffset- the first task returnedlimit- the most tasks returned, 100 at mosttitle- a part of the title of the tasks listed, blank for anychangedSince- a date or date-time, blank for no conditioncompletedSince- a date or date-time, blank for no conditionassignee- the username of the assignee, blank for anystatusId- the status of the tasks listed, null for anyincludeDescription- whether each list item carries its description as cut plain text- Returns:
- the tasks, with their count and whether more remain
- Throws:
IllegalAccessException- when the user can't view the projectorg.exoplatform.commons.exception.ObjectNotFoundException- when the project doesn't existIllegalArgumentException- when a date is no date, or when bothoverdueOnlyandcompletedSinceare given
-
searchTasks
public TaskSearchCollectionModel searchTasks(String query, Long projectId, Boolean includeCompleted, Integer limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException Searches the tasks the current user can view by a text in their title or description, ignoring case and accents: the tool's adapter ofTaskService.searchTasks(String, Long, boolean, int, Identity), which holds the rules. It reads the tool's arguments, turns the service's refusals into the tool's messages and maps the tasks found to what tells them apart on their board.- Parameters:
query- the text searched: every word in the title, or every word in the description; the index does not search numbers, so the text must hold a word with lettersprojectId- the project, null for every task the user can viewincludeCompleted- whether the completed tasks are returned, after the open oneslimit- the most tasks returned- Returns:
- the tasks found, and whether more may match than were returned
- Throws:
IllegalAccessException- when the user can't view the projectorg.exoplatform.commons.exception.ObjectNotFoundException- when the project doesn't exist
-
getProjectById
public ProjectModel getProjectById(Long projectId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getProjectIdByTaskId
public Long getProjectIdByTaskId(Long taskId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getTaskById
public TaskModel getTaskById(Long taskId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
listTaskCommentsById
public TaskCommentCollectionModel listTaskCommentsById(Long taskId, Integer offset, Integer limit) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Lists the comments of a task, each followed by its replies.- Parameters:
taskId- the taskoffset- the first comment returnedlimit- the most comments returned, replies aside, 100 at most- Returns:
- the comments, with their count
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the task doesn't existIllegalAccessException- when the user can't view the task
-
createProjectInSpace
public ProjectModel createProjectInSpace(Long spaceId, String title, String description, String dueDate) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
createTaskInProject
public TaskModel createTaskInProject(long projectId, String title, String description, String assignee, Set<String> coworkers, String startDate, String dueDate, Priority priority, Long statusId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Creates a task inside a project. Dates mirror the Task UI: a "Start Date" and a "Due date" (the vestigialendDatefield is intentionally not exposed here).- Parameters:
projectId- id of the project to create the task intitle- task titledescription- task descriptionassignee- username of the assignee, or blank for the calling user: a personal task shows only in its assignee's list, so one without an assignee would be listed nowherecoworkers- usernames of the coworkersstartDate- the start date (ISO string), or blank for nonedueDate- the due date (ISO string), or blank for nonepriority- task priority (defaults toPriority.NONEwhen null)statusId- id of the target status, or null for the project default status- Returns:
- the created task model
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- if the project does not existIllegalAccessException- if the current user cannot create tasks in the project
-
createPersonalTask
public TaskModel createPersonalTask(String title, String description, String assignee, Set<String> coworkers, String startDate, String dueDate, Priority priority, Long statusId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Creates a personal (label-less, project-less) task. Dates mirror the Task UI: a "Start Date" and a "Due date" (the vestigialendDatefield is intentionally not exposed here).- Parameters:
title- task titledescription- task descriptionassignee- username of the assigneecoworkers- usernames of the coworkersstartDate- the start date (ISO string), or blank for nonedueDate- the due date (ISO string), or blank for nonepriority- task priority (defaults toPriority.NONEwhen null)statusId- id of the target status, or null for none; the task is then stored in that status's project, which the current user must be able to view- Returns:
- the created task model
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- if the status does not existIllegalAccessException- if the current user cannot create tasks in the project of the status
-
addTaskComment
public TaskCommentModel addTaskComment(long taskId, String text) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Comments on a task the current user can access. Every user the text mentions is notified, so in a call limited to a space each one must be a member or a super manager of that space.- Parameters:
taskId- the tasktext- the comment, which may mention users- Returns:
- the comment
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the task doesn't existIllegalAccessException- when the current user can't access the task, or, in a call limited to a space, the text mentions a user who is neither a member nor a super manager of it
-
updateTaskTitle
public TaskModel updateTaskTitle(long taskId, String title) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
updateTaskDescription
public TaskModel updateTaskDescription(long taskId, String description) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
assignTaskToMe
public TaskModel assignTaskToMe(long taskId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
assignTask
public TaskModel assignTask(long taskId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Assigns a task to a user who can access it; in a call limited to a space, the user must also be a member or a super manager of that space.- Parameters:
taskId- the task, which the current user can accessusername- the assignee's login, with or without a leading@- Returns:
- the updated task
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the task or the user doesn't existIllegalAccessException- when the current user or the assignee can't access the task, or, in a call limited to a space, the assignee is neither a member nor a super manager of it
-
addTaskCoworker
public TaskModel addTaskCoworker(long taskId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Adds a coworker who can access the task; in a call limited to a space, the coworker must also be a member or a super manager of that space.- Parameters:
taskId- the task, which the current user can accessusername- the coworker's login, with or without a leading@- Returns:
- the updated task
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when the task or the user doesn't existIllegalAccessException- when the current user or the coworker can't access the task, or, in a call limited to a space, the coworker is neither a member nor a super manager of it
-
listProjectLabels
- Throws:
IllegalAccessException
-
listProjectStatuses
- Throws:
IllegalAccessException
-
createProjectLabel
public ProjectLabel createProjectLabel(Long projectId, String labelName) throws IllegalAccessException - Throws:
IllegalAccessException
-
addProjectLabelToTask
public void addProjectLabelToTask(Long taskId, Long labelId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException Adds one of the labels of the task's project to the task.- Parameters:
taskId- the task, which the current user can accesslabelId- a label of the task's project; for a task in no project, any existing label- Throws:
IllegalAccessException- when the current user can't access the taskorg.exoplatform.commons.exception.ObjectNotFoundException- when the task doesn't exist, or the label doesn't exist or belongs to another project than the task's
-
removeProjectLabelFromTask
public void removeProjectLabelFromTask(Long taskId, Long labelId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException Removes one of the labels of the task's project from the task.- Parameters:
taskId- the task, which the current user can accesslabelId- a label of the task's project; for a task in no project, any existing label- Throws:
IllegalAccessException- when the current user can't access the taskorg.exoplatform.commons.exception.ObjectNotFoundException- when the task doesn't exist, or the label doesn't exist or belongs to another project than the task's
-
listTaskLabels
public List<ProjectLabel> listTaskLabels(long taskId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
updateProjectLabel
public ProjectLabel updateProjectLabel(long labelId, String name) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
deleteProjectLabel
public void deleteProjectLabel(long labelId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
updateTaskStatus
public void updateTaskStatus(Long taskId, Long statusId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
moveTasksToProject
public List<TaskModel> moveTasksToProject(List<Long> taskIds, long projectId, Long statusId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Moves tasks to another project, all or none: every task, the target project and the status are checked first, and the move itself is one transaction (TaskService.moveTasks(List, long, Identity)), so a refusal moves nothing. Each task takes the given status of the target project, or its default status. A task keeps its labels, as a move from the task drawer does; the source project's labels are not shown in the target project.- Parameters:
taskIds- ids of the tasks to move, at mostMAX_TO_LOADprojectId- id of the target projectstatusId- id of a status of the target project, or null for its default status- Returns:
- the moved tasks
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when a task, the project or the status is not foundIllegalAccessException- when the current user cannot edit one of the tasks or cannot view the target project
-
unassignMeFromTasks
public List<TaskModel> unassignMeFromTasks(List<Long> taskIds) throws org.exoplatform.commons.exception.ObjectNotFoundException Removes the current user from tasks, all or none: on each task the user is no longer its assignee nor one of its coworkers, the two roleslistAssignedTasks(Integer, Integer, Boolean, String, String, Boolean)counts; the other coworkers stay. A task the current user is neither the assignee nor a coworker of is refused, and the change is one transaction (TaskService.unassignTasks(List, Identity)), so a refusal changes nothing.- Parameters:
taskIds- ids of the tasks, at mostMAX_TO_LOAD- Returns:
- the updated tasks
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when a task is not found
-
setTaskDates
public TaskModel setTaskDates(long taskId, String startDate, String dueDate) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Patches a task's start and due dates. This is a partial update: only the dates actually passed (non-blank) are updated, so setting one date (e.g. the due date) never wipes the other one that was set before. These are the two dates surfaced by the Task UI ("Start Date" + "Due date"); the vestigialendDatefield is intentionally not exposed here.- Parameters:
taskId- id of the task to updatestartDate- the new start date (ISO string), or blank to leave it unchangeddueDate- the new due date (ISO string), or blank to leave it unchanged- Returns:
- the updated task model
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- if the task does not existIllegalAccessException- if the current user cannot edit the task
-
completeTask
public TaskModel completeTask(long taskId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
reopenTask
public TaskModel reopenTask(long taskId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
setTaskPriority
public TaskModel setTaskPriority(long taskId, Priority priority) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
listUnscheduledTasks
public TaskCollectionModel listUnscheduledTasks(Long projectId, Integer limit, Boolean includeDescription) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException Lists the open tasks of a project that have neither a start nor a due date, among its 100 most recently active open tasks. Each task comes as a list item, with its description as cut plain text withincludeDescription. The tool takes no offset:has_moresays more unscheduled tasks were found than the limit let through, and nonext_offsetis given.- Parameters:
projectId- the projectlimit- the most tasks returned, 100 at mostincludeDescription- whether each task carries its description as cut plain text- Returns:
- the tasks, with the count of those returned and whether more were found
- Throws:
IllegalAccessException- when the user can't view the projectorg.exoplatform.commons.exception.ObjectNotFoundException- when the project doesn't exist
-
updateProject
public ProjectModel updateProject(Long projectId, String name, String description, String color) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
addProjectMember
public ProjectModel addProjectMember(Long projectId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
removeProjectMember
public ProjectModel removeProjectMember(Long projectId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
setProjectManager
public ProjectModel setProjectManager(Long projectId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
removeProjectManager
public ProjectModel removeProjectManager(Long projectId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
createProjectStatus
public ProjectStatus createProjectStatus(Long projectId, String name) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
renameProjectStatus
public ProjectStatus renameProjectStatus(Long statusId, String name) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getProjectStatistics
public ProjectStatisticsModel getProjectStatistics(Long projectId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
favoriteProject
public void favoriteProject(Long projectId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
unfavoriteProject
public void unfavoriteProject(Long projectId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
favoriteTask
public void favoriteTask(long taskId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
unfavoriteTask
public void unfavoriteTask(long taskId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
deleteTaskComment
public void deleteTaskComment(long commentId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
listProjectActivitySince
public ProjectActivityModel listProjectActivitySince(Long projectId, Integer days) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getCurrentUserZone
- Returns:
- the current user's time zone, the server's when they have none
-
getToday
-