Class DocumentHelper
- java.lang.Object
-
- org.bonitasoft.engine.core.document.api.impl.DocumentHelper
-
public class DocumentHelper extends java.lang.Object
Helper class that set/get/update document on API level (it uses the process definition)- Author:
- Baptiste Mesta
-
-
Constructor Summary
Constructors Constructor Description DocumentHelper(DocumentService documentService, ProcessDefinitionService processDefinitionService, ProcessInstanceService processInstanceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SDocument
createDocumentObject(org.bonitasoft.engine.bpm.document.DocumentValue documentValue, long authorId)
void
createOrUpdateDocument(org.bonitasoft.engine.bpm.document.DocumentValue newValue, java.lang.String documentName, long processInstanceId, long authorId, java.lang.String description)
void
deleteDocument(java.lang.String documentName, long processInstanceId)
java.util.List<AbstractSMappedDocument>
getAllDocumentOfTheList(long processInstanceId, java.lang.String name)
boolean
isListDefinedInDefinition(java.lang.String documentName, long processInstanceId)
void
setDocumentList(java.util.List<org.bonitasoft.engine.bpm.document.DocumentValue> documentList, java.lang.String documentName, long processInstanceId, long authorId)
org.bonitasoft.engine.bpm.document.DocumentValue
toCheckedDocumentValue(java.lang.Object newValue)
java.util.List<org.bonitasoft.engine.bpm.document.DocumentValue>
toCheckedList(java.lang.Object newValue)
org.bonitasoft.engine.bpm.document.DocumentValue
toDocumentValue(org.bonitasoft.engine.bpm.contract.FileInputValue fileInput)
org.bonitasoft.engine.bpm.document.DocumentValue
toDocumentValue(org.bonitasoft.engine.bpm.document.Document document)
-
-
-
Constructor Detail
-
DocumentHelper
public DocumentHelper(DocumentService documentService, ProcessDefinitionService processDefinitionService, ProcessInstanceService processInstanceService)
-
-
Method Detail
-
getAllDocumentOfTheList
public java.util.List<AbstractSMappedDocument> getAllDocumentOfTheList(long processInstanceId, java.lang.String name) throws SBonitaReadException
- Throws:
SBonitaReadException
-
isListDefinedInDefinition
public boolean isListDefinedInDefinition(java.lang.String documentName, long processInstanceId) throws SObjectNotFoundException, SBonitaReadException
-
createDocumentObject
public SDocument createDocumentObject(org.bonitasoft.engine.bpm.document.DocumentValue documentValue, long authorId)
-
deleteDocument
public void deleteDocument(java.lang.String documentName, long processInstanceId) throws SObjectModificationException
- Throws:
SObjectModificationException
-
createOrUpdateDocument
public void createOrUpdateDocument(org.bonitasoft.engine.bpm.document.DocumentValue newValue, java.lang.String documentName, long processInstanceId, long authorId, java.lang.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:
SBonitaReadException
SObjectCreationException
SObjectModificationException
-
setDocumentList
public void setDocumentList(java.util.List<org.bonitasoft.engine.bpm.document.DocumentValue> documentList, java.lang.String documentName, long processInstanceId, long authorId) throws SBonitaReadException, SObjectCreationException, SObjectNotFoundException, SObjectModificationException, SObjectAlreadyExistsException
-
toCheckedDocumentValue
public org.bonitasoft.engine.bpm.document.DocumentValue toCheckedDocumentValue(java.lang.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 java.util.List<org.bonitasoft.engine.bpm.document.DocumentValue> toCheckedList(java.lang.Object newValue) throws SOperationExecutionException
- Throws:
SOperationExecutionException
-
-