Class AgendaEventSpaceScopeResolver
java.lang.Object
org.exoplatform.agenda.mcp.AgendaEventSpaceScopeResolver
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.SpaceScopeResolver
@Service("agendaEventSpaceScopeResolver")
@Profile("mcp-server")
public class AgendaEventSpaceScopeResolver
extends Object
implements io.meeds.mcp.server.plugin.SpaceScopeResolver
Tells which space an agenda event belongs to, for the space scope of the
agenda tools that reach an event by its id: the space that owns the
calendar the event is in. The rule is one for every scoped tool: an event
belongs to the space that owns its calendar, and a space that is only
invited does not own it, so the scoped listing and the scoped search keep
the same events as this resolver. An event of a personal calendar belongs to no
space, and so does one of a calendar whose owner is gone, and a missing
event. The event's attendees play no part: an event of a space calendar
that invites people from outside is still that space's, and an event of a
personal calendar that invites a space is still no space's. Read as the
system, for the space scope decision only.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAgendaEventSpaceScopeResolver(org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService) -
Method Summary
Modifier and TypeMethodDescriptionTells whether a person could edit the event in person, by the agenda's own rule (AgendaEventService.canUpdateEvent(Event, long)): its creator, an attendee the event lets edit it, an editor of its calendar, or a person it is shared with for edit.getName()
-
Field Details
-
NAME
-
-
Constructor Details
-
AgendaEventSpaceScopeResolver
@Autowired public AgendaEventSpaceScopeResolver(org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService) - Parameters:
agendaEventService- reads the eventagendaCalendarService- reads the calendar of the eventidentityManager- reads the owner of the calendarspaceService- reads the space the owner stands for
-
-
Method Details
-
getName
-
spaceOf
- Specified by:
spaceOfin interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Parameters:
objectId- the event id- Returns:
- the id of the space that owns the event's calendar, or null for an event of a personal calendar, a missing event, calendar, owner or space, an id that isn't one, or a lookup that fails
-
canEdit
Tells whether a person could edit the event in person, by the agenda's own rule (AgendaEventService.canUpdateEvent(Event, long)): its creator, an attendee the event lets edit it, an editor of its calendar, or a person it is shared with for edit.- Specified by:
canEditin interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Parameters:
objectId- the event iduserName- the person a digital worker would change the event for- Returns:
- true when the person could edit the event; false for a missing event, a person with no identity, an id that isn't one, or a lookup that fails
-