Package ru.cg.webbpm.electronic_sign
Class SignButtonRpcService
java.lang.Object
ru.cg.webbpm.electronic_sign.SignButtonRpcService
- Author:
- Tim Urmancheev
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDocuments
(Long[] documentIds) getDocumentsInBase64
(Long[] documentIds) getIdsForNonSignedDoc
(Long[] documentIds) Using array of documents IDs, method returns ids for only non-signed documents.void
init()
saveSignBatch
(Long[] documentIdsRaw, SignedDocument[] signedDocuments, Boolean allowResign) Validates and saves signed documents.saveSignBatchAndCompleteTask
(Long[] documentIdsRaw, SignedDocument[] signedDocuments, String navigateTo, BpmnVariableForSave[] bpmnVariables, Boolean allowResign) Validates, saves signed documents completes current task.
-
Field Details
-
documentProvider
-
documentDao
-
maxDocumentsToSign
-
postSignHandler
-
failOnValidate
public boolean failOnValidate -
validators
-
-
Constructor Details
-
SignButtonRpcService
public SignButtonRpcService()
-
-
Method Details
-
init
@PostConstruct public void init() -
getIdsForNonSignedDoc
Using array of documents IDs, method returns ids for only non-signed documents.- Parameters:
documentIds
- - selected documents IDs- Returns:
- - ids list for only non-signed documents
-
getDocuments
-
getDocumentsInBase64
-
saveSignBatchAndCompleteTask
@RpcCall @Transactional public ValidationResponse saveSignBatchAndCompleteTask(Long[] documentIdsRaw, SignedDocument[] signedDocuments, String navigateTo, BpmnVariableForSave[] bpmnVariables, Boolean allowResign) Validates, saves signed documents completes current task. If this.validateDocument is TRUE the method do documents validation applying all this.validators. Method saves valid documents, completes current task and returns validation error messages list.- Parameters:
documentIdsRaw
- - signed documents IDs array to be savedsignedDocuments
- - signed documents array to be savednavigateTo
- - navigation variable valuebpmnVariables
- - bpmnVariablesallowResign
- - flag, allow resign document if true- Returns:
- - null if documents were saves successfully, error messages list - if the are invalid documents and flag this.validateDocument is TRUE
-
saveSignBatch
@RpcCall @Transactional public ValidationResponse saveSignBatch(Long[] documentIdsRaw, SignedDocument[] signedDocuments, Boolean allowResign) Validates and saves signed documents. If this.validateDocument is TRUE the method do documents validation applying all this.validators. Method saves valid documents, and returns validation response.- Parameters:
documentIdsRaw
- - signed documents IDs array to be savedsignedDocuments
- - signed documents array to be savedallowResign
- - flag, allow resign document if true- Returns:
- - error messages list, if flag this.validateDocument is TRUE and there are invalid documents, otherwise the method returns null
-