Package org.exoplatform.agenda.mcp
Class AgendaEventMcpTool
java.lang.Object
org.exoplatform.agenda.mcp.AgendaEventMcpTool
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin
@Service
@Profile("mcp-server")
public class AgendaEventMcpTool
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
ConstructorsConstructorDescriptionAgendaEventMcpTool(org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaAvailabilityService agendaAvailabilityService, org.exoplatform.agenda.service.AgendaScheduleConflictService agendaScheduleConflictService, org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService, org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService, org.exoplatform.agenda.service.AgendaUserSettingsService agendaUserSettingsService, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.portal.config.UserACL userAcl) -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptAgendaEventInvitation(Long eventId) voidcancelAgendaEvent(Long eventId, String occurrenceId) confirmDatePoll(Long dateOptionId) createAgendaEvent(Long spaceId, String summary, String description, String location, String start, String end, List<String> attendeeUsernames, String recurrenceFrequency, Integer recurrenceInterval, String recurrenceUntil, Integer recurrenceCount, Boolean failOnConflict, String space) createDatePoll(Long spaceId, String title, List<String> proposedSlots, List<String> attendeeUsernames, String description, Boolean rankSlotsByAvailability, String space) Create a date poll: a TENTATIVE event carrying several proposed slots that attendees can vote on.voiddeclineAgendaEventInvitation(Long eventId, String occurrenceId) voiddeleteAgendaEvent(Long eventId) getAgendaEventById(long eventId) getAgendaEvents(String start, String end, Long spaceId, Integer limit) getAvailability(List<String> usernames, String start, String end) Returns each named user's busy and free time blocks over a window.getDatePollResults(long eventId) getEventAttendees(long eventId) getEventConference(long eventId) getScheduleConflicts(String start, String end) inviteSpaceToAgendaEvent(Long eventId, Long spaceId) inviteUsersToAgendaEvent(Long eventId, List<String> attendeeUsernames) respondToAgendaEvent(Long eventId, String response, String comment) searchAgendaEvents(String query, String start, String end, Long spaceId) setEventConference(Long eventId, String url, String type) setEventReminders(Long eventId, List<String> reminders) suggestMeetingTime(List<String> attendees, Integer durationMinutes, String windowStart, String windowEnd, String constraints) Suggests candidate slots of at leastduration_minutesover which every attendee is free.updateAgendaEvent(Long eventId, String summary, String description, String location, String start, String end, String recurrenceFrequency, Integer recurrenceInterval, String recurrenceUntil, Integer recurrenceCount, Boolean failOnConflict) voteDatePoll(Long eventId, List<Long> acceptedSlotIds) 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
-
AgendaEventMcpTool
@Autowired public AgendaEventMcpTool(org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaAvailabilityService agendaAvailabilityService, org.exoplatform.agenda.service.AgendaScheduleConflictService agendaScheduleConflictService, org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService, org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService, org.exoplatform.agenda.service.AgendaUserSettingsService agendaUserSettingsService, org.exoplatform.portal.config.UserPortalConfigService portalConfigService, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, io.meeds.portal.permlink.service.PermanentLinkService permanentLinkService, io.meeds.social.translation.service.TranslationService translationService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.portal.config.UserACL userAcl)
-
-
Method Details
-
getAgendaEvents
public AgendaEventCollectionModel getAgendaEvents(String start, String end, Long spaceId, Integer limit) throws IllegalAccessException - Throws:
IllegalAccessException
-
getAgendaEventById
public AgendaEventModel getAgendaEventById(long eventId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
createAgendaEvent
public AgendaEventModel createAgendaEvent(Long spaceId, String summary, String description, String location, String start, String end, List<String> attendeeUsernames, String recurrenceFrequency, Integer recurrenceInterval, String recurrenceUntil, Integer recurrenceCount, Boolean failOnConflict, String space) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.agenda.exception.AgendaException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.agenda.exception.AgendaException
-
declineAgendaEventInvitation
public void declineAgendaEventInvitation(Long eventId, String occurrenceId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
cancelAgendaEvent
public void cancelAgendaEvent(Long eventId, String occurrenceId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.agenda.exception.AgendaException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.agenda.exception.AgendaException
-
acceptAgendaEventInvitation
public void acceptAgendaEventInvitation(Long eventId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
inviteUsersToAgendaEvent
public AgendaEventModel inviteUsersToAgendaEvent(Long eventId, List<String> attendeeUsernames) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
inviteSpaceToAgendaEvent
public AgendaEventModel inviteSpaceToAgendaEvent(Long eventId, Long spaceId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
updateAgendaEvent
public AgendaEventModel updateAgendaEvent(Long eventId, String summary, String description, String location, String start, String end, String recurrenceFrequency, Integer recurrenceInterval, String recurrenceUntil, Integer recurrenceCount, Boolean failOnConflict) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.agenda.exception.AgendaException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.agenda.exception.AgendaException
-
deleteAgendaEvent
public void deleteAgendaEvent(Long eventId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
createDatePoll
public DatePollModel createDatePoll(Long spaceId, String title, List<String> proposedSlots, List<String> attendeeUsernames, String description, Boolean rankSlotsByAvailability, String space) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.agenda.exception.AgendaException Create a date poll: a TENTATIVE event carrying several proposed slots that attendees can vote on. Each proposed slot is a "<startRFC3339>|<endRFC3339>" string. When rank_slots_by_availability is true, slots are ordered so the ones with the most available internal attendees come first. Every poll must belong to a space: pass either space_id or a space name via the 'space' parameter (resolved to resolvedSpaceId).- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.agenda.exception.AgendaException
-
voteDatePoll
public DatePollModel voteDatePoll(Long eventId, List<Long> acceptedSlotIds) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getDatePollResults
public DatePollModel getDatePollResults(long eventId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
confirmDatePoll
public AgendaEventModel confirmDatePoll(Long dateOptionId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getAvailability
public List<AvailabilityModel> getAvailability(List<String> usernames, String start, String end) throws IllegalAccessException Returns each named user's busy and free time blocks over a window.Glue only: usernames and RFC3339 bounds are resolved here, the ACL, the sharing setting and the free/busy algebra all belong to
AgendaAvailabilityService. Asking about a user who does not disclose their busy time to the caller is refused, not silently omitted: an omitted user would read as one with nothing in their calendar.- Parameters:
usernames- the users to report onstart- window start, RFC3339end- window end, RFC3339- Returns:
- one entry per username that resolved to an identity
- Throws:
IllegalAccessException- when the caller may not read one of them
-
suggestMeetingTime
public List<TimeBlockModel> suggestMeetingTime(List<String> attendees, Integer durationMinutes, String windowStart, String windowEnd, String constraints) throws IllegalAccessException Suggests candidate slots of at leastduration_minutesover which every attendee is free.Glue only. Note that this refuses outright when one attendee's availability is not disclosed to the caller — whether because the calendar ACL says so or because that attendee shares their busy time more narrowly: a suggestion computed from a subset of the attendees would read as a whole answer.
- Parameters:
attendees- the users who must all be freedurationMinutes- the wanted slot length, in minuteswindowStart- earliest acceptable start, RFC3339windowEnd- latest acceptable end, RFC3339constraints- optional free text; "mornings" and "afternoons" are honoured- Returns:
- the candidate slots, earliest first
- Throws:
IllegalAccessException- when the caller may not read one attendee
-
getEventAttendees
- Throws:
IllegalAccessException
-
respondToAgendaEvent
public AgendaEventModel respondToAgendaEvent(Long eventId, String response, String comment) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
setEventReminders
public List<String> setEventReminders(Long eventId, List<String> reminders) throws IllegalAccessException, org.exoplatform.agenda.exception.AgendaException - Throws:
IllegalAccessExceptionorg.exoplatform.agenda.exception.AgendaException
-
getEventConference
- Throws:
IllegalAccessException
-
setEventConference
public ConferenceModel setEventConference(Long eventId, String url, String type) throws IllegalAccessException - Throws:
IllegalAccessException
-
searchAgendaEvents
-
getScheduleConflicts
public ScheduleConflictsModel getScheduleConflicts(String start, String end) throws IllegalAccessException - Throws:
IllegalAccessException
-