Class JCRDocumentFileStorage
java.lang.Object
org.exoplatform.documents.storage.jcr.JCRDocumentFileStorage
- All Implemented Interfaces:
org.exoplatform.documents.storage.DocumentFileStorage
public class JCRDocumentFileStorage
extends Object
implements org.exoplatform.documents.storage.DocumentFileStorage
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJCRDocumentFileStorage(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, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.security.IdentityRegistry identityRegistry, org.exoplatform.social.core.manager.ActivityManager activityManager, BulkStorageActionService bulkStorageActionService) -
Method Summary
Modifier and TypeMethodDescriptionlongcalculateFilesSize(Long ownerId, org.exoplatform.services.security.Identity aclIdentity) booleanvoidcancelBulkAction(String actionId, String userName) booleancanImport(org.exoplatform.services.security.Identity identity) countNodeAccessList(javax.jcr.Node node, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.AbstractNodecreateFolder(long ownerId, String folderId, String folderPath, String title, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.FileVersioncreateNewVersion(String nodeId, String aclIdentity, InputStream newContent) voidcreateShortcut(String documentId, String destPath, String aclIdentity, String conflictAction) voiddownloadDocuments(int actionId, List<org.exoplatform.documents.model.AbstractNode> documents, org.exoplatform.services.security.Identity identity, long authenticatedUserId) downloadFolder(String folderId) org.exoplatform.documents.model.AbstractNodeduplicateDocument(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) org.exoplatform.documents.model.DownloadItemgetDocumentDownloadItem(String documentId) byte[]getDownloadZipBytes(int actionId, String userName) 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.FileVersion>getFileVersions(String fileNodeId, String aclIdentity) 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, boolean withChildren) org.exoplatform.documents.model.DocumentGroupsSizegetGroupDocumentsCount(org.exoplatform.documents.model.DocumentTimelineFilter filter, org.exoplatform.services.security.Identity aclIdentity) getNewName(long ownerId, String folderId, String folderPath, String title) booleanhasEditPermissions(String nodeId, org.exoplatform.services.security.Identity aclUserIdentity) voidimportFiles(String importId, org.exoplatform.social.core.space.model.Space space, String userName, String folderId, String folderPath, String conflict, org.exoplatform.services.security.Identity identity, String ownerId, long authenticatedUserId) booleanisDocumentSharedWithSamePermissions(javax.jcr.Node currentNode, javax.jcr.Node linkNode, org.exoplatform.social.core.identity.model.Identity destinationIdentity) voidmoveDocument(long ownerId, String fileId, String destPath, org.exoplatform.services.security.Identity aclIdentity, String conflictAction) voidmoveDocument(javax.jcr.Session session, long ownerId, String fileId, String destPath, org.exoplatform.services.security.Identity aclIdentity, String conflictAction) voidmoveDocuments(int actionId, long ownerId, List<org.exoplatform.documents.model.AbstractNode> documents, String destPath, org.exoplatform.services.security.Identity userIdentity, long identityId) voidnotifyMember(String documentId, long destId) voidrenameDocument(long ownerId, String documentID, String title, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.FileVersionrestoreVersion(String versionId, String aclIdentity) voidshareDocument(String documentId, long destId, boolean notifyMember) voidunShareDocument(String documentId, long destId) voidupdateDocumentDescription(long ownerId, String documentId, String description, org.exoplatform.services.security.Identity aclIdentity) voidupdatePermissions(String documentID, org.exoplatform.documents.model.NodePermission nodePermissionEntity, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.FileVersionupdateVersionSummary(String originFileId, String versionId, String summary, String aclIdentity)
-
Field Details
-
TEMP_DOWNLOAD_FOLDER_PREFIX
- See Also:
-
TEMP_IMPORT_FOLDER_PREFIX
- See Also:
-
-
Constructor Details
-
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, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.security.IdentityRegistry identityRegistry, org.exoplatform.social.core.manager.ActivityManager activityManager, BulkStorageActionService bulkStorageActionService)
-
-
Method Details
-
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:
getFilesTimelinein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
calculateFilesSize
public long calculateFilesSize(Long ownerId, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
calculateFilesSizein interfaceorg.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:
getGroupDocumentsCountin interfaceorg.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:
getFolderChildNodesin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.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:
getBreadcrumbin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getFullTreeData
public List<org.exoplatform.documents.model.FullTreeItem> getFullTreeData(long ownerId, String folderId, org.exoplatform.services.security.Identity aclIdentity, boolean withChildren) - Specified by:
getFullTreeDatain interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
createFolder
public org.exoplatform.documents.model.AbstractNode createFolder(long ownerId, String folderId, String folderPath, String title, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.ObjectAlreadyExistsException, IllegalAccessException - Specified by:
createFolderin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.ObjectAlreadyExistsExceptionIllegalAccessException
-
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:
getNewNamein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.ObjectAlreadyExistsExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
renameDocument
public void renameDocument(long ownerId, String documentID, String title, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.ObjectAlreadyExistsException - Specified by:
renameDocumentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.ObjectAlreadyExistsException
-
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:
duplicateDocumentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
moveDocument
public void moveDocument(javax.jcr.Session session, long ownerId, String fileId, String destPath, org.exoplatform.services.security.Identity aclIdentity, String conflictAction) throws Exception - Specified by:
moveDocumentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
Exception
-
moveDocument
public void moveDocument(long ownerId, String fileId, String destPath, org.exoplatform.services.security.Identity aclIdentity, String conflictAction) throws org.exoplatform.commons.ObjectAlreadyExistsException - Specified by:
moveDocumentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.ObjectAlreadyExistsException
-
updatePermissions
public void updatePermissions(String documentID, org.exoplatform.documents.model.NodePermission nodePermissionEntity, org.exoplatform.services.security.Identity aclIdentity) - Specified by:
updatePermissionsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
notifyMember
- Specified by:
notifyMemberin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
canAccess
public boolean canAccess(String documentID, org.exoplatform.services.security.Identity aclIdentity) throws javax.jcr.RepositoryException - Specified by:
canAccessin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
javax.jcr.RepositoryException
-
updateDocumentDescription
public void updateDocumentDescription(long ownerId, String documentId, String description, org.exoplatform.services.security.Identity aclIdentity) throws javax.jcr.RepositoryException - Specified by:
updateDocumentDescriptionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
javax.jcr.RepositoryException
-
createShortcut
public void createShortcut(String documentId, String destPath, String aclIdentity, String conflictAction) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException - Specified by:
createShortcutin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.ObjectAlreadyExistsException
-
getFileVersions
public List<org.exoplatform.documents.model.FileVersion> getFileVersions(String fileNodeId, String aclIdentity) - Specified by:
getFileVersionsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
updateVersionSummary
public org.exoplatform.documents.model.FileVersion updateVersionSummary(String originFileId, String versionId, String summary, String aclIdentity) - Specified by:
updateVersionSummaryin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
restoreVersion
public org.exoplatform.documents.model.FileVersion restoreVersion(String versionId, String aclIdentity) - Specified by:
restoreVersionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Returns:
-
countNodeAccessList
public Map<String,Boolean> countNodeAccessList(javax.jcr.Node node, org.exoplatform.services.security.Identity aclIdentity) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-
downloadDocuments
public void downloadDocuments(int actionId, List<org.exoplatform.documents.model.AbstractNode> documents, org.exoplatform.services.security.Identity identity, long authenticatedUserId) - Specified by:
downloadDocumentsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getDownloadZipBytes
- Specified by:
getDownloadZipBytesin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IOException
-
cancelBulkAction
- Specified by:
cancelBulkActionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IOException
-
createNewVersion
public org.exoplatform.documents.model.FileVersion createNewVersion(String nodeId, String aclIdentity, InputStream newContent) - Specified by:
createNewVersionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
moveDocuments
public void moveDocuments(int actionId, long ownerId, List<org.exoplatform.documents.model.AbstractNode> documents, String destPath, org.exoplatform.services.security.Identity userIdentity, long identityId) - Specified by:
moveDocumentsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
hasEditPermissions
public boolean hasEditPermissions(String nodeId, org.exoplatform.services.security.Identity aclUserIdentity) - Specified by:
hasEditPermissionsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getDocumentDownloadItem
- Specified by:
getDocumentDownloadItemin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
downloadFolder
- Specified by:
downloadFolderin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
importFiles
public void importFiles(String importId, org.exoplatform.social.core.space.model.Space space, String userName, String folderId, String folderPath, String conflict, org.exoplatform.services.security.Identity identity, String ownerId, long authenticatedUserId) throws Exception - Specified by:
importFilesin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
Exception
-
canImport
public boolean canImport(org.exoplatform.services.security.Identity identity) - Specified by:
canImportin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-