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 Modifier and Type Field Description static StringRENAME_FILE_EVENT
-
Constructor Summary
Constructors Constructor Description 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAccess(String documentID, org.exoplatform.services.security.Identity aclIdentity)org.exoplatform.documents.model.AbstractNodecreateFolder(long ownerId, String folderId, String folderPath, String name, long authenticatedUserId)voiddeleteDocument(String folderPath, String documentId, boolean favorite, long delay, 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.BreadCrumbItem>getBreadcrumb(long ownerId, String folderId, String folderPath, long authenticatedUserId)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)List<org.exoplatform.documents.model.FileNode>getFilesTimeline(org.exoplatform.documents.model.DocumentTimelineFilter filter, int offset, int limit, long userIdentityId)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)org.exoplatform.documents.model.DocumentGroupsSizegetGroupDocumentsCount(org.exoplatform.documents.model.DocumentTimelineFilter filter, long userIdentityId)StringgetNewName(long ownerId, String folderId, String folderPath, String name)voidmoveDocument(long ownerId, String fileId, String destPath, long authenticatedUserId)voidrenameDocument(long ownerId, String documentID, String name, long authenticatedUserId)voidshareDocument(String documentId, long destId)voidundoDeleteDocument(String documentId, long authenticatedUserId)voidupdatePermissions(String documentId, org.exoplatform.documents.model.NodePermission nodePermissionEntity, long authenticatedUserId)
-
-
-
Field Detail
-
RENAME_FILE_EVENT
public static String RENAME_FILE_EVENT
-
-
Constructor Detail
-
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)
-
-
Method Detail
-
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
-
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) 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) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException- Specified by:
moveDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
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
public void undoDeleteDocument(String documentId, long authenticatedUserId)
- Specified by:
undoDeleteDocumentin interfaceorg.exoplatform.documents.service.DocumentFileService
-
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
-
shareDocument
public void shareDocument(String documentId, long destId) throws IllegalAccessException
- Specified by:
shareDocumentin 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
-
-