Package io.jmix.stormbpmn.client.impl
Class StormbpmnClientImpl
java.lang.Object
io.jmix.stormbpmn.client.impl.StormbpmnClientImpl
- All Implemented Interfaces:
StormbpmnClient,org.springframework.beans.factory.InitializingBean
public class StormbpmnClientImpl
extends Object
implements StormbpmnClient, org.springframework.beans.factory.InitializingBean
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HttpClientprotected StormbpmnKeyManagerprotected StormbpmnPropertiesprotected StormbpmnSerializerFields inherited from interface io.jmix.stormbpmn.client.StormbpmnClient
DIAGRAMS_PAGE_SIZE, DIAGRAMS_UPLOAD_BATCH_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected HttpClientprotected StormbpmnSerializerorg.springframework.http.ResponseEntity<String>getDiagramById(UUID id) Loads diagram by id.org.springframework.http.ResponseEntity<String>getDiagrams(int page) Loads diagrams list for the specified page.protected StringgetKey()protected HttpClient.Versionprotected org.springframework.http.ResponseEntity<String>sendRequest(HttpRequest request) org.springframework.http.ResponseEntity<String>uploadDiagrams(Collection<StormbpmnUploadDiagramDto> diagramDtos) Uploads diagrams to Storm BPMN.
-
Field Details
-
stormbpmnKeyManager
-
stormbpmnProperties
-
httpClient
-
stormbpmnSerializer
-
-
Constructor Details
-
StormbpmnClientImpl
public StormbpmnClientImpl()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getDiagramById
public org.springframework.http.ResponseEntity<String> getDiagramById(UUID id) throws IOException, InterruptedException Description copied from interface:StormbpmnClientLoads diagram by id.- Specified by:
getDiagramByIdin interfaceStormbpmnClient- Parameters:
id- diagram id- Returns:
- response entity with JSON body
- Throws:
IOException- if an I/ O error occurs when sending or receivingInterruptedException- if the operation is interrupted
-
getDiagrams
public org.springframework.http.ResponseEntity<String> getDiagrams(int page) throws IOException, InterruptedException Description copied from interface:StormbpmnClientLoads diagrams list for the specified page.- Specified by:
getDiagramsin interfaceStormbpmnClient- Parameters:
page- page number starts from 0- Returns:
- response entity with JSON body
- Throws:
IOException- if an I/ O error occurs when sending or receivingInterruptedException- if the operation is interrupted
-
uploadDiagrams
public org.springframework.http.ResponseEntity<String> uploadDiagrams(Collection<StormbpmnUploadDiagramDto> diagramDtos) throws IOException, InterruptedException Description copied from interface:StormbpmnClientUploads diagrams to Storm BPMN.Note, maximum available diagrams size for single request is
StormbpmnClient.DIAGRAMS_UPLOAD_BATCH_SIZE.- Specified by:
uploadDiagramsin interfaceStormbpmnClient- Parameters:
diagramDtos- diagram DTOs to upload- Returns:
- response entity with JSON body
- Throws:
IOException- if an I/ O error occurs when sending or receivingInterruptedException- if the operation is interrupted
-
sendRequest
protected org.springframework.http.ResponseEntity<String> sendRequest(HttpRequest request) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
getKey
-
createStormbpmnSerializer
-
buildHttpClient
-
resolveHttpVersion
-