org.camunda.bpm.engine.impl.core.variable
Class CoreVariableScope<T extends CoreVariableInstance>

java.lang.Object
  extended by org.camunda.bpm.engine.impl.core.variable.CoreVariableScope<T>
All Implemented Interfaces:
Serializable, VariableScope<T>
Direct Known Subclasses:
ConnectorVariableScope, CorePersistentVariableScope

public abstract class CoreVariableScope<T extends CoreVariableInstance>
extends Object
implements Serializable, VariableScope<T>

Author:
Daniel Meyer, Roman Smirnov, Sebastian Menski
See Also:
Serialized Form

Field Summary
protected  ELContext cachedElContext
           
 
Constructor Summary
CoreVariableScope()
           
 
Method Summary
 Map<String,T> collectVariableInstances(Map<String,T> variables, Collection<String> variableNames)
           
protected  Set<String> collectVariableNames(Set<String> variableNames)
           
protected  Map<String,Object> collectVariables(HashMap<String,Object> variables)
           
 ELContext getCachedElContext()
           
abstract  CoreVariableScope<T> getParentVariableScope()
           
protected  CoreVariableScope<T> getSourceActivityVariableScope()
           
 Object getVariable(String variableName)
           
 T getVariableInstance(String variableName)
          Returns a single variable instance from either this scope or any of its parents.
 T getVariableInstanceLocal(String name)
          Returns a single variable instance that this scope holds.
 Map<String,T> getVariableInstances()
          Returns this scope's and its parent's (grandparents etc.) variables as variable instance objects.
 Map<String,T> getVariableInstances(Collection<String> variableNames)
           
 Map<String,T> getVariableInstancesLocal()
          Returns the variable instances that this scope holds.
 Object getVariableLocal(String variableName)
           
 Set<String> getVariableNames()
           
 Set<String> getVariableNamesLocal()
           
 Map<String,Object> getVariables()
           
 Map<String,Object> getVariablesLocal()
           
protected abstract  CoreVariableStore<T> getVariableStore()
           
 boolean hasVariable(String variableName)
           
 boolean hasVariableLocal(String variableName)
           
 boolean hasVariables()
           
 boolean hasVariablesLocal()
           
 void removeVariable(String variableName)
          Removes the variable and creates a new HistoricVariableUpdateEntity.
protected  void removeVariable(String variableName, CoreVariableScope<T> sourceActivityExecution)
           
 void removeVariableLocal(String variableName)
          Removes the local variable and creates a new HistoricVariableUpdateEntity.
