public abstract class AbstractVariablesResource extends Object implements VariableResource
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_BINARY_VALUE_TYPE |
protected ProcessEngine |
engine |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected String |
resourceId |
DESERIALIZE_VALUE_QUERY_PARAM, DESERIALIZE_VALUES_QUERY_PARAM
Constructor and Description |
---|
AbstractVariablesResource(ProcessEngine engine,
String resourceId,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
void |
deleteVariable(String variableName) |
protected Object |
deserializeJsonObject(String className,
byte[] data) |
protected ProcessEngineConfiguration |
getProcessEngineConfiguration() |
protected abstract String |
getResourceTypeName() |
protected TypedValue |
getTypedValueForVariable(String variableName,
boolean deserializeValue) |
VariableValueDto |
getVariable(String variableName,
boolean deserializeValue) |
javax.ws.rs.core.Response |
getVariableBinary(String variableName) |
protected abstract VariableMap |
getVariableEntities(boolean deserializeValues) |
protected abstract TypedValue |
getVariableEntity(String variableKey,
boolean deserializeValue) |
Map<String,VariableValueDto> |
getVariables(boolean deserializeValues) |
void |
modifyVariables(PatchVariablesDto patch) |
void |
putVariable(String variableName,
VariableValueDto variable) |
protected abstract void |
removeVariableEntity(String variableKey) |
void |
setBinaryVariable(String variableKey,
MultipartFormData payload) |
protected abstract void |
setVariableEntity(String variableKey,
TypedValue variableValue) |
protected abstract void |
updateVariableEntities(VariableMap variables,
List<String> deletions) |
protected void |
validateType(com.fasterxml.jackson.databind.JavaType type)
Validate the type with the help of the validator in the engine.
Note: when adjusting this method, please also consider adjusting the JacksonJsonDataFormatMapper#validateType in the Engine Spin Plugin |
protected void |
validateType(com.fasterxml.jackson.databind.JavaType type,
DeserializationTypeValidator validator,
List<String> invalidTypes) |
protected void |
validateTypeInternal(com.fasterxml.jackson.databind.JavaType type,
DeserializationTypeValidator validator,
List<String> invalidTypes) |
protected static final String DEFAULT_BINARY_VALUE_TYPE
protected ProcessEngine engine
protected String resourceId
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
public AbstractVariablesResource(ProcessEngine engine, String resourceId, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public Map<String,VariableValueDto> getVariables(boolean deserializeValues)
getVariables
in interface VariableResource
public VariableValueDto getVariable(String variableName, boolean deserializeValue)
getVariable
in interface VariableResource
protected TypedValue getTypedValueForVariable(String variableName, boolean deserializeValue)
public javax.ws.rs.core.Response getVariableBinary(String variableName)
getVariableBinary
in interface VariableResource
public void putVariable(String variableName, VariableValueDto variable)
putVariable
in interface VariableResource
public void setBinaryVariable(String variableKey, MultipartFormData payload)
setBinaryVariable
in interface VariableResource
protected void validateType(com.fasterxml.jackson.databind.JavaType type)
JacksonJsonDataFormatMapper#validateType
in the Engine Spin Pluginprotected void validateType(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, List<String> invalidTypes)
protected void validateTypeInternal(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, List<String> invalidTypes)
protected ProcessEngineConfiguration getProcessEngineConfiguration()
public void deleteVariable(String variableName)
deleteVariable
in interface VariableResource
public void modifyVariables(PatchVariablesDto patch)
modifyVariables
in interface VariableResource
protected abstract VariableMap getVariableEntities(boolean deserializeValues)
protected abstract void updateVariableEntities(VariableMap variables, List<String> deletions)
protected abstract TypedValue getVariableEntity(String variableKey, boolean deserializeValue)
protected abstract void setVariableEntity(String variableKey, TypedValue variableValue)
protected abstract void removeVariableEntity(String variableKey)
protected abstract String getResourceTypeName()
Copyright © 2021. All rights reserved.