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
FieldsModifier and TypeFieldDescriptionstatic final StringThe texts extracted to be read part by part take at most this many MB on disk.static final StringThe text read part by part is cut at this many characters.static final StringFiles larger than this many MB are not read part by part: the largest file a user can attach in the UI, so any file attached there can be read.static final StringExtracting a file read part by part is abandoned after this many seconds.static final StringA caller waits this many seconds for a file's extraction before being told to ask again.static final Stringstatic final Stringstatic final StringThe text extracted on the fly is cut at this many characters.static final StringFiles of this many MB or larger are not read to extract their text on the fly.static final StringAn on-the-fly text extraction taking longer than this many seconds is abandoned. -
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, org.exoplatform.services.cms.documents.DocumentService documentService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyTranscriptionSpeakerSuggestion(String documentId, org.exoplatform.documents.model.TranscriptionSpeakerSuggestion suggestion, long transcriptUpdated, org.exoplatform.services.security.Identity aclIdentity) longcalculateFilesSize(Long ownerId, org.exoplatform.services.security.Identity aclIdentity) booleanvoidcancelBulkAction(String actionId, String userName) booleancanImport(org.exoplatform.services.security.Identity identity) voidcheckUploadConflict(String folderId, String name, org.exoplatform.documents.constant.UploadConflictAction conflictAction, org.exoplatform.services.security.Identity aclIdentity) voidbooleanclearTranscriptionState(String documentId) voidcompleteTranscription(String documentId, String transcription, String segments, org.exoplatform.documents.model.TranscriptionState state) org.exoplatform.documents.model.AbstractNodecopyDocument(String nodeId, String destintionNodeId, org.exoplatform.services.security.Identity aclIdentity) countNodeAccessList(javax.jcr.Node node, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.AbstractNodecreateDocumentFromTemplate(long ownerId, String folderId, String folderPath, String title, String documentType, 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) getAudioTranscription(String documentId) getAudioTranscription(String documentId, org.exoplatform.services.security.Identity aclIdentity) List<org.exoplatform.documents.model.AbstractNode> getBiggestDocuments(Long ownerId, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit) List<org.exoplatform.documents.model.BreadCrumbItem> getBreadcrumb(long ownerId, String folderId, String folderPath, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.DocumentAudiencegetDocumentAudience(String documentId) org.exoplatform.documents.model.AbstractNodegetDocumentById(String documentId) org.exoplatform.documents.model.AbstractNodegetDocumentById(String documentId, String username) org.exoplatform.documents.model.AbstractNodegetDocumentById(javax.jcr.Session session, String documentId, org.exoplatform.services.security.Identity identity) Reads a document through the given session.getDocumentCategoryIds(long ownerId, org.exoplatform.services.security.Identity aclIdentity) io.meeds.portal.thumbnail.model.FileContentgetDocumentContent(String documentId, String aclIdentity) org.exoplatform.documents.model.DownloadItemgetDocumentDownloadItem(String documentId) getDocumentPathInDrive(String documentId, long ownerId, org.exoplatform.services.security.Identity aclIdentity) getDocumentSpaceGroupId(String documentId) byte[]getDownloadZipBytes(int actionId, String userName) getFavoriteFileIds(org.exoplatform.documents.model.DocumentNodeFilter filter, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit) getFileContentAsStream(String documentId, org.exoplatform.services.security.Identity aclIdentity) getFileContentAsText(String documentId) From the search index when it already holds it, else extracted from the file itself; null when neither gives any text, seegetFileTextContent(String)for why.List<org.exoplatform.documents.model.FileNode> getFilesTimeline(org.exoplatform.documents.model.DocumentTimelineFilter filter, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit) org.exoplatform.documents.model.DocumentTextContentgetFileTextContent(String documentId) The search index is asked first, being the cheapest; a file saved a few seconds ago, or never indexed, is not there yet, so its text is then extracted from the file itself.org.exoplatform.documents.model.DocumentTextPagegetFileTextPage(String documentId, long offset, int maxChars) The whole text is extracted from the file once per version of it, on this node, whatever the search index holds, so its parts and its outline come from one reading.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, String destinationFolderPath, org.exoplatform.services.security.Identity aclIdentity, boolean withChildren, boolean showHidden) 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) org.exoplatform.documents.model.FolderNodegetPersonalRootFolder(org.exoplatform.services.security.Identity aclIdentity) longgetRootFolderOwnerId(String documentId) org.exoplatform.documents.model.FolderNodegetSpaceRootFolder(long spaceId, org.exoplatform.services.security.Identity aclIdentity) getTranscriptionChapters(String documentId, org.exoplatform.services.security.Identity aclIdentity) getTranscriptionSegments(String documentId) getTranscriptionSegments(String documentId, org.exoplatform.services.security.Identity aclIdentity) getTranscriptionSpeakers(String documentId, org.exoplatform.services.security.Identity aclIdentity) List<org.exoplatform.documents.model.TranscriptionSpeakerSuggestion> getTranscriptionSpeakerSuggestions(String documentId, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.TranscriptionStategetTranscriptionState(String documentId) org.exoplatform.documents.model.TranscriptionStategetTranscriptionState(String documentId, org.exoplatform.services.security.Identity aclIdentity) booleanhasEditPermissions(String nodeId, org.exoplatform.services.security.Identity aclUserIdentity) booleanhasFolderNodes(javax.jcr.Node node, boolean showHidden) 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) booleanisPersonalDrive(javax.jcr.Node node) booleanmarkTranscriptionQueued(String documentId) 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) voidremoveTranscriptionSpeakerSuggestion(String documentId, String speaker, org.exoplatform.services.security.Identity aclIdentity) voidrenameDocument(long ownerId, String documentID, String title, org.exoplatform.services.security.Identity aclIdentity) org.exoplatform.documents.model.FileVersionrestoreVersion(String versionId, String aclIdentity) booleansaveTranscriptionChapters(String documentId, String chapters, long transcriptUpdated) booleansaveTranscriptionSpeakerSuggestions(String documentId, List<org.exoplatform.documents.model.TranscriptionSpeakerSuggestion> suggestions, long transcriptUpdated) org.exoplatform.documents.model.FileNodesaveUploadedDocument(String folderId, String uploadId, String name, org.exoplatform.documents.constant.UploadConflictAction conflictAction, org.exoplatform.services.security.Identity aclIdentity) List<org.exoplatform.documents.model.FileNode> List<org.exoplatform.documents.model.FileNode> search(org.exoplatform.documents.model.DocumentTimelineFilter filter, org.exoplatform.services.security.Identity identity, int offset, int limit) voidsetDocumentVisibility(long ownerId, String documentID, Boolean hidden, org.exoplatform.services.security.Identity aclIdentity) voidsetTranscriptionSpeaker(String documentId, String speaker, String identityId, org.exoplatform.services.security.Identity aclIdentity) voidshareDocument(String documentId, long destId, org.exoplatform.services.security.Identity aclIdentity, boolean notifyMember) voidunShareDocument(String documentId, long destId) voidupdateAudioTranscription(String documentId, String transcription) voidupdateAudioTranscription(String documentId, String transcription, org.exoplatform.services.security.Identity aclIdentity) 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) voidupdateTranscriptionState(String documentId, org.exoplatform.documents.model.TranscriptionState state) org.exoplatform.documents.model.FileVersionupdateVersionSummary(String originFileId, String versionId, String summary, String aclIdentity) voidvalidateUploadedContent(String fileName, String mimeType, byte[] content) voidvalidateUploadedFile(String fileName, String mimeType, Path file)
-
Field Details
-
PAGED_TEXT_MAX_SIZE_MB_PROPERTY
Files larger than this many MB are not read part by part: the largest file a user can attach in the UI, so any file attached there can be read.- See Also:
-
PAGED_TEXT_MAX_CHARS_PROPERTY
The text read part by part is cut at this many characters.- See Also:
-
PAGED_TEXT_TIMEOUT_SECONDS_PROPERTY
Extracting a file read part by part is abandoned after this many seconds. A file read by a platform reader that builds its whole text before giving any, an older Office, an Outlook or an OpenDocument file for instance, is not stopped: it keeps the one extraction thread until it ends.- See Also:
-
PAGED_TEXT_WAIT_SECONDS_PROPERTY
A caller waits this many seconds for a file's extraction before being told to ask again.- See Also:
-
PAGED_TEXT_CACHE_MAX_MB_PROPERTY
The texts extracted to be read part by part take at most this many MB on disk.- See Also:
-
TEXT_EXTRACTION_MAX_SIZE_MB_PROPERTY
Files of this many MB or larger are not read to extract their text on the fly.- See Also:
-
TEXT_EXTRACTION_MAX_CHARS_PROPERTY
The text extracted on the fly is cut at this many characters.- See Also:
-
TEXT_EXTRACTION_TIMEOUT_SECONDS_PROPERTY
An on-the-fly text extraction taking longer than this many seconds is abandoned.- See Also:
-
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, org.exoplatform.services.cms.documents.DocumentService documentService)
-
-
Method Details
-
getSpaceRootFolder
public org.exoplatform.documents.model.FolderNode getSpaceRootFolder(long spaceId, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getSpaceRootFolderin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getRootFolderOwnerId
- Specified by:
getRootFolderOwnerIdin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getPersonalRootFolder
public org.exoplatform.documents.model.FolderNode getPersonalRootFolder(org.exoplatform.services.security.Identity aclIdentity) - Specified by:
getPersonalRootFolderin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
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
-
getFavoriteFileIds
public List<String> getFavoriteFileIds(org.exoplatform.documents.model.DocumentNodeFilter filter, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit) - Specified by:
getFavoriteFileIdsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
search
public List<org.exoplatform.documents.model.FileNode> search(String keyword, org.exoplatform.services.security.Identity identity, int offset, int limit) - Specified by:
searchin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
search
public List<org.exoplatform.documents.model.FileNode> search(org.exoplatform.documents.model.DocumentTimelineFilter filter, org.exoplatform.services.security.Identity identity, int offset, int limit) - Specified by:
searchin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getBiggestDocuments
public List<org.exoplatform.documents.model.AbstractNode> getBiggestDocuments(Long ownerId, org.exoplatform.services.security.Identity aclIdentity, int offset, int limit) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getBiggestDocumentsin 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, String destinationFolderPath, org.exoplatform.services.security.Identity aclIdentity, boolean withChildren, boolean showHidden) - 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
-
createDocumentFromTemplate
public org.exoplatform.documents.model.AbstractNode createDocumentFromTemplate(long ownerId, String folderId, String folderPath, String title, String documentType, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.commons.ObjectAlreadyExistsException - Specified by:
createDocumentFromTemplatein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionorg.exoplatform.commons.ObjectAlreadyExistsException
-
checkUploadConflict
public void checkUploadConflict(String folderId, String name, org.exoplatform.documents.constant.UploadConflictAction conflictAction, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
checkUploadConflictin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
saveUploadedDocument
public org.exoplatform.documents.model.FileNode saveUploadedDocument(String folderId, String uploadId, String name, org.exoplatform.documents.constant.UploadConflictAction conflictAction, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
saveUploadedDocumentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
validateUploadedContent
- Specified by:
validateUploadedContentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
validateUploadedFile
- Specified by:
validateUploadedFilein interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
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
-
setDocumentVisibility
public void setDocumentVisibility(long ownerId, String documentID, Boolean hidden, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.ObjectAlreadyExistsException - Specified by:
setDocumentVisibilityin 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
-
copyDocument
public org.exoplatform.documents.model.AbstractNode copyDocument(String nodeId, String destintionNodeId, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
copyDocumentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.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
-
getDocumentCategoryIds
public List<Long> getDocumentCategoryIds(long ownerId, org.exoplatform.services.security.Identity aclIdentity) - Specified by:
getDocumentCategoryIdsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
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
- Specified by:
canAccessin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getAudioTranscription
public String getAudioTranscription(String documentId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException - Specified by:
getAudioTranscriptionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessException
-
getAudioTranscription
- Specified by:
getAudioTranscriptionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
updateAudioTranscription
public void updateAudioTranscription(String documentId, String transcription, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException - Specified by:
updateAudioTranscriptionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessException
-
updateAudioTranscription
- Specified by:
updateAudioTranscriptionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getTranscriptionState
public org.exoplatform.documents.model.TranscriptionState getTranscriptionState(String documentId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranscriptionStatein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getTranscriptionState
public org.exoplatform.documents.model.TranscriptionState getTranscriptionState(String documentId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranscriptionStatein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
updateTranscriptionState
public void updateTranscriptionState(String documentId, org.exoplatform.documents.model.TranscriptionState state) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
updateTranscriptionStatein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
markTranscriptionQueued
public boolean markTranscriptionQueued(String documentId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
markTranscriptionQueuedin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
clearTranscriptionState
public boolean clearTranscriptionState(String documentId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
clearTranscriptionStatein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
completeTranscription
public void completeTranscription(String documentId, String transcription, String segments, org.exoplatform.documents.model.TranscriptionState state) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
completeTranscriptionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getTranscriptionSegments
public String getTranscriptionSegments(String documentId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranscriptionSegmentsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getTranscriptionSegments
public String getTranscriptionSegments(String documentId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranscriptionSegmentsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
saveTranscriptionChapters
public boolean saveTranscriptionChapters(String documentId, String chapters, long transcriptUpdated) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
saveTranscriptionChaptersin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getTranscriptionChapters
public String getTranscriptionChapters(String documentId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranscriptionChaptersin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getTranscriptionSpeakers
public Map<String,String> getTranscriptionSpeakers(String documentId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranscriptionSpeakersin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
setTranscriptionSpeaker
public void setTranscriptionSpeaker(String documentId, String speaker, String identityId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
setTranscriptionSpeakerin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getDocumentAudience
public org.exoplatform.documents.model.DocumentAudience getDocumentAudience(String documentId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getDocumentAudiencein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
saveTranscriptionSpeakerSuggestions
public boolean saveTranscriptionSpeakerSuggestions(String documentId, List<org.exoplatform.documents.model.TranscriptionSpeakerSuggestion> suggestions, long transcriptUpdated) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
saveTranscriptionSpeakerSuggestionsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getTranscriptionSpeakerSuggestions
public List<org.exoplatform.documents.model.TranscriptionSpeakerSuggestion> getTranscriptionSpeakerSuggestions(String documentId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getTranscriptionSpeakerSuggestionsin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
removeTranscriptionSpeakerSuggestion
public void removeTranscriptionSpeakerSuggestion(String documentId, String speaker, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
removeTranscriptionSpeakerSuggestionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
applyTranscriptionSpeakerSuggestion
public boolean applyTranscriptionSpeakerSuggestion(String documentId, org.exoplatform.documents.model.TranscriptionSpeakerSuggestion suggestion, long transcriptUpdated, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
applyTranscriptionSpeakerSuggestionin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
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
-
getDocumentById
public org.exoplatform.documents.model.AbstractNode getDocumentById(String documentId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
getDocumentByIdin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getDocumentById
- Specified by:
getDocumentByIdin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getDocumentPathInDrive
public String getDocumentPathInDrive(String documentId, long ownerId, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getDocumentPathInDrivein interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getDocumentSpaceGroupId
- Specified by:
getDocumentSpaceGroupIdin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getDocumentContent
public io.meeds.portal.thumbnail.model.FileContent getDocumentContent(String documentId, String aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
getDocumentContentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
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
-
getFileContentAsText
From the search index when it already holds it, else extracted from the file itself; null when neither gives any text, seegetFileTextContent(String)for why.- Specified by:
getFileContentAsTextin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getFileTextContent
The search index is asked first, being the cheapest; a file saved a few seconds ago, or never indexed, is not there yet, so its text is then extracted from the file itself.- Specified by:
getFileTextContentin interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getFileTextPage
public org.exoplatform.documents.model.DocumentTextPage getFileTextPage(String documentId, long offset, int maxChars) The whole text is extracted from the file once per version of it, on this node, whatever the search index holds, so its parts and its outline come from one reading.- Specified by:
getFileTextPagein interfaceorg.exoplatform.documents.storage.DocumentFileStorage
-
getFileContentAsStream
public InputStream getFileContentAsStream(String documentId, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException - Specified by:
getFileContentAsStreamin interfaceorg.exoplatform.documents.storage.DocumentFileStorage- Throws:
IllegalAccessException
-
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
-
hasFolderNodes
public boolean hasFolderNodes(javax.jcr.Node node, boolean showHidden) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-
isPersonalDrive
public boolean isPersonalDrive(javax.jcr.Node node) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-
getDocumentById
public org.exoplatform.documents.model.AbstractNode getDocumentById(javax.jcr.Session session, String documentId, org.exoplatform.services.security.Identity identity) throws javax.jcr.RepositoryException Reads a document through the given session. A shortcut resolves to its target, carrying the shortcut's path.- Parameters:
session- the session to read with, whose user's rights applydocumentId- the document ididentity- the user's identity, to compute the user's rights- Returns:
- the document, null when no node has the id or the session can't read it
- Throws:
javax.jcr.ItemNotFoundException- when the node is neither a file nor a folder, or is a shortcut whose target is gone or can't be readjavax.jcr.RepositoryException- when the repository can't be read
-