protected  void removeVariableLocal(String variableName, CoreVariableScope<T> 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 setVariable(String variableName, Object value)
           
protected  void setVariable(String variableName, Object value, CoreVariableScope<T> sourceActivityExecution)
           
 void setVariableLocal(String variableName, Object value)
           
 void setVariableLocal(String variableName, Object value, CoreVariableScope<T> sourceActivityExecution)
           
 void setVariables(Map<String,? extends Object> variables)
           
 void setVariablesLocal(Map<String,? extends Object> variables)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cachedElContext

protected ELContext cachedElContext
Constructor Detail

CoreVariableScope

public CoreVariableScope()
Method Detail

getVariableStore

protected abstract CoreVariableStore<T> getVariableStore()

getParentVariableScope

public abstract CoreVariableScope<T> getParentVariableScope()

getVariables

public Map<String,Object> getVariables()
Specified by:
getVariables in interface VariableScope<T extends CoreVariableInstance>

getVariableInstances

public Map<String,T> getVariableInstances()
Description copied from interface: VariableScope
Returns this scope's and its parent's (grandparents etc.) variables as variable instance objects.

Specified by:
getVariableInstances in interface VariableScope<T extends CoreVariableInstance>

getVariableInstancesLocal

public Map<String,T> getVariableInstancesLocal()
Description copied from interface: VariableScope
Returns the variable instances that this scope holds.

Specified by:
getVariableInstancesLocal in interface VariableScope<T extends CoreVariableInstance>

getVariableInstances

public Map<String,T> getVariableInstances(Collection<String> variableNames)

collectVariableInstances

public Map<String,T> collectVariableInstances(Map<String,T> variables,
                                              Collection<String> variableNames)

collectVariables

protected Map<String,Object> collectVariables(HashMap<String,Object> variables)

getVariable

public Object getVariable(String variableName)
Specified by:
getVariable in interface VariableScope<T extends CoreVariableInstance>

getVariableLocal

public Object getVariableLocal(String variableName)
Specified by:
getVariableLocal in interface VariableScope<T extends CoreVariableInstance>

getVariableInstance

public T getVariableInstance(String variableName)
Description copied from interface: VariableScope
Returns a single variable instance from either this scope or any of its parents.

Specified by:
getVariableInstance in interface VariableScope<T extends CoreVariableInstance>

getVariableInstanceLocal

public T getVariableInstanceLocal(String name)
Description copied from interface: VariableScope
Returns a single variable instance that this scope holds.

Specified by:
getVariableInstanceLocal in interface VariableScope<T extends CoreVariableInstance>

hasVariables

public boolean hasVariables()
Specified by:
hasVariables in interface VariableScope<T extends CoreVariableInstance>

hasVariablesLocal

public boolean hasVariablesLocal()
Specified by:
hasVariablesLocal in interface VariableScope<T extends CoreVariableInstance>

hasVariable

public boolean hasVariable(String variableName)
Specified by:
hasVariable in interface VariableScope<T extends CoreVariableInstance>

hasVariableLocal

public boolean hasVariableLocal(String variableName)
Specified by:
hasVariableLocal in interface VariableScope<T extends CoreVariableInstance>

collectVariableNames

protected Set<String> collectVariableNames(Set<String> variableNames)

getVariableNames

public Set<String> getVariableNames()
Specified by:
getVariableNames in interface VariableScope<T extends CoreVariableInstance>

getVariablesLocal

public Map<String,Object> getVariablesLocal()
Specified by:
getVariablesLocal in interface VariableScope<T extends CoreVariableInstance>

getVariableNamesLocal

public Set<String> getVariableNamesLocal()
Specified by:
getVariableNamesLocal in interface VariableScope<T extends CoreVariableInstance>

setVariables

public void setVariables(Map<String,? extends Object> variables)
Specified by:
setVariables in interface VariableScope<T extends CoreVariableInstance>

setVariablesLocal

public void setVariablesLocal(Map<String,? extends Object> variables)
Specified by:
setVariablesLocal in interface VariableScope<T extends CoreVariableInstance>

removeVariables

public void removeVariables()
Description copied from interface: VariableScope
Removes the (local) variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariables in interface VariableScope<T extends CoreVariableInstance>

removeVariablesLocal

public void removeVariablesLocal()
Description copied from interface: VariableScope
Removes the (local) variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariablesLocal in interface VariableScope<T extends CoreVariableInstance>

removeVariables

public void removeVariables(Collection<String> variableNames)
Description copied from interface: VariableScope
Removes the variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariables in interface VariableScope<T extends CoreVariableInstance>

removeVariablesLocal

public void removeVariablesLocal(Collection<String> variableNames)
Description copied from interface: VariableScope
Removes the local variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariablesLocal in interface VariableScope<T extends CoreVariableInstance>

setVariable

public void setVariable(String variableName,
                        Object value)
Specified by:
setVariable in interface VariableScope<T extends CoreVariableInstance>

setVariable

protected void setVariable(String variableName,
                           Object value,
                           CoreVariableScope<T> sourceActivityExecution)

setVariableLocal

public void setVariableLocal(String variableName,
                             Object value,
                             CoreVariableScope<T> sourceActivityExecution)

setVariableLocal

public void setVariableLocal(String variableName,
                             Object value)
Specified by:
setVariableLocal in interface VariableScope<T extends CoreVariableInstance>

removeVariable

public void removeVariable(String variableName)
Description copied from interface: VariableScope
Removes the variable and creates a new HistoricVariableUpdateEntity.

Specified by:
removeVariable in interface VariableScope<T extends CoreVariableInstance>

removeVariable

protected void removeVariable(String variableName,
                              CoreVariableScope<T> sourceActivityExecution)

removeVariableLocal

public void removeVariableLocal(String variableName)
Description copied from interface: VariableScope
Removes the local variable and creates a new HistoricVariableUpdateEntity.

Specified by:
removeVariableLocal in interface VariableScope<T extends CoreVariableInstance>

getSourceActivityVariableScope

protected CoreVariableScope<T> getSourceActivityVariableScope()

removeVariableLocal

protected void removeVariableLocal(String variableName,
                                   CoreVariableScope<T> sourceActivityExecution)

getCachedElContext

public ELContext getCachedElContext()

setCachedElContext

public void setCachedElContext(ELContext cachedElContext)


Copyright © 2014 camunda services GmbH. All Rights Reserved.