Class AbstractVariablesResource
- java.lang.Object
-
- org.camunda.bpm.engine.rest.sub.impl.AbstractVariablesResource
-
- All Implemented Interfaces:
VariableResource
- Direct Known Subclasses:
CaseExecutionVariablesResource,ExecutionVariablesResource,LocalCaseExecutionVariablesResource,LocalExecutionVariablesResource,LocalTaskVariablesResource,TaskVariablesResource
public abstract class AbstractVariablesResource extends Object implements VariableResource
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringDEFAULT_BINARY_VALUE_TYPEprotected ProcessEngineengineprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapperprotected StringresourceId-
Fields inherited from interface org.camunda.bpm.engine.rest.sub.VariableResource
DESERIALIZE_VALUE_QUERY_PARAM, DESERIALIZE_VALUES_QUERY_PARAM
-
-
Constructor Summary
Constructors Constructor Description AbstractVariablesResource(ProcessEngine engine, String resourceId, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddeleteVariable(String variableName)protected ObjectdeserializeJsonObject(String className, byte[] data)protected ProcessEngineConfigurationgetProcessEngineConfiguration()protected abstract StringgetResourceTypeName()protected TypedValuegetTypedValueForVariable(String variableName, boolean deserializeValue)VariableValueDtogetVariable(String variableName, boolean deserializeValue)javax.ws.rs.core.ResponsegetVariableBinary(String variableName)protected abstract VariableMapgetVariableEntities(boolean deserializeValues)protected abstract TypedValuegetVariableEntity(String variableKey, boolean deserializeValue)Map<String,VariableValueDto>getVariables(boolean deserializeValues)voidmodifyVariables(PatchVariablesDto patch)voidputVariable(String variableName, VariableValueDto variable)protected abstract voidremoveVariableEntity(String variableKey)voidsetBinaryVariable(String variableKey, MultipartFormData payload)protected abstract voidsetVariableEntity(String variableKey, TypedValue variableValue)protected abstract voidupdateVariableEntities(VariableMap variables, List<String> deletions)protected voidvalidateType(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 theJacksonJsonDataFormatMapper#validateTypein the Engine Spin Pluginprotected voidvalidateType(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, List<String> invalidTypes)protected voidvalidateTypeInternal(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, List<String> invalidTypes)
-
-
-
Field Detail
-
DEFAULT_BINARY_VALUE_TYPE
protected static final String DEFAULT_BINARY_VALUE_TYPE
- See Also:
- Constant Field Values
-
engine
protected ProcessEngine engine
-
resourceId
protected String resourceId
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Detail
-
AbstractVariablesResource
public AbstractVariablesResource(ProcessEngine engine, String resourceId, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
getVariables
public Map<String,VariableValueDto> getVariables(boolean deserializeValues)
- Specified by:
getVariablesin interfaceVariableResource
-
getVariable
public VariableValueDto getVariable(String variableName, boolean deserializeValue)
- Specified by:
getVariablein interfaceVariableResource
-
getTypedValueForVariable
protected TypedValue getTypedValueForVariable(String variableName, boolean deserializeValue)
-
getVariableBinary
public javax.ws.rs.core.Response getVariableBinary(String variableName)
- Specified by:
getVariableBinaryin interfaceVariableResource
-
putVariable
public void putVariable(String variableName, VariableValueDto variable)
- Specified by:
putVariablein interfaceVariableResource
-
setBinaryVariable
public void setBinaryVariable(String variableKey, MultipartFormData payload)
- Specified by:
setBinaryVariablein interfaceVariableResource
-
validateType
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 theJacksonJsonDataFormatMapper#validateTypein the Engine Spin Plugin
-
validateType
protected void validateType(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, List<String> invalidTypes)
-
validateTypeInternal
protected void validateTypeInternal(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, List<String> invalidTypes)
-
getProcessEngineConfiguration
protected ProcessEngineConfiguration getProcessEngineConfiguration()
-
deleteVariable
public void deleteVariable(String variableName)
- Specified by:
deleteVariablein interfaceVariableResource
-
modifyVariables
public void modifyVariables(PatchVariablesDto patch)
- Specified by:
modifyVariablesin interfaceVariableResource
-
getVariableEntities
protected abstract VariableMap getVariableEntities(boolean deserializeValues)
-
updateVariableEntities
protected abstract void updateVariableEntities(VariableMap variables, List<String> deletions)
-
getVariableEntity
protected abstract TypedValue getVariableEntity(String variableKey, boolean deserializeValue)
-
setVariableEntity
protected abstract void setVariableEntity(String variableKey, TypedValue variableValue)
-
removeVariableEntity
protected abstract void removeVariableEntity(String variableKey)
-
getResourceTypeName
protected abstract String getResourceTypeName()
-
-