Class DocumentAPIImpl

java.lang.Object
org.bonitasoft.engine.api.impl.DocumentAPIImpl
All Implemented Interfaces:
org.bonitasoft.engine.api.DocumentAPI

public class DocumentAPIImpl extends Object implements org.bonitasoft.engine.api.DocumentAPI
Author:
Baptiste Mesta
  • Constructor Details

    • DocumentAPIImpl

      public DocumentAPIImpl()
  • Method Details

    • attachDocument

      public org.bonitasoft.engine.bpm.document.Document attachDocument(long processInstanceId, String documentName, String fileName, String mimeType, String url) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
      Specified by:
      attachDocument in interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentAttachmentException
    • addDocument

      public org.bonitasoft.engine.bpm.document.Document addDocument(long processInstanceId, String documentName, 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 interface org.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 interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentAttachmentException
    • attachDocument

      public org.bonitasoft.engine.bpm.document.Document attachDocument(long processInstanceId, String documentName, String fileName, String mimeType, byte[] documentContent) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
      Specified by:
      attachDocument in interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentAttachmentException
    • attachNewDocumentVersion

      public org.bonitasoft.engine.bpm.document.Document attachNewDocumentVersion(long processInstanceId, String documentName, String fileName, String mimeType, String url) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
      Specified by:
      attachNewDocumentVersion in interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentAttachmentException
    • attachNewDocumentVersion

      public org.bonitasoft.engine.bpm.document.Document attachNewDocumentVersion(long processInstanceId, String documentName, String contentFileName, String contentMimeType, byte[] documentContent) throws org.bonitasoft.engine.bpm.document.DocumentAttachmentException
      Specified by:
      attachNewDocumentVersion in interface org.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 interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentNotFoundException
    • getLastVersionOfDocuments

      public 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 interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentException
    • getDocumentContent

      public byte[] getDocumentContent(String documentStorageId) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
      Specified by:
      getDocumentContent in interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentNotFoundException
    • getLastDocument

      public org.bonitasoft.engine.bpm.document.Document getLastDocument(long processInstanceId, String documentName) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
      Specified by:
      getLastDocument in interface org.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 interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentException
    • getDocumentAtProcessInstantiation

      public org.bonitasoft.engine.bpm.document.Document getDocumentAtProcessInstantiation(long processInstanceId, String documentName) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
      Specified by:
      getDocumentAtProcessInstantiation in interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentNotFoundException
    • getDocumentAtActivityInstanceCompletion

      public org.bonitasoft.engine.bpm.document.Document getDocumentAtActivityInstanceCompletion(long activityInstanceId, String documentName) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
      Specified by:
      getDocumentAtActivityInstanceCompletion in interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentNotFoundException
      org.bonitasoft.engine.exception.DeletionException
    • getDocumentList

      public List<org.bonitasoft.engine.bpm.document.Document> getDocumentList(long processInstanceId, String name, int fromIndex, int numberOfResult) throws org.bonitasoft.engine.bpm.document.DocumentNotFoundException
      Specified by:
      getDocumentList in interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentNotFoundException
    • setDocumentList

      public void setDocumentList(long processInstanceId, String name, List<org.bonitasoft.engine.bpm.document.DocumentValue> documentsValues) throws org.bonitasoft.engine.bpm.document.DocumentException
      Specified by:
      setDocumentList in interface org.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 interface org.bonitasoft.engine.api.DocumentAPI
      Throws:
      org.bonitasoft.engine.bpm.document.DocumentException
      org.bonitasoft.engine.bpm.document.DocumentNotFoundException