public abstract class VariableScopeImpl extends Object implements Serializable, VariableScope
| Modifier and Type | Field and Description |
|---|---|
protected ELContext |
cachedElContext |
protected String |
id |
protected List<VariableInstanceEntity> |
variableInstanceList |
protected Map<String,VariableInstanceEntity> |
variableInstances |
| Constructor and Description |
|---|
VariableScopeImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected Set<String> |
collectVariableNames(Set<String> variableNames) |
protected Map<String,Object> |
collectVariables(HashMap<String,Object> variables) |
protected VariableInstanceEntity |
createVariableInstance(String variableName,
Object value,
ExecutionEntity sourceActivityExecution) |
void |
createVariableLocal(String variableName,
Object value) |
protected void |
createVariableLocal(String variableName,
Object value,
ExecutionEntity sourceActivityExecution)
only called when a new variable is created on this variable scope.
|
void |
createVariablesLocal(Map<String,? extends Object> variables) |
protected void |
deleteVariableInstanceForExplicitUserCall(VariableInstanceEntity variableInstance,
ExecutionEntity sourceActivityExecution) |
void |
deleteVariablesInstanceForLeavingScope() |
protected void |
ensureVariableInstancesInitialized() |
ELContext |
getCachedElContext() |
String |
getId() |
protected abstract VariableScopeImpl |
getParentVariableScope() |
protected ExecutionEntity |
getSourceActivityExecution() |
Object |
getVariable(String variableName) |
Object |
getVariableLocal(String variableName) |
Set<String> |
getVariableNames() |
Set<String> |
getVariableNamesLocal() |
Map<String,Object> |
getVariables() |
Map<String,Object> |
getVariablesLocal() |
boolean |
hasVariable(String variableName) |
boolean |
hasVariableLocal(String variableName) |
boolean |
hasVariables() |
boolean |
hasVariablesLocal() |
protected abstract void |
initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) |
protected boolean |
isActivityIdUsedForDetails()
Execution variable updates have activity instance ids, but historic task variable updates don't.
|
protected abstract List<VariableInstanceEntity> |
loadVariableInstances() |
void |
removeVariable(String variableName)
Removes the variable and creates a new
HistoricVariableUpdateEntity
. |
protected void |
removeVariable(String variableName,
ExecutionEntity sourceActivityExecution) |
void |
removeVariableLocal(String variableName)
Removes the local variable and creates a new
HistoricVariableUpdateEntity. |
protected void |
removeVariableLocal(String variableName,
ExecutionEntity sourceActivityExecution) |
void |
removeVariables()
Removes the (local) variables and creates a new
HistoricVariableUpdateEntity for each of them. |
void |
removeVariables(Collection<String> variableNames)
Removes the variables and creates a new
HistoricVariableUpdateEntity for each of them. |
void |
removeVariablesLocal()
Removes the (local) variables and creates a new
HistoricVariableUpdateEntity for each of them. |
void |
removeVariablesLocal(Collection<String> variableNames)
Removes the local variables and creates a new
HistoricVariableUpdateEntity for each of them. |
void |
setCachedElContext(ELContext cachedElContext) |
void |
setId(String id) |
void |
setVariable(String variableName,
Object value)
Sets the variable with the provided name to the provided value.
|
protected void |
setVariable(String variableName,
Object value,
ExecutionEntity sourceActivityExecution) |
Object |
setVariableLocal(String variableName,
Object value) |
Object |
setVariableLocal(String variableName,
Object value,
ExecutionEntity sourceActivityExecution) |
void |
setVariables(Map<String,? extends Object> variables)
Sets the provided variables to the variable scope.
|
void |
setVariablesLocal(Map<String,? extends Object> variables) |
protected void |
updateVariableInstance(VariableInstanceEntity variableInstance,
Object value,
ExecutionEntity sourceActivityExecution) |
protected Map<String,VariableInstanceEntity> variableInstances
protected List<VariableInstanceEntity> variableInstanceList
protected ELContext cachedElContext
protected String id
protected abstract List<VariableInstanceEntity> loadVariableInstances()
protected abstract VariableScopeImpl getParentVariableScope()
protected abstract void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
protected void ensureVariableInstancesInitialized()
public Map<String,Object> getVariables()
getVariables in interface VariableScopepublic Object getVariable(String variableName)
getVariable in interface VariableScopepublic Object getVariableLocal(String variableName)
getVariableLocal in interface VariableScopepublic boolean hasVariables()
hasVariables in interface VariableScopepublic boolean hasVariablesLocal()
hasVariablesLocal in interface VariableScopepublic boolean hasVariable(String variableName)
hasVariable in interface VariableScopepublic boolean hasVariableLocal(String variableName)
hasVariableLocal in interface VariableScopepublic Set<String> getVariableNames()
getVariableNames in interface VariableScopepublic Map<String,Object> getVariablesLocal()
getVariablesLocal in interface VariableScopepublic Set<String> getVariableNamesLocal()
getVariableNamesLocal in interface VariableScopepublic void setVariables(Map<String,? extends Object> variables)
VariableScope
Variables are set according algorithm for
VariableScope.setVariable(String, Object), applied separately to each variable.
setVariables in interface VariableScopevariables - a map of keys and values for the variables to be set{@link VariableScope#setVariable(String, Object)}public void setVariablesLocal(Map<String,? extends Object> variables)
setVariablesLocal in interface VariableScopepublic void removeVariables()
VariableScopeHistoricVariableUpdateEntity for each of them.removeVariables in interface VariableScopepublic void removeVariablesLocal()
VariableScopeHistoricVariableUpdateEntity for each of them.removeVariablesLocal in interface VariableScopepublic void deleteVariablesInstanceForLeavingScope()
public void removeVariables(Collection<String> variableNames)
VariableScopeHistoricVariableUpdateEntity for each of them.removeVariables in interface VariableScopepublic void removeVariablesLocal(Collection<String> variableNames)
VariableScopeHistoricVariableUpdateEntity for each of them.removeVariablesLocal in interface VariableScopepublic void setVariable(String variableName, Object value)
VariableScopeA variable is set according to the following algorithm:
In practice for most cases, this algorithm will set variables to the scope of the execution at the process instance’s root level, if there is no execution-local variable by the provided name.
setVariable in interface VariableScopevariableName - the name of the variable to be setvalue - the value of the variable to be setprotected void setVariable(String variableName, Object value, ExecutionEntity sourceActivityExecution)
public Object setVariableLocal(String variableName, Object value)
setVariableLocal in interface VariableScopepublic Object setVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution)
public void createVariableLocal(String variableName, Object value)
createVariableLocal in interface VariableScopeprotected void createVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution)
public void removeVariable(String variableName)
VariableScopeHistoricVariableUpdateEntity
.removeVariable in interface VariableScopeprotected void removeVariable(String variableName, ExecutionEntity sourceActivityExecution)
public void removeVariableLocal(String variableName)
VariableScopeHistoricVariableUpdateEntity.removeVariableLocal in interface VariableScopeprotected ExecutionEntity getSourceActivityExecution()
protected void removeVariableLocal(String variableName, ExecutionEntity sourceActivityExecution)
protected void deleteVariableInstanceForExplicitUserCall(VariableInstanceEntity variableInstance, ExecutionEntity sourceActivityExecution)
protected void updateVariableInstance(VariableInstanceEntity variableInstance, Object value, ExecutionEntity sourceActivityExecution)
protected VariableInstanceEntity createVariableInstance(String variableName, Object value, ExecutionEntity sourceActivityExecution)
protected boolean isActivityIdUsedForDetails()
public ELContext getCachedElContext()
public void setCachedElContext(ELContext cachedElContext)
public String getId()
public void setId(String id)
Copyright © 2014 Alfresco. All rights reserved.