Class PollSpaceScopeResolver

java.lang.Object
io.meeds.poll.mcp.PollSpaceScopeResolver
All Implemented Interfaces:
io.meeds.mcp.server.plugin.SpaceScopeResolver

@Service("pollSpaceScopeResolver") @Profile("mcp-server") public class PollSpaceScopeResolver extends Object implements io.meeds.mcp.server.plugin.SpaceScopeResolver
Tells which space a poll belongs to: the space it was posted in. Read without any access check, for the space scope decision only.
  • Field Details

  • Constructor Details

    • PollSpaceScopeResolver

      public PollSpaceScopeResolver(io.meeds.poll.service.PollService pollService)
      Parameters:
      pollService - the poll service
  • Method Details

    • getName

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

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