Package org.activiti.engine.impl.javax.el

Examples of org.activiti.engine.impl.javax.el.ELContext


    @Test
    public void testGetValue() {
        assertNull(resolver.getValue(null, null, null));
        assertNull(resolver.getValue(null, null, "NonCamelProperty"));

        ELContext context = expectELContextResolved();
        assertSame(resolver.getCamelBehaviour(), resolver.getValue(context, null, CAMEL_PROPERTY_NAME));
    }
View Full Code Here


    /*
     * Set up a mock ELContext that expects the property to get resolved
     */
    private ELContext expectELContextResolved() {
        ELContext context = createMock(ELContext.class);
        context.setPropertyResolved(true);
        replay(context);
        return context;
    }
View Full Code Here

    this.valueExpression = valueExpression;
    this.expressionText = expressionText;
  }

  public Object getValue(VariableScope variableScope) {
    ELContext elContext = Context.getProcessEngineConfiguration().getExpressionManager().getElContext(variableScope);
    try {
      ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext);
      Context.getProcessEngineConfiguration()
        .getDelegateInterceptor()
        .handleInvocation(invocation);
View Full Code Here

      throw new ActivitiException("Error while evaluating expression: " + expressionText, e);
    }
  }
   
  public void setValue(Object value, VariableScope variableScope) {
    ELContext elContext = Context.getProcessEngineConfiguration().getExpressionManager().getElContext(variableScope);
    try {
      ExpressionSetInvocation invocation = new ExpressionSetInvocation(valueExpression, elContext, value);
      Context.getProcessEngineConfiguration()
        .getDelegateInterceptor()
        .handleInvocation(invocation);
View Full Code Here

  public void setExpressionFactory(ExpressionFactory expressionFactory) {
    this.expressionFactory = expressionFactory;
  }

  public ELContext getElContext(VariableScope variableScope) {
    ELContext elContext = null;
    if (variableScope instanceof VariableScopeImpl) {
      VariableScopeImpl variableScopeImpl = (VariableScopeImpl) variableScope;
      elContext = variableScopeImpl.getCachedElContext();
    }
   
View Full Code Here

    @Test
    public void testGetValue() {
        assertNull(resolver.getValue(null, null, null));
        assertNull(resolver.getValue(null, null, "NonCamelProperty"));

        ELContext context = expectELContextResolved();
        assertSame(resolver.getCamelBehaviour(), resolver.getValue(context, null, CAMEL_PROPERTY_NAME));
    }
View Full Code Here

    /*
     * Set up a mock ELContext that expects the property to get resolved
     */
    private ELContext expectELContextResolved() {
        ELContext context = createMock(ELContext.class);
        context.setPropertyResolved(true);
        replay(context);
        return context;
    }
View Full Code Here

      System.out.println(e.getMessage());
      System.exit(0);
    }
    NodePrinter.dump(out, tree.getRoot());
    if (!tree.getFunctionNodes().iterator().hasNext() && !tree.getIdentifierNodes().iterator().hasNext()) {
      ELContext context = new ELContext() {
        @Override
        public VariableMapper getVariableMapper() {
          return null;
        }
        @Override
View Full Code Here

    this.expressionManager = expressionManager;
    this.expressionText = expressionText;
  }

  public Object getValue(VariableScope variableScope) {
    ELContext elContext = expressionManager.getElContext(variableScope);
    try {
      ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext);
      Context.getProcessEngineConfiguration()
        .getDelegateInterceptor()
        .handleInvocation(invocation);
View Full Code Here

      throw new ActivitiException("Error while evaluating expression: " + expressionText, e);
    }
  }
   
  public void setValue(Object value, VariableScope variableScope) {
    ELContext elContext = expressionManager.getElContext(variableScope);
    try {
      ExpressionSetInvocation invocation = new ExpressionSetInvocation(valueExpression, elContext, value);
      Context.getProcessEngineConfiguration()
        .getDelegateInterceptor()
        .handleInvocation(invocation);
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.javax.el.ELContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.