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
    Modifier and Type
    Field
    Description
    static final String
    The name the document tools' space_scope.resolver gives.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DocumentSpaceScopeResolver(org.exoplatform.documents.service.DocumentFileService documentFileService, org.exoplatform.social.core.space.spi.SpaceService spaceService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    spaceOf(String objectId)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.meeds.mcp.server.plugin.SpaceScopeResolver

    canEdit
  • Field Details

  • 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 node
      spaceService - reads the space of a group
  • Method Details

    • getName

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

      public Long spaceOf(String objectId)
      Specified by:
      spaceOf in interface io.meeds.mcp.server.plugin.SpaceScopeResolver
      Parameters:
      objectId - the node id
      Returns:
      the id of the space whose Documents drive 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