Examples of ExpressionScope


Examples of com.volantis.xml.expression.ExpressionScope

     * defined, this returns the global expression scope.
     *
     * @return the current expression scope
     */
    public ExpressionScope getCurrentScope() {
        ExpressionScope currentScope = globalScope;

        if (frames.size() > 0) {
            currentScope = (ExpressionScope)frames.peek();
        }

View Full Code Here

Examples of com.volantis.xml.expression.ExpressionScope

        return currentScope;
    }

    // javadoc inherited
    public void declareVariable(String variable, Object value) {
        ExpressionScope scope = getCurrentScope();

        if (scope == null) {
            throw new IllegalStateException(
                    "An attempt has been made to declare a variable " +
                    "while there is no current expression scope");
        } else if (!(value instanceof Value)) {
            throw new IllegalArgumentException(
                    "An attempt has been made to declare a variable " +
                    "with a value that doesn't implement " +
                    Value.class.getName() +
                    " (" + value.getClass().getName() + ")");
        } else {
            ExpandedName name = expandName(variable);

            scope.declareVariable(name, (Value)value);
        }
    }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionScope

        pendingVariableDeclarations.put(name, initialValue);
    }

    // javadoc inherited
    public void executePendingVariableDeclarations() {
        final ExpressionScope expressionScope =
            getPipelineContext().getExpressionContext().getCurrentScope();
        for (Iterator iter = pendingVariableDeclarations.entrySet().iterator();
                iter.hasNext(); ) {
            final Map.Entry entry = (Map.Entry) iter.next();
            final ExpandedName name = (ExpandedName) entry.getKey();
            final Value initialValue = (Value) entry.getValue();
            expressionScope.declareVariable(name, initialValue);
        }
    }
View Full Code Here

Examples of org.rhq.core.clientapi.descriptor.configuration.ExpressionScope

            optionsSource.setLinkToTarget(source.isLinkToTarget());
            if (source.getFilter() != null && source.getFilter().length() > 40) {
                throw new IllegalArgumentException("Filter expression must be less than 40 chars long");
            }
            optionsSource.setFilter(source.getFilter());
            ExpressionScope expressionScope = source.getExpressionScope();
            if (expressionScope != null) {
                optionsSource.setExpressionScope(PropertyOptionsSource.ExpressionScope.fromValue(expressionScope
                    .value()));
            }
            String expression = source.getExpression();
            if (expression == null || expression.isEmpty())
                throw new IllegalArgumentException("Expression must not be empty");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.