Class AbstractVariableScope
- java.lang.Object
-
- org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
-
- All Implemented Interfaces:
java.io.Serializable
,VariableScope
,VariableEventDispatcher
- Direct Known Subclasses:
ConnectorVariableScope
,CoreExecution
,TaskEntity
public abstract class AbstractVariableScope extends java.lang.Object implements java.io.Serializable, VariableScope, VariableEventDispatcher
- Author:
- Daniel Meyer, Roman Smirnov, Sebastian Menski
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ELContext
cachedElContext
-
Constructor Summary
Constructors Constructor Description AbstractVariableScope()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.util.Set<java.lang.String>
collectVariableNames(java.util.Set<java.lang.String> variableNames)
void
collectVariables(VariableMapImpl resultVariables, java.util.Collection<java.lang.String> variableNames, boolean isLocal, boolean deserializeValues)
void
dispatchEvent(VariableEvent variableEvent)
ELContext
getCachedElContext()
abstract AbstractVariableScope
getParentVariableScope()
protected AbstractVariableScope
getSourceActivityVariableScope()
protected java.lang.Object
getValueFromVariableInstance(boolean deserializeObjectValue, CoreVariableInstance variableInstance)
java.lang.Object
getVariable(java.lang.String variableName)
java.lang.Object
getVariable(java.lang.String variableName, boolean deserializeObjectValue)
CoreVariableInstance
getVariableInstance(java.lang.String variableName)
protected abstract VariableInstanceFactory<CoreVariableInstance>
getVariableInstanceFactory()
protected abstract java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>>
getVariableInstanceLifecycleListeners()
CoreVariableInstance
getVariableInstanceLocal(java.lang.String name)
java.util.List<CoreVariableInstance>
getVariableInstancesLocal()
java.util.List<CoreVariableInstance>
getVariableInstancesLocal(java.util.Collection<java.lang.String> variableNames)
java.lang.Object
getVariableLocal(java.lang.String variableName)
java.lang.Object
getVariableLocal(java.lang.String variableName, boolean deserializeObjectValue)
<T extends TypedValue>
TgetVariableLocalTyped(java.lang.String variableName)
<T extends TypedValue>
TgetVariableLocalTyped(java.lang.String variableName, boolean deserializeValue)
java.util.Set<java.lang.String>
getVariableNames()
java.util.Set<java.lang.String>
getVariableNamesLocal()
VariableMapImpl
getVariables()
java.lang.String
getVariableScopeKey()
VariableMapImpl
getVariablesLocal()
VariableMapImpl
getVariablesLocalTyped()
VariableMapImpl
getVariablesLocalTyped(boolean deserializeObjectValues)
protected abstract VariableStore<CoreVariableInstance>
getVariableStore()
VariableMapImpl
getVariablesTyped()
VariableMapImpl
getVariablesTyped(boolean deserializeValues)
<T extends TypedValue>
TgetVariableTyped(java.lang.String variableName)
<T extends TypedValue>
TgetVariableTyped(java.lang.String variableName, boolean deserializeValue)
boolean
hasVariable(java.lang.String variableName)
boolean
hasVariableLocal(java.lang.String variableName)
boolean
hasVariables()
boolean
hasVariablesLocal()
void
initializeVariableStore(java.util.Map<java.lang.String,java.lang.Object> variables)
protected void
invokeVariableLifecycleListenersCreate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope)
protected void
invokeVariableLifecycleListenersCreate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope, java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>> lifecycleListeners)
protected void
invokeVariableLifecycleListenersDelete(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope)
protected void
invokeVariableLifecycleListenersDelete(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope, java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>> lifecycleListeners)
protected void
invokeVariableLifecycleListenersUpdate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope)
protected void
invokeVariableLifecycleListenersUpdate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope, java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>> lifecycleListeners)
void
removeVariable(java.lang.String variableName)
Removes the variable and creates a newHistoricVariableUpdateEntity
.protected void
removeVariable(java.lang.String variableName, AbstractVariableScope sourceActivityExecution)
void
removeVariableLocal(java.lang.String variableName)
Removes the local variable and creates a newHistoricVariableUpdateEntity
.protected void
removeVariableLocal(java.lang.String variableName, AbstractVariableScope sourceActivityExecution)
void
removeVariables()
Removes the (local) variables and creates a newHistoricVariableUpdateEntity
for each of them.void
removeVariables(java.util.Collection<java.lang.String> variableNames)
Removes the variables and creates a newHistoricVariableUpdateEntity
for each of them.void
removeVariablesLocal()
Removes the (local) variables and creates a newHistoricVariableUpdateEntity
for each of them.void
removeVariablesLocal(java.util.Collection<java.lang.String> variableNames)
Removes the local variables and creates a newHistoricVariableUpdateEntity
for each of them.void
setCachedElContext(ELContext cachedElContext)
void
setVariable(java.lang.String variableName, java.lang.Object value)
void
setVariable(java.lang.String variableName, java.lang.Object value, boolean skipJavaSerializationFormatCheck)
protected void
setVariable(java.lang.String variableName, TypedValue value, AbstractVariableScope sourceActivityVariableScope)
protected void
setVariable(java.lang.String variableName, TypedValue value, AbstractVariableScope sourceActivityVariableScope, boolean skipJavaSerializationFormatCheck)
void
setVariableLocal(java.lang.String variableName, java.lang.Object value)
void
setVariableLocal(java.lang.String variableName, java.lang.Object value, boolean skipJavaSerializationFormatCheck)
void
setVariableLocal(java.lang.String variableName, TypedValue value, AbstractVariableScope sourceActivityExecution, boolean skipJavaSerializationFormatCheck)
void
setVariables(java.util.Map<java.lang.String,?> variables)
void
setVariables(java.util.Map<java.lang.String,?> variables, boolean skipJavaSerializationFormatCheck)
void
setVariablesLocal(java.util.Map<java.lang.String,?> variables)
void
setVariablesLocal(java.util.Map<java.lang.String,?> variables, boolean skipJavaSerializationFormatCheck)
-
-
-
Field Detail
-
cachedElContext
protected ELContext cachedElContext
-
-
Method Detail
-
getVariableStore
protected abstract VariableStore<CoreVariableInstance> getVariableStore()
-
getVariableInstanceFactory
protected abstract VariableInstanceFactory<CoreVariableInstance> getVariableInstanceFactory()
-
getVariableInstanceLifecycleListeners
protected abstract java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>> getVariableInstanceLifecycleListeners()
-
getParentVariableScope
public abstract AbstractVariableScope getParentVariableScope()
-
initializeVariableStore
public void initializeVariableStore(java.util.Map<java.lang.String,java.lang.Object> variables)
-
getVariableScopeKey
public java.lang.String getVariableScopeKey()
- Specified by:
getVariableScopeKey
in interfaceVariableScope
-
getVariables
public VariableMapImpl getVariables()
- Specified by:
getVariables
in interfaceVariableScope
-
getVariablesTyped
public VariableMapImpl getVariablesTyped()
- Specified by:
getVariablesTyped
in interfaceVariableScope
-
getVariablesTyped
public VariableMapImpl getVariablesTyped(boolean deserializeValues)
- Specified by:
getVariablesTyped
in interfaceVariableScope
-
getVariablesLocal
public VariableMapImpl getVariablesLocal()
- Specified by:
getVariablesLocal
in interfaceVariableScope
-
getVariablesLocalTyped
public VariableMapImpl getVariablesLocalTyped()
- Specified by:
getVariablesLocalTyped
in interfaceVariableScope
-
getVariablesLocalTyped
public VariableMapImpl getVariablesLocalTyped(boolean deserializeObjectValues)
- Specified by:
getVariablesLocalTyped
in interfaceVariableScope
-
collectVariables
public void collectVariables(VariableMapImpl resultVariables, java.util.Collection<java.lang.String> variableNames, boolean isLocal, boolean deserializeValues)
-
getVariable
public java.lang.Object getVariable(java.lang.String variableName)
- Specified by:
getVariable
in interfaceVariableScope
-
getVariable
public java.lang.Object getVariable(java.lang.String variableName, boolean deserializeObjectValue)
-
getVariableLocal
public java.lang.Object getVariableLocal(java.lang.String variableName)
- Specified by:
getVariableLocal
in interfaceVariableScope
-
getVariableLocal
public java.lang.Object getVariableLocal(java.lang.String variableName, boolean deserializeObjectValue)
-
getValueFromVariableInstance
protected java.lang.Object getValueFromVariableInstance(boolean deserializeObjectValue, CoreVariableInstance variableInstance)
-
getVariableTyped
public <T extends TypedValue> T getVariableTyped(java.lang.String variableName)
- Specified by:
getVariableTyped
in interfaceVariableScope
-
getVariableTyped
public <T extends TypedValue> T getVariableTyped(java.lang.String variableName, boolean deserializeValue)
- Specified by:
getVariableTyped
in interfaceVariableScope
-
getVariableLocalTyped
public <T extends TypedValue> T getVariableLocalTyped(java.lang.String variableName)
- Specified by:
getVariableLocalTyped
in interfaceVariableScope
-
getVariableLocalTyped
public <T extends TypedValue> T getVariableLocalTyped(java.lang.String variableName, boolean deserializeValue)
- Specified by:
getVariableLocalTyped
in interfaceVariableScope
-
getVariableInstance
public CoreVariableInstance getVariableInstance(java.lang.String variableName)
-
getVariableInstanceLocal
public CoreVariableInstance getVariableInstanceLocal(java.lang.String name)
-
getVariableInstancesLocal
public java.util.List<CoreVariableInstance> getVariableInstancesLocal()
-
getVariableInstancesLocal
public java.util.List<CoreVariableInstance> getVariableInstancesLocal(java.util.Collection<java.lang.String> variableNames)
-
hasVariables
public boolean hasVariables()
- Specified by:
hasVariables
in interfaceVariableScope
-
hasVariablesLocal
public boolean hasVariablesLocal()
- Specified by:
hasVariablesLocal
in interfaceVariableScope
-
hasVariable
public boolean hasVariable(java.lang.String variableName)
- Specified by:
hasVariable
in interfaceVariableScope
-
hasVariableLocal
public boolean hasVariableLocal(java.lang.String variableName)
- Specified by:
hasVariableLocal
in interfaceVariableScope
-
collectVariableNames
protected java.util.Set<java.lang.String> collectVariableNames(java.util.Set<java.lang.String> variableNames)
-
getVariableNames
public java.util.Set<java.lang.String> getVariableNames()
- Specified by:
getVariableNames
in interfaceVariableScope
-
getVariableNamesLocal
public java.util.Set<java.lang.String> getVariableNamesLocal()
- Specified by:
getVariableNamesLocal
in interfaceVariableScope
-
setVariables
public void setVariables(java.util.Map<java.lang.String,?> variables, boolean skipJavaSerializationFormatCheck)
-
setVariables
public void setVariables(java.util.Map<java.lang.String,?> variables)
- Specified by:
setVariables
in interfaceVariableScope
-
setVariablesLocal
public void setVariablesLocal(java.util.Map<java.lang.String,?> variables, boolean skipJavaSerializationFormatCheck)
-
setVariablesLocal
public void setVariablesLocal(java.util.Map<java.lang.String,?> variables)
- Specified by:
setVariablesLocal
in interfaceVariableScope
-
removeVariables
public void removeVariables()
Description copied from interface:VariableScope
Removes the (local) variables and creates a newHistoricVariableUpdateEntity
for each of them.- Specified by:
removeVariables
in interfaceVariableScope
-
removeVariablesLocal
public void removeVariablesLocal()
Description copied from interface:VariableScope
Removes the (local) variables and creates a newHistoricVariableUpdateEntity
for each of them.- Specified by:
removeVariablesLocal
in interfaceVariableScope
-
removeVariables
public void removeVariables(java.util.Collection<java.lang.String> variableNames)
Description copied from interface:VariableScope
Removes the variables and creates a newHistoricVariableUpdateEntity
for each of them.- Specified by:
removeVariables
in interfaceVariableScope
-
removeVariablesLocal
public void removeVariablesLocal(java.util.Collection<java.lang.String> variableNames)
Description copied from interface:VariableScope
Removes the local variables and creates a newHistoricVariableUpdateEntity
for each of them.- Specified by:
removeVariablesLocal
in interfaceVariableScope
-
setVariable
public void setVariable(java.lang.String variableName, java.lang.Object value, boolean skipJavaSerializationFormatCheck)
-
setVariable
public void setVariable(java.lang.String variableName, java.lang.Object value)
- Specified by:
setVariable
in interfaceVariableScope
-
setVariable
protected void setVariable(java.lang.String variableName, TypedValue value, AbstractVariableScope sourceActivityVariableScope, boolean skipJavaSerializationFormatCheck)
-
setVariable
protected void setVariable(java.lang.String variableName, TypedValue value, AbstractVariableScope sourceActivityVariableScope)
-
setVariableLocal
public void setVariableLocal(java.lang.String variableName, TypedValue value, AbstractVariableScope sourceActivityExecution, boolean skipJavaSerializationFormatCheck)
-
invokeVariableLifecycleListenersCreate
protected void invokeVariableLifecycleListenersCreate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope)
-
invokeVariableLifecycleListenersCreate
protected void invokeVariableLifecycleListenersCreate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope, java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>> lifecycleListeners)
-
invokeVariableLifecycleListenersDelete
protected void invokeVariableLifecycleListenersDelete(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope)
-
invokeVariableLifecycleListenersDelete
protected void invokeVariableLifecycleListenersDelete(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope, java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>> lifecycleListeners)
-
invokeVariableLifecycleListenersUpdate
protected void invokeVariableLifecycleListenersUpdate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope)
-
invokeVariableLifecycleListenersUpdate
protected void invokeVariableLifecycleListenersUpdate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope, java.util.List<VariableInstanceLifecycleListener<CoreVariableInstance>> lifecycleListeners)
-
setVariableLocal
public void setVariableLocal(java.lang.String variableName, java.lang.Object value, boolean skipJavaSerializationFormatCheck)
-
setVariableLocal
public void setVariableLocal(java.lang.String variableName, java.lang.Object value)
- Specified by:
setVariableLocal
in interfaceVariableScope
-
removeVariable
public void removeVariable(java.lang.String variableName)
Description copied from interface:VariableScope
Removes the variable and creates a newHistoricVariableUpdateEntity
.- Specified by:
removeVariable
in interfaceVariableScope
-
removeVariable
protected void removeVariable(java.lang.String variableName, AbstractVariableScope sourceActivityExecution)
-
removeVariableLocal
public void removeVariableLocal(java.lang.String variableName)
Description copied from interface:VariableScope
Removes the local variable and creates a newHistoricVariableUpdateEntity
.- Specified by:
removeVariableLocal
in interfaceVariableScope
-
getSourceActivityVariableScope
protected AbstractVariableScope getSourceActivityVariableScope()
-
removeVariableLocal
protected void removeVariableLocal(java.lang.String variableName, AbstractVariableScope sourceActivityExecution)
-
getCachedElContext
public ELContext getCachedElContext()
-
setCachedElContext
public void setCachedElContext(ELContext cachedElContext)
-
dispatchEvent
public void dispatchEvent(VariableEvent variableEvent)
- Specified by:
dispatchEvent
in interfaceVariableEventDispatcher
-
-