Class JCRDocumentFileStorage

  • All Implemented Interfaces:
    org.exoplatform.documents.storage.DocumentFileStorage

    public class JCRDocumentFileStorage
    extends Object
    implements org.exoplatform.documents.storage.DocumentFileStorage
    • Constructor Summary

      Constructors 
      Constructor Description
      JCRDocumentFileStorage​(org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator, org.exoplatform.services.jcr.RepositoryService repositoryService, DocumentSearchServiceConnector documentSearchServiceConnector, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.listener.ListenerService listenerService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canAccess​(String documentID, org.exoplatform.services.security.Identity aclIdentity)  
      org.exoplatform.documents.model.AbstractNode createFolder​(long ownerId, String folderId, String folderPath, String title, org.exoplatform.services.security.Identity aclIdentity)  
      org.exoplatform.documents.model.AbstractNode duplicateDocument​(long ownerId, String fileId, String prefixClone, org.exoplatform.services.security.Identity aclIdentity)  
      List<org.exoplatform.documents.model.BreadCrumbItem> getBreadcrumb​(long ownerId, String folderId, String folderPath, org.exoplatform.services.security.Identity aclIdentity)  
      List<org.exoplatform.documents.model.FileNode> getFilesTimeline​(org.exoplatform.documents.model.DocumentTimelineFilter filter, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit)  
      List<org.exoplatform.documents.model.AbstractNode> getFolderChildNodes​(org.exoplatform.documents.model.DocumentFolderFilter filter, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit)  
      List<org.exoplatform.documents.model.FullTreeItem> getFullTreeData​(long ownerId, String folderId, org.exoplatform.services.security.Identity aclIdentity)  
      org.exoplatform.documents.model.DocumentGroupsSize getGroupDocumentsCount​(org.exoplatform.documents.model.DocumentTimelineFilter filter, org.exoplatform.services.security.Identity aclIdentity)  
      String getNewName​(long ownerId, String folderId, String folderPath, String title)  
      void moveDocument​(long ownerId, String fileId, String destPath, org.exoplatform.services.security.Identity aclIdentity)  
      void renameDocument​(long ownerId, String documentID, String title, org.exoplatform.services.security.Identity aclIdentity)  
      void shareDocument​(String documentId, long destId)  
      void updatePermissions​(String documentID, org.exoplatform.documents.model.NodePermission nodePermissionEntity, org.exoplatform.services.security.Identity aclIdentity)  
    • Constructor Detail

      • JCRDocumentFileStorage

        public JCRDocumentFileStorage​(org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
                                      org.exoplatform.services.jcr.RepositoryService repositoryService,
                                      DocumentSearchServiceConnector documentSearchServiceConnector,
                                      org.exoplatform.social.core.manager.IdentityManager identityManager,
                                      org.exoplatform.social.core.space.spi.SpaceService spaceService,
                                      org.exoplatform.services.listener.ListenerService listenerService)
    • Method Detail

      • getFilesTimeline

        public List<org.exoplatform.documents.model.FileNode> getFilesTimeline​(org.exoplatform.documents.model.DocumentTimelineFilter filter,
                                                                               org.exoplatform.services.security.Identity aclIdentity,
                                                                               int offset,
                                                                               int limit)
                                                                        throws org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        getFilesTimeline in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        org.exoplatform.commons.exception.ObjectNotFoundException
      • getGroupDocumentsCount

        public org.exoplatform.documents.model.DocumentGroupsSize getGroupDocumentsCount​(org.exoplatform.documents.model.DocumentTimelineFilter filter,
                                                                                         org.exoplatform.services.security.Identity aclIdentity)
                                                                                  throws org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        getGroupDocumentsCount in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        org.exoplatform.commons.exception.ObjectNotFoundException
      • getFolderChildNodes

        public List<org.exoplatform.documents.model.AbstractNode> getFolderChildNodes​(org.exoplatform.documents.model.DocumentFolderFilter filter,
                                                                                      org.exoplatform.services.security.Identity aclIdentity,
                                                                                      int offset,
                                                                                      int limit)
                                                                               throws IllegalAccessException,
                                                                                      org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        getFolderChildNodes in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • getBreadcrumb

        public List<org.exoplatform.documents.model.BreadCrumbItem> getBreadcrumb​(long ownerId,
                                                                                  String folderId,
                                                                                  String folderPath,
                                                                                  org.exoplatform.services.security.Identity aclIdentity)
                                                                           throws IllegalAccessException,
                                                                                  org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        getBreadcrumb in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • getFullTreeData

        public List<org.exoplatform.documents.model.FullTreeItem> getFullTreeData​(long ownerId,
                                                                                  String folderId,
                                                                                  org.exoplatform.services.security.Identity aclIdentity)
                                                                           throws IllegalAccessException,
                                                                                  org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        getFullTreeData in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • createFolder

        public org.exoplatform.documents.model.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
        Specified by:
        createFolder in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.ObjectAlreadyExistsException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • getNewName

        public String getNewName​(long ownerId,
                                 String folderId,
                                 String folderPath,
                                 String title)
                          throws IllegalAccessException,
                                 org.exoplatform.commons.ObjectAlreadyExistsException,
                                 org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        getNewName in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.ObjectAlreadyExistsException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • renameDocument

        public 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
        Specified by:
        renameDocument in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.ObjectAlreadyExistsException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • duplicateDocument

        public org.exoplatform.documents.model.AbstractNode duplicateDocument​(long ownerId,
                                                                              String fileId,
                                                                              String prefixClone,
                                                                              org.exoplatform.services.security.Identity aclIdentity)
                                                                       throws IllegalAccessException,
                                                                              org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        duplicateDocument in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • moveDocument

        public void moveDocument​(long ownerId,
                                 String fileId,
                                 String destPath,
                                 org.exoplatform.services.security.Identity aclIdentity)
                          throws IllegalAccessException,
                                 org.exoplatform.commons.exception.ObjectNotFoundException
        Specified by:
        moveDocument in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        IllegalAccessException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • updatePermissions

        public void updatePermissions​(String documentID,
                                      org.exoplatform.documents.model.NodePermission nodePermissionEntity,
                                      org.exoplatform.services.security.Identity aclIdentity)
        Specified by:
        updatePermissions in interface org.exoplatform.documents.storage.DocumentFileStorage
      • shareDocument

        public void shareDocument​(String documentId,
                                  long destId)
        Specified by:
        shareDocument in interface org.exoplatform.documents.storage.DocumentFileStorage
      • canAccess

        public boolean canAccess​(String documentID,
                                 org.exoplatform.services.security.Identity aclIdentity)
                          throws javax.jcr.RepositoryException
        Specified by:
        canAccess in interface org.exoplatform.documents.storage.DocumentFileStorage
        Throws:
        javax.jcr.RepositoryException