Class NoteSpaceScopeResolver
java.lang.Object
io.meeds.notes.mcp.NoteSpaceScopeResolver
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.SpaceScopeResolver
@Service("noteSpaceScopeResolver")
@Profile("mcp-server")
public class NoteSpaceScopeResolver
extends Object
implements io.meeds.mcp.server.plugin.SpaceScopeResolver
Tells which space a note belongs to, for the space scope of the notes
tools: the space whose group owns the notebook the note is in. A note of a
personal (user) or portal notebook, a notebook owned by a group outside the
spaces, a space that no longer exists, a missing note and an id that isn't
one belong to no space. Read as the system, for the space scope decision
only.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()static LongspaceOfNote(Page note, org.exoplatform.social.core.space.spi.SpaceService spaceService) Tells the space a note belongs to, by the same rule asspaceOf(String), for a caller that already holds the note.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
-
-
Constructor Details
-
NoteSpaceScopeResolver
public NoteSpaceScopeResolver()
-
-
Method Details
-
getName
-
spaceOf
- Specified by:
spaceOfin interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Parameters:
objectId- the note id- Returns:
- the id of the space whose notebook holds the note, or null for a note of a personal or portal notebook, a missing note or space, an id that isn't one, or a lookup that fails
-
spaceOfNote
public static Long spaceOfNote(Page note, org.exoplatform.social.core.space.spi.SpaceService spaceService) Tells the space a note belongs to, by the same rule asspaceOf(String), for a caller that already holds the note.- Parameters:
note- the note, null for a missing onespaceService- reads the space of a group- Returns:
- the id of the space whose notebook holds the note, or null for a missing note, a note of a personal or portal notebook, or a space that no longer exists
-