Package org.bonitasoft.engine.api.impl
Class DocumentAPIImpl
- java.lang.Object
-
- org.bonitasoft.engine.api.impl.DocumentAPIImpl
-
- All Implemented Interfaces:
org.bonitasoft.engine.api.DocumentAPI
public class DocumentAPIImpl extends java.lang.Object implements org.bonitasoft.engine.api.DocumentAPI
- Author:
- Baptiste Mesta
-
-
Constructor Summary
Constructors Constructor Description DocumentAPIImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bonitasoft.engine.bpm.document.Document
addDocument(long processInstanceId, java.lang.String documentName, java.lang.String description, org.bonitasoft.engine.bpm.document.DocumentValue documentValue)
org.bonitasoft.engine.bpm.document.Document
attachDocument(long processInstanceId, java.lang.String documentName, java.lang.String fileName, java.lang.String mimeType, byte[] documentContent)
org.bonitasoft.engine.bpm.document.Document
attachDocument(long processInstanceId, java.lang.String documentName, java.lang.String fileName, java.lang.String mimeType, java.lang.String url)
org.bonitasoft.engine.bpm.document.Document
attachNewDocumentVersion(long processInstanceId, java.lang.String documentName, java.lang.String contentFileName, java.lang.String contentMimeType, byte[] documentContent)
org.bonitasoft.engine.bpm.document.Document
attachNewDocumentVersion(long processInstanceId, java.lang.String documentName, java.lang.String fileName, java.lang.String mimeType, java.lang.String url)
void
deleteContentOfArchivedDocument(long archivedDocumentId)
org.bonitasoft.engine.bpm.document.ArchivedDocument
getArchivedProcessDocument(long archivedProcessDocumentId)
org.bonitasoft.engine.bpm.document.ArchivedDocument
getArchivedVersionOfProcessDocument(long sourceObjectId)
org.bonitasoft.engine.bpm.document.Document
getDocument(long documentId)
org.bonitasoft.engine.bpm.document.Document
getDocumentAtActivityInstanceCompletion(long activityInstanceId, java.lang.String documentName)
org.bonitasoft.engine.bpm.document.Document
getDocumentAtProcessInstantiation(long processInstanceId, java.lang.String documentName)
byte[]
getDocumentContent(java.lang.String documentStorageId)
java.util.List<org.bonitasoft.engine.bpm.document.Document>
getDocumentList(long processInstanceId, java.lang.String name, int fromIndex, int numberOfResult)
org.bonitasoft.engine.bpm.document.Document
getLastDocument(long processInstanceId, java.lang.String documentName)
java.util.List<org.bonitasoft.engine.bpm.document.Document>
getLastVersionOfDocuments(long processInstanceId, int pageIndex, int numberPerPage, org.bonitasoft.engine.bpm.document.DocumentCriterion pagingCriterion)
long
getNumberOfDocuments(long processInstanceId)
org.bonitasoft.engine.bpm.document.Document
removeDocument(long documentId)
org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.ArchivedDocument>
searchArchivedDocuments(org.bonitasoft.engine.search.SearchOptions searchOptions)
org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.ArchivedDocument>
searchArchivedDocumentsSupervisedBy(long userId, org.bonitasoft.engine.search.SearchOptions searchOptions)
org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.Document>
searchDocuments(org.bonitasoft.engine.search.SearchOptions searchOptions)
org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.Document>
searchDocumentsSupervisedBy(long userId, org.bonitasoft.engine.search.SearchOptions searchOptions)
void
setDocumentList(long processInstanceId, java.lang.String name, java.util.List<org.bonitasoft.engine.bpm.document.DocumentValue> documentsValues)
org.bonitasoft.engine.bpm.document.Document
updateDocument(long documentId, org.bonitasoft.engine.bpm.document.DocumentValue documentValue)
-
-
-
Method Detail
-
attachDocument
public org.bonitasoft.engine.bpm.document.Document attachDocument(long processInstanceId, java.lang.String documentName, java.lang.String fileName, java.lang.String mimeType, java.lang.String url) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
- Specified by:
attachDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentAttachmentException
-
addDocument
public org.bonitasoft.engine.bpm.document.Document addDocument(long processInstanceId, java.lang.String documentName, java.lang.String description, org.bonitasoft.engine.bpm.document.DocumentValue documentValue) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException, org.bonitasoft.engine.exception.AlreadyExistsException
- Specified by:
addDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentAttachmentException
org.bonitasoft.engine.exception.AlreadyExistsException
-
updateDocument
public org.bonitasoft.engine.bpm.document.Document updateDocument(long documentId, org.bonitasoft.engine.bpm.document.DocumentValue documentValue) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
- Specified by:
updateDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentAttachmentException
-
attachDocument
public org.bonitasoft.engine.bpm.document.Document attachDocument(long processInstanceId, java.lang.String documentName, java.lang.String fileName, java.lang.String mimeType, byte[] documentContent) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
- Specified by:
attachDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentAttachmentException
-
attachNewDocumentVersion
public org.bonitasoft.engine.bpm.document.Document attachNewDocumentVersion(long processInstanceId, java.lang.String documentName, java.lang.String fileName, java.lang.String mimeType, java.lang.String url) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
- Specified by:
attachNewDocumentVersion
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentAttachmentException
-
attachNewDocumentVersion
public org.bonitasoft.engine.bpm.document.Document attachNewDocumentVersion(long processInstanceId, java.lang.String documentName, java.lang.String contentFileName, java.lang.String contentMimeType, byte[] documentContent) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
- Specified by:
attachNewDocumentVersion
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentAttachmentException
-
getDocument
public org.bonitasoft.engine.bpm.document.Document getDocument(long documentId) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
- Specified by:
getDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
-
getLastVersionOfDocuments
public java.util.List<org.bonitasoft.engine.bpm.document.Document> getLastVersionOfDocuments(long processInstanceId, int pageIndex, int numberPerPage, org.bonitasoft.engine.bpm.document.DocumentCriterion pagingCriterion) throws org.bonitasoft.engine.bpm.document.DocumentException
- Specified by:
getLastVersionOfDocuments
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentException
-
getDocumentContent
public byte[] getDocumentContent(java.lang.String documentStorageId) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
- Specified by:
getDocumentContent
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
-
getLastDocument
public org.bonitasoft.engine.bpm.document.Document getLastDocument(long processInstanceId, java.lang.String documentName) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
- Specified by:
getLastDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
-
getNumberOfDocuments
public long getNumberOfDocuments(long processInstanceId) throws org.bonitasoft.engine.bpm.document.DocumentException
- Specified by:
getNumberOfDocuments
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentException
-
getDocumentAtProcessInstantiation
public org.bonitasoft.engine.bpm.document.Document getDocumentAtProcessInstantiation(long processInstanceId, java.lang.String documentName) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
- Specified by:
getDocumentAtProcessInstantiation
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
-
getDocumentAtActivityInstanceCompletion
public org.bonitasoft.engine.bpm.document.Document getDocumentAtActivityInstanceCompletion(long activityInstanceId, java.lang.String documentName) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
- Specified by:
getDocumentAtActivityInstanceCompletion
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
-
searchDocuments
public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.Document> searchDocuments(org.bonitasoft.engine.search.SearchOptions searchOptions) throws org.bonitasoft.engine.exception.SearchException
- Specified by:
searchDocuments
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.exception.SearchException
-
searchDocumentsSupervisedBy
public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.Document> searchDocumentsSupervisedBy(long userId, org.bonitasoft.engine.search.SearchOptions searchOptions) throws org.bonitasoft.engine.exception.SearchException
- Specified by:
searchDocumentsSupervisedBy
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.exception.SearchException
-
searchArchivedDocuments
public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.ArchivedDocument> searchArchivedDocuments(org.bonitasoft.engine.search.SearchOptions searchOptions) throws org.bonitasoft.engine.exception.SearchException
- Specified by:
searchArchivedDocuments
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.exception.SearchException
-
searchArchivedDocumentsSupervisedBy
public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.bpm.document.ArchivedDocument> searchArchivedDocumentsSupervisedBy(long userId, org.bonitasoft.engine.search.SearchOptions searchOptions) throws org.bonitasoft.engine.exception.SearchException
- Specified by:
searchArchivedDocumentsSupervisedBy
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.exception.SearchException
-
getArchivedVersionOfProcessDocument
public org.bonitasoft.engine.bpm.document.ArchivedDocument getArchivedVersionOfProcessDocument(long sourceObjectId) throws org.bonitasoft.engine.bpm.document.ArchivedDocumentNotFoundException
- Specified by:
getArchivedVersionOfProcessDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.ArchivedDocumentNotFoundException
-
getArchivedProcessDocument
public org.bonitasoft.engine.bpm.document.ArchivedDocument getArchivedProcessDocument(long archivedProcessDocumentId) throws org.bonitasoft.engine.bpm.document.ArchivedDocumentNotFoundException
- Specified by:
getArchivedProcessDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.ArchivedDocumentNotFoundException
-
removeDocument
public org.bonitasoft.engine.bpm.document.Document removeDocument(long documentId) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException, org.bonitasoft.engine.exception.DeletionException
- Specified by:
removeDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
org.bonitasoft.engine.exception.DeletionException
-
getDocumentList
public java.util.List<org.bonitasoft.engine.bpm.document.Document> getDocumentList(long processInstanceId, java.lang.String name, int fromIndex, int numberOfResult) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
- Specified by:
getDocumentList
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
-
setDocumentList
public void setDocumentList(long processInstanceId, java.lang.String name, java.util.List<org.bonitasoft.engine.bpm.document.DocumentValue> documentsValues) throws org.bonitasoft.engine.bpm.document.DocumentException
- Specified by:
setDocumentList
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentException
-
deleteContentOfArchivedDocument
public void deleteContentOfArchivedDocument(long archivedDocumentId) throws org.bonitasoft.engine.bpm.document.DocumentException, org.bonitasoft.engine.bpm.document.DocumentNotFoundException
- Specified by:
deleteContentOfArchivedDocument
in interfaceorg.bonitasoft.engine.api.DocumentAPI
- Throws:
org.bonitasoft.engine.bpm.document.DocumentException
org.bonitasoft.engine.bpm.document.DocumentNotFoundException
-
-