Interface DocumentFileStorage


public interface DocumentFileStorage
  • Method Details

    • getFilesTimeline

      List<FileNode> getFilesTimeline(DocumentTimelineFilter filter, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Retrieves a list of accessible files, for a selected user, by applying the designated filter. The returned results will be of type FileNode only. The ownerId of filter object will be used to select the list of accessible Nodes to retrieve switch a timeline.
      Parameters:
      filter - DocumentTimelineFilter that contains filtering criteria
      offset - Offset of the result list
      limit - Limit of the result list
      aclIdentity - Identity of the user acessing files
      Returns:
      List of AbstractNode
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when parentFolderId doesn't exisits
    • getGroupDocumentsCount

      DocumentGroupsSize getGroupDocumentsCount(DocumentTimelineFilter filter, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Retrieves the number of existing files by group.
      Parameters:
      filter - DocumentFolderFilter that contains filtering criteria
      aclIdentity - Identity of the user acessing files
      Returns:
      DocumentGroupsSize
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when parentFolderId doesn't exisits
    • getFolderChildNodes

      List<AbstractNode> getFolderChildNodes(DocumentFolderFilter filter, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Retrieves a list of accessible files, for a selected user, by applying the designated filter. The parentForlderId of filter object will be used to select the list of Nodes to retrieve.
      Parameters:
      filter - DocumentFolderFilter that contains filtering criteria
      offset - Offset of the result list
      limit - Limit of the result list
      aclIdentity - Identity of the user acessing files
      Returns:
      List of AbstractNode
      Throws:
      IllegalAccessException - when the user isn't allowed to access documents of the designated parentFolderId
      org.exoplatform.commons.exception.ObjectNotFoundException - when parentFolderId doesn't exisits
    • getBreadcrumb

      List<BreadCrumbItem> getBreadcrumb(long ownerId, String folderId, String folderPath, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Retrieves breadcrumb of the given node.
      Parameters:
      folderId - Id of the given folder
      aclIdentity - Identity of the user acessing files
      Returns:
      List of AbstractNode
      Throws:
      IllegalAccessException - when the user isn't allowed to access documents of the designated parentFolderId
      org.exoplatform.commons.exception.ObjectNotFoundException - when folderId doesn't exisits
    • getFullTreeData

      List<FullTreeItem> getFullTreeData(long ownerId, String folderId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Retrieves breadcrumb of the given node.
      Parameters:
      folderId - Id of the given folder
      aclIdentity - Identity of the user acessing files
      Returns:
      List of AbstractNode
      Throws:
      IllegalAccessException - when the user isn't allowed to access documents of the designated parentFolderId
      org.exoplatform.commons.exception.ObjectNotFoundException - when folderId doesn't exisits
    • duplicateDocument

      AbstractNode duplicateDocument(long ownerId, String fileId, String prefixClone, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Duplicate the given node.
      Parameters:
      fileId - Id of the given file
      aclIdentity - Identity of the user acessing files
      Returns:
      AbstractNode
      Throws:
      IllegalAccessException - when the user isn't allowed to access documents of the designated parentFolderId
      org.exoplatform.commons.exception.ObjectNotFoundException - when folderId doesn't exisits
    • moveDocument

      void moveDocument(long ownerId, String fileId, String destPath, org.exoplatform.services.security.Identity aclIdentity, String conflictAction) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.commons.ObjectAlreadyExistsException
      Move the given node.
      Parameters:
      fileId - Id of the given file
      aclIdentity - Identity of the user acessing files
      conflictAction - conflict action
      Throws:
      IllegalAccessException - when the user isn't allowed to access documents of the designated parentFolderId
      org.exoplatform.commons.exception.ObjectNotFoundException - when folderId doesn't exisits
      org.exoplatform.commons.ObjectAlreadyExistsException - when file with same name already exists in the target path
    • createFolder

      AbstractNode createFolder(long ownerId, String folderId, String folderPath, String title, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.ObjectAlreadyExistsException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getNewName

      String getNewName(long ownerId, String folderId, String folderPath, String title) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.ObjectAlreadyExistsException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • renameDocument

      void renameDocument(long ownerId, String documentID, String title, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.ObjectAlreadyExistsException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • updatePermissions

      void updatePermissions(String documentID, NodePermission nodePermissionEntity, org.exoplatform.services.security.Identity aclIdentity)
    • shareDocument

      void shareDocument(String documentId, long destId) throws IllegalAccessException
      Shares a document with given user or space
      Parameters:
      documentId - document id
      destId - target user or space identity id
      Throws:
      IllegalAccessException
    • notifyMember

      void notifyMember(String documentId, long destId) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • canAccess

      boolean canAccess(String documentID, org.exoplatform.services.security.Identity aclIdentity) throws javax.jcr.RepositoryException
      Throws:
      javax.jcr.RepositoryException
    • updateDocumentDescription

      default void updateDocumentDescription(long ownerId, String documentID, String description, org.exoplatform.services.security.Identity aclIdentity) throws IllegalStateException, javax.jcr.RepositoryException
      Throws:
      IllegalStateException
      javax.jcr.RepositoryException
    • createShortcut

      void createShortcut(String documentId, String destPath, String aclIdentity, String conflictAction) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException
      Creates a shortcut for a document
      Parameters:
      documentId - document id
      destPath - destination path
      aclIdentity - user identity id
      conflictAction - conflict action
      Throws:
      IllegalAccessException
      org.exoplatform.commons.ObjectAlreadyExistsException
    • getFileVersions

      List<FileVersion> getFileVersions(String fileNodeId, String aclIdentity)
      Retrieves versions of specific file
      Parameters:
      fileNodeId - target file node id
      aclIdentity - user identity id
      Returns:
      List of FileVersion
    • updateVersionSummary

      FileVersion updateVersionSummary(String originFileId, String versionId, String summary, String aclIdentity)
      update or add a version summary
      Parameters:
      originFileId - original file id
      versionId - version id
      summary - new summary to be saved
      aclIdentity - current user identity
      Returns:
      FileVersion
    • restoreVersion

      FileVersion restoreVersion(String versionId, String aclIdentity)
      restore document version
      Parameters:
      versionId - version id
      aclIdentity - current user identity
      Returns:
      FileVersion