Package io.meeds.task.mcp
Class TaskMcpTool
java.lang.Object
io.meeds.task.mcp.TaskMcpTool
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin
@Service
@Profile("mcp-server")
public class TaskMcpTool
extends Object
implements 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) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProjectLabelToTask(Long taskId, Long labelId) addProjectMember(Long projectId, String username) addTaskComment(long taskId, String text) addTaskCoworker(long taskId, String username) assignTask(long taskId, String username) assignTaskToMe(long taskId) completeTask(long taskId) createPersonalTask(String title, String description, String assignee, Set<String> coworkers, String startDate, String endDate, String dueDate, Priority priority, Long statusId) 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 endDate, String dueDate, Priority priority, Long statusId) voiddeleteProjectLabel(long labelId) voiddeleteTaskComment(long commentId) voidfavoriteProject(Long projectId) voidfavoriteTask(long taskId) getProjectById(Long projectId) getProjectIdByTaskId(Long taskId) getProjectStatistics(Long projectId) getTaskById(Long taskId) listAssignedTasks(Integer limit) listProjectActivitySince(Long projectId, Integer days) listProjectLabels(Long projectId) listProjects(Long spaceId, Integer offset, Integer limit) listProjectStatuses(Long projectId) listTaskCommentsById(Long taskId, Integer offset, Integer limit) listTaskLabels(long taskId) listTasks(Long projectId, Boolean hideCompletedTasks, Boolean includeChangeLog, Integer offset, Integer limit) listUnscheduledTasks(Long projectId, Integer limit) voidremoveProjectLabelFromTask(Long taskId, Long labelId) removeProjectManager(Long projectId, String username) removeProjectMember(Long projectId, String username) renameProjectStatus(Long statusId, String name) reopenTask(long taskId) setProjectManager(Long projectId, String username) setTaskDates(long taskId, String startDate, String endDate, String dueDate) setTaskPriority(long taskId, Priority priority) 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 java.lang.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)
-
-
Method Details
-
listProjects
-
listAssignedTasks
-
listTasks
public TaskCollectionModel listTasks(Long projectId, Boolean hideCompletedTasks, Boolean includeChangeLog, Integer offset, Integer limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
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 - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
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 endDate, String dueDate, Priority priority, Long statusId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
createPersonalTask
-
addTaskComment
public TaskCommentModel addTaskComment(long taskId, String text) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
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 - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
addTaskCoworker
public TaskModel addTaskCoworker(long taskId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
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 - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
removeProjectLabelFromTask
public void removeProjectLabelFromTask(Long taskId, Long labelId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
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
-
setTaskDates
public TaskModel setTaskDates(long taskId, String startDate, String endDate, String dueDate) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
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) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
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
-