Class DocumentSpaceScopeResolver
java.lang.Object
org.exoplatform.documents.mcp.DocumentSpaceScopeResolver
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.SpaceScopeResolver
@Service("documentSpaceScopeResolver")
@Profile("mcp-server")
public class DocumentSpaceScopeResolver
extends Object
implements io.meeds.mcp.server.plugin.SpaceScopeResolver
Tells which space a document or a folder belongs to, for the space scope of
the document tools: the space whose
Documents drive holds the node
itself, by its node id (32 lowercase hexadecimal digits). A shortcut or a
share link, which stands for a node that may lie anywhere, a node of a
personal drive, of the trash or of any other place, a space that no longer
exists, a missing node and an id that isn't a node id belong to no space.
Read as the system, for the space scope decision only.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDocumentSpaceScopeResolver(org.exoplatform.documents.service.DocumentFileService documentFileService, org.exoplatform.social.core.space.spi.SpaceService spaceService) -
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
-
-
Constructor Details
-
DocumentSpaceScopeResolver
public DocumentSpaceScopeResolver(org.exoplatform.documents.service.DocumentFileService documentFileService, org.exoplatform.social.core.space.spi.SpaceService spaceService) - Parameters:
documentFileService- reads the space drive that holds a nodespaceService- reads the space of a group
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Returns:
- "document"
-
spaceOf
- Specified by:
spaceOfin interfaceio.meeds.mcp.server.plugin.SpaceScopeResolver- Parameters:
objectId- the node id- Returns:
- the id of the space whose
Documentsdrive holds the node itself, or null for a shortcut or a share link, a node outside the drive of a space, a missing node, a missing space or one with no id, an id that isn't a node id, or a lookup that fails
-