Package io.meeds.mcp.server.tool
Class SpaceMcpTool
java.lang.Object
io.meeds.mcp.server.tool.SpaceMcpTool
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin
@Service
public class SpaceMcpTool
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceptSpaceInvitation(long spaceId) voidacceptSpaceJoinRequest(long spaceId, String username) cancelJoinRequest(long spaceId) longcountMySpaces(String query) createSpace(long spaceTemplateId, String name, String description, Visibility visibility, Registration registration, List<String> usernamesToInvite, Long parentSpaceId) declineSpaceInvitation(long spaceId) voiddeclineSpaceJoinRequest(long spaceId, String username) voiddeleteSpace(long spaceId) getAllSpaces(String query, Integer offset, Integer limit) getManagedSpaces(String query, Integer offset, Integer limit) getMySpaces(String query, Integer offset, Integer limit) getSpaceById(long spaceId) getSpaceMembers(long spaceId, Integer offset, Integer limit) voidinviteUsersToSpace(long spaceId, List<String> usernamesToInvite) joinSpace(long spaceId) leaveSpace(long spaceId) listSpaceJoinRequests(long spaceId, Integer offset, Integer limit) listSubSpaces(long parentSpaceId, Integer offset, Integer limit) listUsersOfSpaceByRole(long spaceId, SpaceRole spaceRole, Integer offset, Integer limit) voidremoveUserRoleInSpace(long spaceId, String username, SpaceRole spaceRole) voidremoveUsersFromSpace(long spaceId, List<String> usernamesToRemove) requestToJoinSpace(long spaceId) setSpaceAvatar(long spaceId, String imageUrl, String imageBase64, String attachmentObjectType, String attachmentObjectId) setSpaceBanner(long spaceId, String imageUrl, String imageBase64, String attachmentObjectType, String attachmentObjectId) voidsetUserRoleInSpace(long spaceId, String username, SpaceRole spaceRole) updateSpaceSettings(long spaceId, String name, String description, Visibility visibility, Registration registration) 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
-
SpaceMcpTool
public SpaceMcpTool()
-
-
Method Details
-
createSpace
public SpaceModel createSpace(long spaceTemplateId, String name, String description, Visibility visibility, Registration registration, List<String> usernamesToInvite, Long parentSpaceId) throws org.exoplatform.social.core.space.SpaceException - Throws:
org.exoplatform.social.core.space.SpaceException
-
updateSpaceSettings
public SpaceModel updateSpaceSettings(long spaceId, String name, String description, Visibility visibility, Registration registration) -
getAllSpaces
-
getMySpaces
-
countMySpaces
-
getManagedSpaces
-
getSpaceById
-
listUsersOfSpaceByRole
-
inviteUsersToSpace
-
removeUsersFromSpace
-
setUserRoleInSpace
-
removeUserRoleInSpace
-
setSpaceAvatar
public SpaceModel setSpaceAvatar(long spaceId, String imageUrl, String imageBase64, String attachmentObjectType, String attachmentObjectId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
setSpaceBanner
public SpaceModel setSpaceBanner(long spaceId, String imageUrl, String imageBase64, String attachmentObjectType, String attachmentObjectId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
joinSpace
public SpaceModel joinSpace(long spaceId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
requestToJoinSpace
public SpaceModel requestToJoinSpace(long spaceId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
cancelJoinRequest
public SpaceModel cancelJoinRequest(long spaceId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
leaveSpace
public SpaceModel leaveSpace(long spaceId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
acceptSpaceInvitation
public SpaceModel acceptSpaceInvitation(long spaceId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
declineSpaceInvitation
public SpaceModel declineSpaceInvitation(long spaceId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
listSpaceJoinRequests
public List<UserModel> listSpaceJoinRequests(long spaceId, Integer offset, Integer limit) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
acceptSpaceJoinRequest
public void acceptSpaceJoinRequest(long spaceId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
declineSpaceJoinRequest
public void declineSpaceJoinRequest(long spaceId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getSpaceMembers
public List<SpaceMemberModel> getSpaceMembers(long spaceId, Integer offset, Integer limit) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
listSubSpaces
public List<SpaceModel> listSubSpaces(long parentSpaceId, Integer offset, Integer limit) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
deleteSpace
public void deleteSpace(long spaceId) throws org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.social.core.space.SpaceException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.social.core.space.SpaceException
-