Class AnnouncementSpaceScopeResolver
java.lang.Object
io.meeds.gamification.mcp.AnnouncementSpaceScopeResolver
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.SpaceScopeResolver
@Service("gamificationAnnouncementSpaceScopeResolver")
@Profile("mcp-server")
public class AnnouncementSpaceScopeResolver
extends Object
implements io.meeds.mcp.server.plugin.SpaceScopeResolver
Tells which space a quest announcement belongs to: the space of the campaign
of the quest it announces, when that is a space campaign. An announcement of
a quest of an open campaign, of a deleted quest, or a missing one belongs to
no space. Read without any access check, for the space scope decision only.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnnouncementSpaceScopeResolver(AnnouncementService announcementService, RuleService ruleService) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.meeds.mcp.server.plugin.SpaceScopeResolver
canEdit
-
Field Details
-
NAME
The name the announcement tools'space_scope.resolvergives.- See Also:
-
-
Constructor Details
-
AnnouncementSpaceScopeResolver
public AnnouncementSpaceScopeResolver(AnnouncementService announcementService, RuleService ruleService) - Parameters:
announcementService- the announcement serviceruleService- the rule service
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Returns:
- "quest_announcement"
-
spaceOf
- Specified by:
spaceOfin interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Parameters:
objectId- the announcement id- Returns:
- the id of the space of the announced quest's campaign, or null for an announcement of a quest of an open campaign or of no space, of a deleted quest, a missing one, an id that isn't a number, or a lookup that fails
-