public class DocumentServiceImpl extends Object implements org.bonitasoft.engine.core.document.api.DocumentService
| Constructor and Description |
|---|
DocumentServiceImpl(org.bonitasoft.engine.recorder.Recorder recorder,
org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
SDocumentDownloadURLProvider urlProvider,
org.bonitasoft.engine.events.EventService eventService,
org.bonitasoft.engine.archive.ArchiveService archiveService) |
| Modifier and Type | Method and Description |
|---|---|
void |
archive(org.bonitasoft.engine.core.document.model.SDocumentMapping docMapping,
long archiveDate) |
org.bonitasoft.engine.core.document.model.SMappedDocument |
attachDocumentToProcessInstance(org.bonitasoft.engine.core.document.model.SDocument document,
long processInstanceId,
String name,
String description) |
org.bonitasoft.engine.core.document.model.SMappedDocument |
attachDocumentToProcessInstance(org.bonitasoft.engine.core.document.model.SDocument document,
long processInstanceId,
String name,
String description,
int index) |
void |
deleteArchivedDocuments(long instanceId) |
void |
deleteContentOfArchivedDocument(long archivedDocumentId) |
void |
deleteDocument(org.bonitasoft.engine.core.document.model.SLightDocument document) |
void |
deleteDocumentsFromProcessInstance(Long processInstanceId) |
String |
generateDocumentURL(String name,
String contentStorageId) |
org.bonitasoft.engine.core.document.model.archive.SAMappedDocument |
getArchivedDocument(long archivedProcessDocumentId) |
org.bonitasoft.engine.core.document.model.archive.SAMappedDocument |
getArchivedVersionOfProcessDocument(long documentId) |
org.bonitasoft.engine.core.document.model.SLightDocument |
getDocument(long documentId) |
byte[] |
getDocumentContent(String documentId) |
List<org.bonitasoft.engine.core.document.model.SMappedDocument> |
getDocumentList(String documentName,
long processInstanceId,
int fromIndex,
int numberOfResult) |
List<org.bonitasoft.engine.core.document.model.SMappedDocument> |
getDocumentList(String documentName,
long processInstanceId,
long time) |
List<org.bonitasoft.engine.core.document.model.SMappedDocument> |
getDocumentsOfProcessInstance(long processInstanceId,
int fromIndex,
int numberPerPage,
String field,
org.bonitasoft.engine.persistence.OrderByType order) |
org.bonitasoft.engine.core.document.model.SMappedDocument |
getMappedDocument(long mappingId) |
org.bonitasoft.engine.core.document.model.SMappedDocument |
getMappedDocument(long processInstanceId,
String documentName) |
org.bonitasoft.engine.core.document.model.SMappedDocument |
getMappedDocument(long processInstanceId,
String documentName,
long time) |
long |
getNumberOfArchivedDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
long |
getNumberOfArchivedDocumentsSupervisedBy(long userId,
org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
long |
getNumberOfDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
long |
getNumberOfDocumentsOfProcessInstance(long processInstanceId) |
long |
getNumberOfDocumentsSupervisedBy(long userId,
org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
void |
removeCurrentVersion(long processInstanceId,
String documentName) |
void |
removeCurrentVersion(org.bonitasoft.engine.core.document.model.SMappedDocument document) |
void |
removeDocument(org.bonitasoft.engine.core.document.model.SMappedDocument mappedDocument) |
List<org.bonitasoft.engine.core.document.model.archive.SAMappedDocument> |
searchArchivedDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
List<org.bonitasoft.engine.core.document.model.archive.SAMappedDocument> |
searchArchivedDocumentsSupervisedBy(long userId,
org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
List<org.bonitasoft.engine.core.document.model.SMappedDocument> |
searchDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
List<org.bonitasoft.engine.core.document.model.SMappedDocument> |
searchDocumentsSupervisedBy(long userId,
org.bonitasoft.engine.persistence.QueryOptions queryOptions) |
org.bonitasoft.engine.core.document.model.SMappedDocument |
updateDocument(long documentId,
org.bonitasoft.engine.core.document.model.SDocument sDocument) |
org.bonitasoft.engine.core.document.model.SMappedDocument |
updateDocument(org.bonitasoft.engine.core.document.model.SDocumentMapping documentToUpdate,
org.bonitasoft.engine.core.document.model.SDocument sDocument) |
void |
updateDocumentIndex(org.bonitasoft.engine.core.document.model.SMappedDocument mappedDocument,
int index) |
void |
updateDocumentOfList(org.bonitasoft.engine.core.document.model.SMappedDocument mappedDocument,
org.bonitasoft.engine.core.document.model.SDocument document,
int index) |
public DocumentServiceImpl(org.bonitasoft.engine.recorder.Recorder recorder,
org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
SDocumentDownloadURLProvider urlProvider,
org.bonitasoft.engine.events.EventService eventService,
org.bonitasoft.engine.archive.ArchiveService archiveService)
public org.bonitasoft.engine.core.document.model.SMappedDocument attachDocumentToProcessInstance(org.bonitasoft.engine.core.document.model.SDocument document,
long processInstanceId,
String name,
String description)
throws org.bonitasoft.engine.commons.exceptions.SObjectCreationException
attachDocumentToProcessInstance in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectCreationExceptionpublic org.bonitasoft.engine.core.document.model.SMappedDocument attachDocumentToProcessInstance(org.bonitasoft.engine.core.document.model.SDocument document,
long processInstanceId,
String name,
String description,
int index)
throws org.bonitasoft.engine.commons.exceptions.SObjectCreationException,
org.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsException
attachDocumentToProcessInstance in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectCreationExceptionorg.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsExceptionpublic void updateDocumentOfList(org.bonitasoft.engine.core.document.model.SMappedDocument mappedDocument,
org.bonitasoft.engine.core.document.model.SDocument document,
int index)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
updateDocumentOfList in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic void updateDocumentIndex(org.bonitasoft.engine.core.document.model.SMappedDocument mappedDocument,
int index)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
updateDocumentIndex in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic void deleteDocumentsFromProcessInstance(Long processInstanceId) throws org.bonitasoft.engine.persistence.SBonitaReadException, org.bonitasoft.engine.commons.exceptions.SObjectModificationException
deleteDocumentsFromProcessInstance in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic String generateDocumentURL(String name, String contentStorageId)
generateDocumentURL in interface org.bonitasoft.engine.core.document.api.DocumentServicepublic org.bonitasoft.engine.core.document.model.archive.SAMappedDocument getArchivedDocument(long archivedProcessDocumentId)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException
getArchivedDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionpublic org.bonitasoft.engine.core.document.model.archive.SAMappedDocument getArchivedVersionOfProcessDocument(long documentId)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException
getArchivedVersionOfProcessDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionpublic org.bonitasoft.engine.core.document.model.SLightDocument getDocument(long documentId)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException,
org.bonitasoft.engine.persistence.SBonitaReadException
getDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic org.bonitasoft.engine.core.document.model.SMappedDocument getMappedDocument(long processInstanceId,
String documentName)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException,
org.bonitasoft.engine.persistence.SBonitaReadException
getMappedDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic org.bonitasoft.engine.core.document.model.SMappedDocument getMappedDocument(long processInstanceId,
String documentName,
long time)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException,
org.bonitasoft.engine.persistence.SBonitaReadException
getMappedDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic byte[] getDocumentContent(String documentId) throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException
getDocumentContent in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionpublic org.bonitasoft.engine.core.document.model.SMappedDocument getMappedDocument(long mappingId)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException,
org.bonitasoft.engine.persistence.SBonitaReadException
getMappedDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<org.bonitasoft.engine.core.document.model.SMappedDocument> getDocumentsOfProcessInstance(long processInstanceId, int fromIndex, int numberPerPage, String field, org.bonitasoft.engine.persistence.OrderByType order) throws org.bonitasoft.engine.persistence.SBonitaReadException
getDocumentsOfProcessInstance in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic long getNumberOfArchivedDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions)
throws org.bonitasoft.engine.persistence.SBonitaReadException
getNumberOfArchivedDocuments in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic long getNumberOfArchivedDocumentsSupervisedBy(long userId,
org.bonitasoft.engine.persistence.QueryOptions queryOptions)
throws org.bonitasoft.engine.persistence.SBonitaReadException
getNumberOfArchivedDocumentsSupervisedBy in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic long getNumberOfDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions)
throws org.bonitasoft.engine.persistence.SBonitaReadException
getNumberOfDocuments in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic long getNumberOfDocumentsOfProcessInstance(long processInstanceId)
throws org.bonitasoft.engine.persistence.SBonitaReadException
getNumberOfDocumentsOfProcessInstance in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic long getNumberOfDocumentsSupervisedBy(long userId,
org.bonitasoft.engine.persistence.QueryOptions queryOptions)
throws org.bonitasoft.engine.persistence.SBonitaReadException
getNumberOfDocumentsSupervisedBy in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic void removeCurrentVersion(org.bonitasoft.engine.core.document.model.SMappedDocument document)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
removeCurrentVersion in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic void removeCurrentVersion(long processInstanceId,
String documentName)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException,
org.bonitasoft.engine.commons.exceptions.SObjectModificationException
removeCurrentVersion in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic void deleteDocument(org.bonitasoft.engine.core.document.model.SLightDocument document)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
deleteDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic void removeDocument(org.bonitasoft.engine.core.document.model.SMappedDocument mappedDocument)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
removeDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic List<org.bonitasoft.engine.core.document.model.archive.SAMappedDocument> searchArchivedDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
searchArchivedDocuments in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<org.bonitasoft.engine.core.document.model.archive.SAMappedDocument> searchArchivedDocumentsSupervisedBy(long userId, org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
searchArchivedDocumentsSupervisedBy in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<org.bonitasoft.engine.core.document.model.SMappedDocument> searchDocuments(org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
searchDocuments in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<org.bonitasoft.engine.core.document.model.SMappedDocument> searchDocumentsSupervisedBy(long userId, org.bonitasoft.engine.persistence.QueryOptions queryOptions) throws org.bonitasoft.engine.persistence.SBonitaReadException
searchDocumentsSupervisedBy in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic void deleteArchivedDocuments(long instanceId)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
deleteArchivedDocuments in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic void archive(org.bonitasoft.engine.core.document.model.SDocumentMapping docMapping,
long archiveDate)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
archive in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic List<org.bonitasoft.engine.core.document.model.SMappedDocument> getDocumentList(String documentName, long processInstanceId, int fromIndex, int numberOfResult) throws org.bonitasoft.engine.persistence.SBonitaReadException
getDocumentList in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic void deleteContentOfArchivedDocument(long archivedDocumentId)
throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException,
org.bonitasoft.engine.persistence.SBonitaReadException,
org.bonitasoft.engine.recorder.SRecorderException
deleteContentOfArchivedDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.persistence.SBonitaReadExceptionorg.bonitasoft.engine.recorder.SRecorderExceptionpublic org.bonitasoft.engine.core.document.model.SMappedDocument updateDocument(long documentId,
org.bonitasoft.engine.core.document.model.SDocument sDocument)
throws org.bonitasoft.engine.persistence.SBonitaReadException,
org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException,
org.bonitasoft.engine.commons.exceptions.SObjectModificationException
updateDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic org.bonitasoft.engine.core.document.model.SMappedDocument updateDocument(org.bonitasoft.engine.core.document.model.SDocumentMapping documentToUpdate,
org.bonitasoft.engine.core.document.model.SDocument sDocument)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
updateDocument in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionpublic List<org.bonitasoft.engine.core.document.model.SMappedDocument> getDocumentList(String documentName, long processInstanceId, long time) throws org.bonitasoft.engine.persistence.SBonitaReadException
getDocumentList in interface org.bonitasoft.engine.core.document.api.DocumentServiceorg.bonitasoft.engine.persistence.SBonitaReadExceptionCopyright © 2016 Bonitasoft S.A.. All rights reserved.