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 java.lang.Object implements VariableResource
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
DEFAULT_BINARY_VALUE_TYPE
protected ProcessEngine
engine
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected java.lang.String
resourceId
-
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, java.lang.String resourceId, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
deleteVariable(java.lang.String variableName)
protected java.lang.Object
deserializeJsonObject(java.lang.String className, byte[] data)
protected ProcessEngineConfiguration
getProcessEngineConfiguration()
protected abstract java.lang.String
getResourceTypeName()
protected TypedValue
getTypedValueForVariable(java.lang.String variableName, boolean deserializeValue)
VariableValueDto
getVariable(java.lang.String variableName, boolean deserializeValue)
javax.ws.rs.core.Response
getVariableBinary(java.lang.String variableName)
protected abstract VariableMap
getVariableEntities(boolean deserializeValues)
protected abstract TypedValue
getVariableEntity(java.lang.String variableKey, boolean deserializeValue)
java.util.Map<java.lang.String,VariableValueDto>
getVariables(boolean deserializeValues)
void
modifyVariables(PatchVariablesDto patch)
void
putVariable(java.lang.String variableName, VariableValueDto variable)
protected abstract void
removeVariableEntity(java.lang.String variableKey)
void
setBinaryVariable(java.lang.String variableKey, MultipartFormData payload)
protected abstract void
setVariableEntity(java.lang.String variableKey, TypedValue variableValue)
protected abstract void
updateVariableEntities(VariableMap variables, java.util.List<java.lang.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 theJacksonJsonDataFormatMapper#validateType
in the Engine Spin Pluginprotected void
validateType(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, java.util.List<java.lang.String> invalidTypes)
protected void
validateTypeInternal(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, java.util.List<java.lang.String> invalidTypes)
-
-
-
Field Detail
-
DEFAULT_BINARY_VALUE_TYPE
protected static final java.lang.String DEFAULT_BINARY_VALUE_TYPE
- See Also:
- Constant Field Values
-
engine
protected ProcessEngine engine
-
resourceId
protected java.lang.String resourceId
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Detail
-
AbstractVariablesResource
public AbstractVariablesResource(ProcessEngine engine, java.lang.String resourceId, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
getVariables
public java.util.Map<java.lang.String,VariableValueDto> getVariables(boolean deserializeValues)
- Specified by:
getVariables
in interfaceVariableResource
-
getVariable
public VariableValueDto getVariable(java.lang.String variableName, boolean deserializeValue)
- Specified by:
getVariable
in interfaceVariableResource
-
getTypedValueForVariable
protected TypedValue getTypedValueForVariable(java.lang.String variableName, boolean deserializeValue)
-
getVariableBinary
public javax.ws.rs.core.Response getVariableBinary(java.lang.String variableName)
- Specified by:
getVariableBinary
in interfaceVariableResource
-
putVariable
public void putVariable(java.lang.String variableName, VariableValueDto variable)
- Specified by:
putVariable
in interfaceVariableResource
-
setBinaryVariable
public void setBinaryVariable(java.lang.String variableKey, MultipartFormData payload)
- Specified by:
setBinaryVariable
in interfaceVariableResource
-
deserializeJsonObject
protected java.lang.Object deserializeJsonObject(java.lang.String className, byte[] data)
-
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#validateType
in the Engine Spin Plugin
-
validateType
protected void validateType(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, java.util.List<java.lang.String> invalidTypes)
-
validateTypeInternal
protected void validateTypeInternal(com.fasterxml.jackson.databind.JavaType type, DeserializationTypeValidator validator, java.util.List<java.lang.String> invalidTypes)
-
getProcessEngineConfiguration
protected ProcessEngineConfiguration getProcessEngineConfiguration()
-
deleteVariable
public void deleteVariable(java.lang.String variableName)
- Specified by:
deleteVariable
in interfaceVariableResource
-
modifyVariables
public void modifyVariables(PatchVariablesDto patch)
- Specified by:
modifyVariables
in interfaceVariableResource
-
getVariableEntities
protected abstract VariableMap getVariableEntities(boolean deserializeValues)
-
updateVariableEntities
protected abstract void updateVariableEntities(VariableMap variables, java.util.List<java.lang.String> deletions)
-
getVariableEntity
protected abstract TypedValue getVariableEntity(java.lang.String variableKey, boolean deserializeValue)
-
setVariableEntity
protected abstract void setVariableEntity(java.lang.String variableKey, TypedValue variableValue)
-
removeVariableEntity
protected abstract void removeVariableEntity(java.lang.String variableKey)
-
getResourceTypeName
protected abstract java.lang.String getResourceTypeName()
-
-