Package aQute.bnd.osgi.resource

Examples of aQute.bnd.osgi.resource.FilterParser$Expression


    // fill the context once and use it for every expression
    JexlContext context = ExpressionService.fillContext(this.usedDataObjectIds, this.dataObjectHandler, this.uniqueProcessId, iid);
   
    while (it.hasNext()) {
      ActorRef actorRef = it.next();
      Expression expression = this.conditionalExpressionStrings.get(actorRef);
      if(ExpressionService.evaluateToBoolean(expression, context)) {
        return actorRef;
      }
    }
   
View Full Code Here


                    String expression = ((IfElseNode) child).getExpression();
                    // We need to add ' ' for strings in the expression for
                    // jexl to understand that is should do a string
                    // comparison
                    expression = replaceStrings(expression);
                    Expression e = evaluator.createExpression(expression);
                    try {
                        Object eval = e.evaluate(null);

                        Boolean result = false;
                        if (eval instanceof Boolean) {
                            result = (Boolean) eval;
                        } else if (eval instanceof String) {
View Full Code Here

    public static String evaluate(final String expression, final JexlContext jexlContext) {
        String result = StringUtils.EMPTY;

        if (StringUtils.isNotBlank(expression) && jexlContext != null) {
            try {
                Expression jexlExpression = getEngine().createExpression(expression);
                Object evaluated = jexlExpression.evaluate(jexlContext);
                if (evaluated != null) {
                    result = evaluated.toString();
                }
            } catch (JexlException e) {
                LOG.error("Invalid jexl expression: " + expression, e);
View Full Code Here

import java.util.Map;

public class ELUtil {
    public static Object invoke(String expression, Map<String, Object> context) {
        JexlEngine jexl = new JexlEngine();
        Expression el = jexl.createExpression(expression);
        JexlContext elContext = new MapContext();
        for (String property : context.keySet()) {
            elContext.set(property, context.get(property));
        }
        return el.evaluate(elContext);
    }
View Full Code Here

        String result = subst.replace(var);

        try
        {
            Expression exp = engine.createExpression(result);
            result = (String) exp.evaluate(createContext());
        }
        catch (Exception e)
        {
            configuration.getLogger().debug("Error encountered evaluating " + result, e);
        }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.EXPRESSION: {
            Expression expression = (Expression) theEObject;
            T result = caseExpression(expression);
            if (result == null)
                result = caseBaseElement(expression);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) {
        Expression oldExpression = expression;
        expression = newExpression;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.RESOURCE_PARAMETER_BINDING__EXPRESSION, oldExpression,
                    newExpression);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTimeDate(Expression newTimeDate, NotificationChain msgs) {
        Expression oldTimeDate = timeDate;
        timeDate = newTimeDate;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.TIMER_EVENT_DEFINITION__TIME_DATE, oldTimeDate, newTimeDate);
            if (msgs == null)
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTimeDuration(Expression newTimeDuration, NotificationChain msgs) {
        Expression oldTimeDuration = timeDuration;
        timeDuration = newTimeDuration;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.TIMER_EVENT_DEFINITION__TIME_DURATION, oldTimeDuration,
                    newTimeDuration);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTimeCycle(Expression newTimeCycle, NotificationChain msgs) {
        Expression oldTimeCycle = timeCycle;
        timeCycle = newTimeCycle;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.TIMER_EVENT_DEFINITION__TIME_CYCLE, oldTimeCycle, newTimeCycle);
            if (msgs == null)
View Full Code Here

TOP

Related Classes of aQute.bnd.osgi.resource.FilterParser$Expression

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.