Class DocumentFileServiceImpl
java.lang.Object
org.exoplatform.documents.service.DocumentFileServiceImpl
- All Implemented Interfaces:
org.exoplatform.documents.service.DocumentFileService
public class DocumentFileServiceImpl
extends Object
implements org.exoplatform.documents.service.DocumentFileService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDocumentFileServiceImpl(org.exoplatform.documents.storage.DocumentFileStorage documentFileStorage, org.exoplatform.documents.storage.JCRDeleteFileStorage jcrDeleteFileStorage, org.exoplatform.services.security.Authenticator authenticator, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.services.security.IdentityRegistry identityRegistry, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.analytics.api.service.AnalyticsService analyticsService) -
Method Summary
Modifier and TypeMethodDescriptionorg.exoplatform.documents.model.DocumentsSizeaddDocumentsSizeStat(long ownerId, long userIdentityId) booleanbooleancanAddDocument(String spaceId, String currentUserName) voidcancelBulkAction(String actionId, String userName) booleancanImport(org.exoplatform.services.security.Identity identity) org.exoplatform.documents.model.AbstractNodecreateFolder(long ownerId, String folderId, String folderPath, String name, long authenticatedUserId) org.exoplatform.documents.model.FileVersioncreateNewVersion(String nodeId, String aclIdentity, InputStream newContent) voidcreateShortcut(String documentId, String destPath, String aclIdentity, String conflictAction) voiddeleteDocument(String folderPath, String documentId, boolean favorite, long delay, long authenticatedUserId) voiddeleteDocuments(int actionId, List<org.exoplatform.documents.model.AbstractNode> documents, long authenticatedUserId) voiddownloadDocuments(int actionId, List<org.exoplatform.documents.model.AbstractNode> documents, long authenticatedUserId) org.exoplatform.documents.model.AbstractNodeduplicateDocument(long ownerId, String fileId, String prefixClone, long authenticatedUserId) org.exoplatform.services.security.IdentitygetAclUserIdentity(String username) List<org.exoplatform.documents.model.AbstractNode> getBiggestDocuments(long ownerId, org.exoplatform.social.core.identity.model.Identity userIdentity, int offset, int limit) List<org.exoplatform.documents.model.BreadCrumbItem> getBreadcrumb(long ownerId, String folderId, String folderPath, long authenticatedUserId) getDefaultView(Long ownerId, String userIdentityId) List<org.exoplatform.documents.model.AbstractNode> getDocumentItems(org.exoplatform.documents.constant.FileListingType listingType, org.exoplatform.documents.model.DocumentNodeFilter filter, int offset, int limit, long userIdentityId, boolean showHiddenFiles) org.exoplatform.documents.model.DocumentsSizegetDocumentsSizeStat(long ownerId, long userIdentityId) byte[]getDownloadZipBytes(int actionId, String userName) List<org.exoplatform.documents.model.FileNode> getFilesTimeline(org.exoplatform.documents.model.DocumentTimelineFilter filter, int offset, int limit, long userIdentityId) List<org.exoplatform.documents.model.FileVersion> getFileVersions(String fileNodeId, String aclIdentity) List<org.exoplatform.documents.model.AbstractNode> getFolderChildNodes(org.exoplatform.documents.model.DocumentFolderFilter filter, int offset, int limit, long userIdentityId) List<org.exoplatform.documents.model.FullTreeItem> getFullTreeData(long ownerId, String folderId, long authenticatedUserId, boolean withChildren) org.exoplatform.documents.model.DocumentGroupsSizegetGroupDocumentsCount(org.exoplatform.documents.model.DocumentTimelineFilter filter, long userIdentityId) getNewName(long ownerId, String folderId, String folderPath, String name) booleanhasEditPermissionOnDocument(String nodeId, long userIdentityId) voidimportFiles(String ownerId, String folderId, String folderPath, String uploadId, String conflict, org.exoplatform.services.security.Identity identity, long authenticatedUserId) voidmoveDocument(long ownerId, String fileId, String destPath, long authenticatedUserId, String conflictAction) voidmoveDocuments(int actionId, long ownerId, List<org.exoplatform.documents.model.AbstractNode> documents, String destPath, long userIdentityId) voidnotifyMember(String documentId, long destId) voidrenameDocument(long ownerId, String documentID, String name, long authenticatedUserId) org.exoplatform.documents.model.FileVersionrestoreVersion(String versionId, String aclIdentity) voidsetDefaultView(Long ownerId, String userIdentityId, String view) voidshareDocument(String documentId, long destId, boolean notifyMember) voidundoDeleteDocument(String documentId, long authenticatedUserId) voidunShareDocument(String documentId, long destId) voidupdateDocumentDescription(long ownerId, String documentID, String description, long aclIdentity) voidupdatePermissions(String documentId, org.exoplatform.documents.model.NodePermission nodePermissionEntity, long authenticatedUserId) org.exoplatform.documents.model.FileVersionupdateVersionSummary(String originFileId, String versionId, String summary, String aclIdentity)
-
Field Details
-
RENAME_FILE_EVENT
-
-
Constructor Details
-
DocumentFileServiceImpl
public DocumentFileServiceImpl(org.exoplatform.documents.storage.DocumentFileStorage documentFileStorage, org.exoplatform.documents.storage.JCRDeleteFileStorage jcrDeleteFileStorage, org.exoplatform.services.security.Authenticator authenticator, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.services.security.IdentityRegistry identityRegistry, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.analytics.api.service.AnalyticsService analyticsService)
-
-
Method Details
-
getDocumentItems
public List<org.exoplatform.documents.model.AbstractNode> getDocumentItems(org.exoplatform.documents.constant.FileListingType listingType, org.exoplatform.documents.model.DocumentNodeFilter filter, int offset, int limit, long userIdentityId, boolean showHiddenFiles) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getDocumentItemsin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getFilesTimeline
public List<org.exoplatform.documents.model.FileNode> getFilesTimeline(org.exoplatform.documents.model.DocumentTimelineFilter filter, int offset, int limit, long userIdentityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getFilesTimelinein interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getBiggestDocuments
public List<org.exoplatform.documents.model.AbstractNode> getBiggestDocuments(long ownerId, org.exoplatform.social.core.identity.model.Identity userIdentity, int offset, int limit) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getBiggestDocumentsin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getGroupDocumentsCount
public org.exoplatform.documents.model.DocumentGroupsSize getGroupDocumentsCount(org.exoplatform.documents.model.DocumentTimelineFilter filter, long userIdentityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getGroupDocumentsCountin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getFolderChildNodes
public List<org.exoplatform.documents.model.AbstractNode> getFolderChildNodes(org.exoplatform.documents.model.DocumentFolderFilter filter, int offset, int limit, long userIdentityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getFolderChildNodesin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getBreadcrumb
public List<org.exoplatform.documents.model.BreadCrumbItem> getBreadcrumb(long ownerId, String folderId, String folderPath, long authenticatedUserId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getBreadcrumbin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getFullTreeData
public List<org.exoplatform.documents.model.FullTreeItem> getFullTreeData(long ownerId, String folderId, long authenticatedUserId, boolean withChildren) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getFullTreeDatain interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
duplicateDocument
public org.exoplatform.documents.model.AbstractNode duplicateDocument(long ownerId, String fileId, String prefixClone, long authenticatedUserId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
duplicateDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
moveDocument
public void moveDocument(long ownerId, String fileId, String destPath, long authenticatedUserId, String conflictAction) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.commons.ObjectAlreadyExistsException - Specified by:
moveDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.commons.ObjectAlreadyExistsException
-
createFolder
public org.exoplatform.documents.model.AbstractNode createFolder(long ownerId, String folderId, String folderPath, String name, long authenticatedUserId) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
createFolderin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.ObjectAlreadyExistsExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getNewName
public String getNewName(long ownerId, String folderId, String folderPath, String name) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getNewNamein interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.ObjectAlreadyExistsExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
renameDocument
public void renameDocument(long ownerId, String documentID, String name, long authenticatedUserId) throws IllegalAccessException, org.exoplatform.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
renameDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.ObjectAlreadyExistsExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
deleteDocument
public void deleteDocument(String folderPath, String documentId, boolean favorite, long delay, long authenticatedUserId) throws IllegalAccessException - Specified by:
deleteDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
undoDeleteDocument
- Specified by:
undoDeleteDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService
-
deleteDocuments
public void deleteDocuments(int actionId, List<org.exoplatform.documents.model.AbstractNode> documents, long authenticatedUserId) throws IllegalAccessException - Specified by:
deleteDocumentsin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
downloadDocuments
public void downloadDocuments(int actionId, List<org.exoplatform.documents.model.AbstractNode> documents, long authenticatedUserId) throws IllegalAccessException - Specified by:
downloadDocumentsin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
updatePermissions
public void updatePermissions(String documentId, org.exoplatform.documents.model.NodePermission nodePermissionEntity, long authenticatedUserId) throws IllegalAccessException - Specified by:
updatePermissionsin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
notifyMember
- Specified by:
notifyMemberin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
canAccess
public boolean canAccess(String documentID, org.exoplatform.services.security.Identity aclIdentity) throws javax.jcr.RepositoryException - Specified by:
canAccessin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
javax.jcr.RepositoryException
-
getAclUserIdentity
public org.exoplatform.services.security.Identity getAclUserIdentity(String username) throws IllegalAccessException - Specified by:
getAclUserIdentityin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
updateDocumentDescription
public void updateDocumentDescription(long ownerId, String documentID, String description, long aclIdentity) throws IllegalStateException, IllegalAccessException, javax.jcr.RepositoryException - Specified by:
updateDocumentDescriptionin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalStateExceptionIllegalAccessExceptionjavax.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.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.ObjectAlreadyExistsException
-
getFileVersions
public List<org.exoplatform.documents.model.FileVersion> getFileVersions(String fileNodeId, String aclIdentity) - Specified by:
getFileVersionsin interfaceorg.exoplatform.documents.service.DocumentFileService
-
updateVersionSummary
public org.exoplatform.documents.model.FileVersion updateVersionSummary(String originFileId, String versionId, String summary, String aclIdentity) - Specified by:
updateVersionSummaryin interfaceorg.exoplatform.documents.service.DocumentFileService
-
restoreVersion
public org.exoplatform.documents.model.FileVersion restoreVersion(String versionId, String aclIdentity) - Specified by:
restoreVersionin interfaceorg.exoplatform.documents.service.DocumentFileService- Returns:
-
canAddDocument
- Specified by:
canAddDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService
-
getDownloadZipBytes
- Specified by:
getDownloadZipBytesin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IOException
-
cancelBulkAction
- Specified by:
cancelBulkActionin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IOException
-
createNewVersion
public org.exoplatform.documents.model.FileVersion createNewVersion(String nodeId, String aclIdentity, InputStream newContent) - Specified by:
createNewVersionin interfaceorg.exoplatform.documents.service.DocumentFileService
-
moveDocuments
public void moveDocuments(int actionId, long ownerId, List<org.exoplatform.documents.model.AbstractNode> documents, String destPath, long userIdentityId) throws IllegalAccessException - Specified by:
moveDocumentsin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
getDefaultView
- Specified by:
getDefaultViewin interfaceorg.exoplatform.documents.service.DocumentFileService
-
canImport
public boolean canImport(org.exoplatform.services.security.Identity identity) - Specified by:
canImportin interfaceorg.exoplatform.documents.service.DocumentFileService
-
getDocumentsSizeStat
public org.exoplatform.documents.model.DocumentsSize getDocumentsSizeStat(long ownerId, long userIdentityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getDocumentsSizeStatin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
addDocumentsSizeStat
public org.exoplatform.documents.model.DocumentsSize addDocumentsSizeStat(long ownerId, long userIdentityId) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
addDocumentsSizeStatin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
setDefaultView
- Specified by:
setDefaultViewin interfaceorg.exoplatform.documents.service.DocumentFileService
-
hasEditPermissionOnDocument
public boolean hasEditPermissionOnDocument(String nodeId, long userIdentityId) throws IllegalAccessException - Specified by:
hasEditPermissionOnDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessException
-
importFiles
public void importFiles(String ownerId, String folderId, String folderPath, String uploadId, String conflict, org.exoplatform.services.security.Identity identity, long authenticatedUserId) throws Exception - Specified by:
importFilesin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
Exception
-