public boolean containsVariable(String variableName) { return variableScope.hasVariable(variableName); }
public boolean containsVariable(String variableName) { return variableScope.hasVariable(variableName); }
public boolean containsKey(Object key) { return variableScopeKey.equals(key) || variableScope.hasVariable((String) key); }
public boolean containsKey(Object key) { return variableScopeKey.equals(key) || variableScope.hasVariable((String) key); }
public boolean isReadOnly(ELContext context, Object base, Object property) { if (base == null) { String variable = (String) property; Object object = context.getContext(VariableScope.class); return object != null && !((VariableScope)object).hasVariable(variable); } return true; }
public boolean isReadOnly(ELContext context, Object base, Object property) { if (base == null) { String variable = (String) property; Object object = context.getContext(VariableScope.class); return object != null && !((VariableScope)object).hasVariable(variable); } return true; }
public void setValue(ELContext context, Object base, Object property, Object value) { if (base == null) { String variable = (String) property; Object object = context.getContext(VariableScope.class); if (object != null) { VariableScope variableScope = (VariableScope) object; if (variableScope.hasVariable(variable)) { variableScope.setVariable(variable, value); } } } }
public void setValue(ELContext context, Object base, Object property, Object value) { if (base == null) { String variable = (String) property; Object object = context.getContext(VariableScope.class); if (object != null) { VariableScope variableScope = (VariableScope) object; if (variableScope.hasVariable(variable)) { variableScope.setVariable(variable, value); } } } }
public Object getValue(ELContext context, Object base, Object property) { Object object = context.getContext(VariableScope.class); if(object != null) { VariableScope variableScope = (VariableScope) object; if (base == null) { String variable = (String) property; // according to javadoc, can only be a String if( (EXECUTION_KEY.equals(property) && variableScope instanceof ExecutionEntity) || (TASK_KEY.equals(property) && variableScope instanceof TaskEntity) || (variableScope instanceof CaseExecutionEntity && (CASE_EXECUTION_KEY.equals(property) || EXECUTION_KEY.equals(property))) ) { context.setPropertyResolved(true); return variableScope; } else if (EXECUTION_KEY.equals(property) && variableScope instanceof TaskEntity) { context.setPropertyResolved(true); return ((TaskEntity) variableScope).getExecution(); } else if(LOGGED_IN_USER_KEY.equals(property)){ context.setPropertyResolved(true); return Context.getCommandContext().getAuthenticatedUserId(); } else { if (variableScope.hasVariable(variable)) { context.setPropertyResolved(true); // if not set, the next elResolver in the CompositeElResolver will be called return variableScope.getVariable(variable); } } } } // property resolution (eg. bean.value) will be done by the BeanElResolver (part of the CompositeElResolver) // It will use the bean resolved in this resolver as base. return null; }
public Object getValue(ELContext context, Object base, Object property) { Object object = context.getContext(VariableScope.class); if(object != null) { VariableScope variableScope = (VariableScope) object; if (base == null) { String variable = (String) property; // according to javadoc, can only be a String if( (EXECUTION_KEY.equals(property) && variableScope instanceof ExecutionEntity) || (TASK_KEY.equals(property) && variableScope instanceof TaskEntity) || (variableScope instanceof CaseExecutionEntity && (CASE_EXECUTION_KEY.equals(property) || EXECUTION_KEY.equals(property))) ) { context.setPropertyResolved(true); return variableScope; } else if (EXECUTION_KEY.equals(property) && variableScope instanceof TaskEntity) { context.setPropertyResolved(true); return ((TaskEntity) variableScope).getExecution(); } else if(LOGGED_IN_USER_KEY.equals(property)){ context.setPropertyResolved(true); return Context.getCommandContext().getAuthenticatedUserId(); } else { if (variableScope.hasVariable(variable)) { context.setPropertyResolved(true); // if not set, the next elResolver in the CompositeElResolver will be called return variableScope.getVariable(variable); } } } } // property resolution (eg. bean.value) will be done by the BeanElResolver (part of the CompositeElResolver) // It will use the bean resolved in this resolver as base. return null; }
public void destroy(VariableScope innerScopeInstance, VariableScope outerScopeInstance) { if (destinationVariableName!=null) { if (innerScopeInstance.hasVariable(sourceVariableName)) { Object value = innerScopeInstance.getVariable(sourceVariableName); outerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't destroy variable " + sourceVariableName + ", since it does not exist"); } } if (destinationExpression!=null) { Object value = destinationExpression.getValue(innerScopeInstance); outerScopeInstance.setVariable(destinationVariableName, value); } if (link!=null) { if (innerScopeInstance.hasVariable(sourceVariableName)) { Object value = innerScopeInstance.getVariable(sourceVariableName); outerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't destroy variable " + sourceVariableName + ", since it does not exist"); } } if (linkExpression!=null) { Object value = sourceExpression.getValue(innerScopeInstance); outerScopeInstance.setVariable(destinationVariableName, value); } }
public void destroy(VariableScope innerScopeInstance, VariableScope outerScopeInstance) { if (destinationVariableName!=null) { if (innerScopeInstance.hasVariable(sourceVariableName)) { Object value = innerScopeInstance.getVariable(sourceVariableName); outerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't destroy variable " + sourceVariableName + ", since it does not exist"); } } if (destinationExpression!=null) { Object value = destinationExpression.getValue(innerScopeInstance); outerScopeInstance.setVariable(destinationVariableName, value); } if (link!=null) { if (innerScopeInstance.hasVariable(sourceVariableName)) { Object value = innerScopeInstance.getVariable(sourceVariableName); outerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't destroy variable " + sourceVariableName + ", since it does not exist"); } } if (linkExpression!=null) { Object value = sourceExpression.getValue(innerScopeInstance); outerScopeInstance.setVariable(destinationVariableName, value); } }
public void initialize(VariableScope innerScopeInstance, VariableScope outerScopeInstance) { if (sourceVariableName!=null) { if (outerScopeInstance.hasVariable(sourceVariableName)) { Object value = outerScopeInstance.getVariable(sourceVariableName); innerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't create variable '" + destinationVariableName + "', since the source variable '" + sourceVariableName + "does not exist"); } } if (sourceExpression!=null) { Object value = sourceExpression.getValue(outerScopeInstance); innerScopeInstance.setVariable(destinationVariableName, value); } if (link!=null) { if (outerScopeInstance.hasVariable(sourceVariableName)) { Object value = outerScopeInstance.getVariable(sourceVariableName); innerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't create variable '" + destinationVariableName + "', since the source variable '" + sourceVariableName + "does not exist"); } } if (linkExpression!=null) { Object value = sourceExpression.getValue(outerScopeInstance); innerScopeInstance.setVariable(destinationVariableName, value); } }
public void initialize(VariableScope innerScopeInstance, VariableScope outerScopeInstance) { if (sourceVariableName!=null) { if (outerScopeInstance.hasVariable(sourceVariableName)) { Object value = outerScopeInstance.getVariable(sourceVariableName); innerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't create variable '" + destinationVariableName + "', since the source variable '" + sourceVariableName + "does not exist"); } } if (sourceExpression!=null) { Object value = sourceExpression.getValue(outerScopeInstance); innerScopeInstance.setVariable(destinationVariableName, value); } if (link!=null) { if (outerScopeInstance.hasVariable(sourceVariableName)) { Object value = outerScopeInstance.getVariable(sourceVariableName); innerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't create variable '" + destinationVariableName + "', since the source variable '" + sourceVariableName + "does not exist"); } } if (linkExpression!=null) { Object value = sourceExpression.getValue(outerScopeInstance); innerScopeInstance.setVariable(destinationVariableName, value); } }
public boolean containsVariable(String variableName) { return variableScope.hasVariable(variableName); }
public boolean containsKey(Object key) { return variableScopeKey.equals(key) || variableScope.hasVariable((String) key); }
public boolean isReadOnly(ELContext context, Object base, Object property) { if (base == null) { String variable = (String) property; Object object = context.getContext(VariableScope.class); return object != null && !((VariableScope)object).hasVariable(variable); } return true; }
public void setValue(ELContext context, Object base, Object property, Object value) { if (base == null) { String variable = (String) property; Object object = context.getContext(VariableScope.class); if (object != null) { VariableScope variableScope = (VariableScope) object; if (variableScope.hasVariable(variable)) { variableScope.setVariable(variable, value); } } } }
public void destroy(VariableScope innerScopeInstance, VariableScope outerScopeInstance) { if (destinationVariableName!=null) { if (innerScopeInstance.hasVariable(sourceVariableName)) { Object value = innerScopeInstance.getVariable(sourceVariableName); outerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't destroy variable " + sourceVariableName + ", since it does not exist"); } } if (destinationExpression!=null) { Object value = destinationExpression.getValue(innerScopeInstance); outerScopeInstance.setVariable(destinationVariableName, value); } if (link!=null) { if (innerScopeInstance.hasVariable(sourceVariableName)) { Object value = innerScopeInstance.getVariable(sourceVariableName); outerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't destroy variable " + sourceVariableName + ", since it does not exist"); } } if (linkExpression!=null) { Object value = sourceExpression.getValue(innerScopeInstance); outerScopeInstance.setVariable(destinationVariableName, value); } }
public void initialize(VariableScope innerScopeInstance, VariableScope outerScopeInstance) { if (sourceVariableName!=null) { if (outerScopeInstance.hasVariable(sourceVariableName)) { Object value = outerScopeInstance.getVariable(sourceVariableName); innerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't create variable '" + destinationVariableName + "', since the source variable '" + sourceVariableName + "does not exist"); } } if (sourceExpression!=null) { Object value = sourceExpression.getValue(outerScopeInstance); innerScopeInstance.setVariable(destinationVariableName, value); } if (link!=null) { if (outerScopeInstance.hasVariable(sourceVariableName)) { Object value = outerScopeInstance.getVariable(sourceVariableName); innerScopeInstance.setVariable(destinationVariableName, value); } else { throw new ProcessEngineException("Couldn't create variable '" + destinationVariableName + "', since the source variable '" + sourceVariableName + "does not exist"); } } if (linkExpression!=null) { Object value = sourceExpression.getValue(outerScopeInstance); innerScopeInstance.setVariable(destinationVariableName, value); } }