@RestController public class ApiModelResource extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BpmnJsonConverter |
bpmnJsonConverter |
protected BpmnXMLConverter |
bpmnXMLConverter |
protected ModelRepository |
modelRepository |
protected ModelService |
modelService |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
| Constructor and Description |
|---|
ApiModelResource() |
| Modifier and Type | Method and Description |
|---|---|
protected ModelRepresentation |
createNewModel(String name,
String description,
Integer modelType,
String editorJson) |
void |
deleteModel(String modelId)
DELETE /editor/models/{modelId} -> delete process model or, as a non-owner, remove the share info link for that user specifically
|
ModelRepresentation |
getModel(String modelId)
GET /editor/models/{modelId} -> Get process model
|
com.fasterxml.jackson.databind.node.ObjectNode |
getModelJSON(String modelId)
GET /editor/models/{modelId}/editor/json -> get the JSON model
|
byte[] |
getModelThumbnail(String modelId)
GET /editor/models/{modelId}/thumbnail -> Get process model thumbnail
|
ModelRepresentation |
saveModel(String modelId,
org.springframework.util.MultiValueMap<String,String> values)
POST /editor/models/{modelId}/editor/json -> save the JSON model
|
protected ModelRepresentation |
updateModel(Model model,
org.springframework.util.MultiValueMap<String,String> values,
boolean forceNewVersion) |
ModelRepresentation |
updateModel(String modelId,
ModelRepresentation updatedModel)
PUT /rest/models/{modelId} -> update process model properties
|
@Autowired protected ModelService modelService
@Autowired protected ModelRepository modelRepository
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected BpmnJsonConverter bpmnJsonConverter
protected BpmnXMLConverter bpmnXMLConverter
@GetMapping(value="/editor/models/{modelId}",
produces="application/json")
public ModelRepresentation getModel(@PathVariable
String modelId)
@GetMapping(value="/editor/models/{modelId}/thumbnail",
produces="image/png")
public byte[] getModelThumbnail(@PathVariable
String modelId)
@PutMapping(value="/editor/models/{modelId}")
public ModelRepresentation updateModel(@PathVariable
String modelId,
@RequestBody
ModelRepresentation updatedModel)
@ResponseStatus(value=OK)
@DeleteMapping(value="/editor/models/{modelId}")
public void deleteModel(@PathVariable
String modelId)
@GetMapping(value="/editor/models/{modelId}/editor/json",
produces="application/json")
public com.fasterxml.jackson.databind.node.ObjectNode getModelJSON(@PathVariable
String modelId)
@PostMapping(value="/editor/models/{modelId}/editor/json")
public ModelRepresentation saveModel(@PathVariable
String modelId,
@RequestBody
org.springframework.util.MultiValueMap<String,String> values)
protected ModelRepresentation updateModel(Model model, org.springframework.util.MultiValueMap<String,String> values, boolean forceNewVersion)
protected ModelRepresentation createNewModel(String name, String description, Integer modelType, String editorJson)
Copyright © 2020 Flowable. All rights reserved.