Class ActivityMcpTool

java.lang.Object
io.meeds.mcp.server.tool.ActivityMcpTool
All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin

@Service public class ActivityMcpTool extends Object implements io.meeds.mcp.server.plugin.McpToolPlugin
  • Constructor Details

    • ActivityMcpTool

      public ActivityMcpTool()
  • Method Details

    • getActivitiesSinceDays

      public List<ActivityModel> getActivitiesSinceDays(Long spaceId, Long days) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getActivities

      public List<ActivityModel> getActivities(Long spaceId, Integer offset, Integer limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getActivity

      public ActivityModel getActivity(long activityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getActivityComment

      public ActivityCommentModel getActivityComment(long activityCommentId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • createActivity

      public ActivityModel createActivity(Long spaceId, String htmlContent) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • updateActivity

      public ActivityModel updateActivity(long activityId, String htmlContent) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • deleteActivity

      public void deleteActivity(long activityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • pinActivity

      public void pinActivity(long activityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • unpinActivity

      public void unpinActivity(long activityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getActivityComments

      public List<ActivityCommentModel> getActivityComments(long activityId, Integer offset, Integer limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • createActivityComment

      public ActivityCommentModel createActivityComment(long activityId, String comment) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • updateComment

      public ActivityCommentModel updateComment(long activityCommentId, String comment) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Replaces the text of an activity comment, as the current user. The permission is Social's own edit check for a comment, ActivityManager.isActivityEditable(org.exoplatform.social.core.activity.model.ExoSocialActivity, org.exoplatform.services.security.Identity), the one its comment update REST endpoint applies: being able to view the comment is not enough, so a reader of the activity cannot rewrite another member's comment, which would keep showing that member as its author. The previous text is kept in the original_comment template parameter.
      Parameters:
      activityCommentId - identifier of the comment to update
      comment - new comment text
      Returns:
      the updated comment
      Throws:
      IllegalAccessException - when the current user can't edit the comment
      org.exoplatform.commons.exception.ObjectNotFoundException - when the comment doesn't exist
    • shareActivityToSpace

      public ActivityModel shareActivityToSpace(long activityId, long spaceId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getActivityLikers

      public List<UserModel> getActivityLikers(long activityId, Integer offset, Integer limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • likeTheActivity

      public void likeTheActivity(long activityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • unlikeTheActivity

      public void unlikeTheActivity(long activityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • searchActivities

      public List<ActivityModel> searchActivities(String query, Long spaceId, Boolean isFavorite, Integer offset, Integer limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException