Class DocumentHelper
java.lang.Object
org.bonitasoft.engine.core.document.api.impl.DocumentHelper
Helper class that set/get/update document on API level (it uses the process definition)
- Author:
- Baptiste Mesta
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentHelper(DocumentService documentService, ProcessDefinitionService processDefinitionService, ProcessInstanceService processInstanceService) -
Method Summary
Modifier and TypeMethodDescriptioncreateDocumentObject(org.bonitasoft.engine.bpm.document.DocumentValue documentValue, long authorId) voidcreateOrUpdateDocument(org.bonitasoft.engine.bpm.document.DocumentValue newValue, String documentName, long processInstanceId, long authorId, String description) voiddeleteDocument(String documentName, long processInstanceId) getAllDocumentOfTheList(long processInstanceId, String name) booleanisListDefinedInDefinition(String documentName, long processInstanceId) voidsetDocumentList(List<org.bonitasoft.engine.bpm.document.DocumentValue> documentList, String documentName, long processInstanceId, long authorId) org.bonitasoft.engine.bpm.document.DocumentValuetoCheckedDocumentValue(Object newValue) List<org.bonitasoft.engine.bpm.document.DocumentValue>toCheckedList(Object newValue) org.bonitasoft.engine.bpm.document.DocumentValuetoDocumentValue(org.bonitasoft.engine.bpm.contract.FileInputValue fileInput) org.bonitasoft.engine.bpm.document.DocumentValuetoDocumentValue(org.bonitasoft.engine.bpm.document.Document document)
-
Constructor Details
-
DocumentHelper
public DocumentHelper(DocumentService documentService, ProcessDefinitionService processDefinitionService, ProcessInstanceService processInstanceService)
-
-
Method Details
-
getAllDocumentOfTheList
public List<AbstractSMappedDocument> getAllDocumentOfTheList(long processInstanceId, String name) throws SBonitaReadException - Throws:
SBonitaReadException
-
isListDefinedInDefinition
public boolean isListDefinedInDefinition(String documentName, long processInstanceId) throws SObjectNotFoundException, SBonitaReadException -
createDocumentObject
public SDocument createDocumentObject(org.bonitasoft.engine.bpm.document.DocumentValue documentValue, long authorId) -
deleteDocument
public void deleteDocument(String documentName, long processInstanceId) throws SObjectModificationException - Throws:
SObjectModificationException
-
createOrUpdateDocument
public void createOrUpdateDocument(org.bonitasoft.engine.bpm.document.DocumentValue newValue, String documentName, long processInstanceId, long authorId, String description) throws SBonitaReadException, SObjectCreationException, SObjectModificationException - Parameters:
newValue- the new valuedocumentName- the name of the documentprocessInstanceId- the id of the process instanceauthorId- the author iddescription- used only when creating a document- Throws:
SBonitaReadExceptionSObjectCreationExceptionSObjectModificationException
-
setDocumentList
public void setDocumentList(List<org.bonitasoft.engine.bpm.document.DocumentValue> documentList, String documentName, long processInstanceId, long authorId) throws SBonitaReadException, SObjectCreationException, SObjectNotFoundException, SObjectModificationException, SObjectAlreadyExistsException -
toCheckedDocumentValue
public org.bonitasoft.engine.bpm.document.DocumentValue toCheckedDocumentValue(Object newValue) throws SOperationExecutionException - Throws:
SOperationExecutionException
-
toDocumentValue
public org.bonitasoft.engine.bpm.document.DocumentValue toDocumentValue(org.bonitasoft.engine.bpm.contract.FileInputValue fileInput) -
toDocumentValue
public org.bonitasoft.engine.bpm.document.DocumentValue toDocumentValue(org.bonitasoft.engine.bpm.document.Document document) throws SOperationExecutionException - Throws:
SOperationExecutionException
-
toCheckedList
public List<org.bonitasoft.engine.bpm.document.DocumentValue> toCheckedList(Object newValue) throws SOperationExecutionException - Throws:
SOperationExecutionException
-