Class AgendaEventDateOptionSpaceScopeResolver

java.lang.Object
org.exoplatform.agenda.mcp.AgendaEventDateOptionSpaceScopeResolver
All Implemented Interfaces:
io.meeds.mcp.server.plugin.SpaceScopeResolver

@Service("agendaEventDateOptionSpaceScopeResolver") @Profile("mcp-server") public class AgendaEventDateOptionSpaceScopeResolver extends Object implements io.meeds.mcp.server.plugin.SpaceScopeResolver
Tells which space a proposed date of a date poll belongs to, for the space scope of the tools that reach a date poll through one of its dates: the space of the poll's event, by the same rule as AgendaEventSpaceScopeResolver. A missing date, or one whose event belongs to no space, belongs to no space. Read as the system, for the space scope decision only.
  • Field Details

  • Constructor Details

    • AgendaEventDateOptionSpaceScopeResolver

      @Autowired public AgendaEventDateOptionSpaceScopeResolver(org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService, AgendaEventSpaceScopeResolver eventSpaceScopeResolver)
      Parameters:
      agendaEventDatePollService - reads the date option
      eventSpaceScopeResolver - tells the space of its event
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface io.meeds.mcp.server.plugin.SpaceScopeResolver
      Returns:
      "event_date_option"
    • spaceOf

      public Long spaceOf(String objectId)
      Specified by:
      spaceOf in interface io.meeds.mcp.server.plugin.SpaceScopeResolver
      Parameters:
      objectId - the date option id
      Returns:
      the id of the space of the date option's event, or null for a missing date option, an event of no space, an id that isn't a positive number, or a lookup that fails
    • canEdit

      public Boolean canEdit(String objectId, String userName)
      Tells whether a person could edit, in person, the event the date option belongs to, as AgendaEventSpaceScopeResolver.canEdit(String, String) tells it.
      Specified by:
      canEdit in interface io.meeds.mcp.server.plugin.SpaceScopeResolver
      Parameters:
      objectId - the date option id
      userName - the person a digital worker would confirm the date for
      Returns:
      true when the person could edit the option's event; false for a missing option, an id that isn't one, or a lookup that fails