Examples of ExpressionException


Examples of com.volantis.xml.expression.ExpressionException

    // javadoc inherited
    public Value invoke(ExpressionContext expressionContext, Value[] values)
        throws ExpressionException {

        if (values.length != 1) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                "invalid-num-of-args",
                new Object[]{
                    NAME,
                    new Integer(1),
                    new Integer(values.length)}));
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

    // javadoc inherited
    public Value invoke(ExpressionContext expressionContext, Value[] values)
        throws ExpressionException {

        if (values.length != 1) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                "invalid-num-of-args",
                new Object[]{
                    NAME,
                    new Integer(1),
                    new Integer(values.length)}));
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

        String componentName = values[1].stringValue().asJavaString();

        Project project = application.getPredefinedProject(projectName);

        if (project == null) {
            throw new ExpressionException(
                    exceptionLocalizer.format("mcsi-policy-project-not-defined",
                                              projectName));
        }

        return createIdentityValue(expressionContext, project,  componentName);
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

        if (argCount > 0) {
            value = arguments[0].stringValue().asJavaString();
            freshness =
                    (Freshness) DependencyRule.STRING_2_FRESHNESS.get(value);
            if (freshness == null) {
                throw new ExpressionException("Unknown freshness value: " +
                        value);
            }
        }

        if (argCount > 1) {
            // Get the revalidated.
            value = arguments[1].stringValue().asJavaString();
            revalidated =
                    (Freshness) DependencyRule.STRING_2_FRESHNESS.get(value);
            if (revalidated == null) {
                throw new ExpressionException(
                        "Unknown revalidated value: " + value);
            }
        }

        if (argCount > 2) {
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

                    result = currentItem;
                } else if (compareResult == CompareResult.INCOMPARABLE) {
                    if (result instanceof NumericValue && currentItem instanceof NumericValue) {
                        result = context.getFactory().createDoubleValue(Double.NaN);
                    } else {
                        throw new ExpressionException(
                                EXCEPTION_LOCALIZER.format(
                                        "incomparable-types",
                                        new Object[]{
                                            getName(),
                                            result.getClass().getName(),
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

            throws ExpressionException {

        int actualArgCount = (args != null) ? args.length : 0;

        if (actualArgCount != expectedArgCount) {
            throw new ExpressionException(
                    "Invalid argument count for function: " +
                    getFunctionName() +
                    " expected argument count: " + expectedArgCount +
                    " actual argument count: " + actualArgCount);
        }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

    // javadoc inherited
    public Value invoke(ExpressionContext expressionContext, Value[] values)
        throws ExpressionException {

        if (values.length != 1) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                "invalid-num-of-args",
                new Object[]{
                    NAME,
                    new Integer(1),
                    new Integer(values.length)}));
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

    public Value invoke(ExpressionContext context, Value[] arguments)
            throws ExpressionException {

        if (arguments.length != 1) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                "invalid-num-of-args",
                new Object[]{NAME, 1, arguments.length}));
        }

        ExpressionFactory expressionFactory = context.getFactory();
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

                String string = val.stringValue().asJavaString();
                try {
                    double value = Double.parseDouble(string);
                    result = Math.round(value);
                } catch (NumberFormatException e){
                    throw new ExpressionException(e);
                }
            }
            return result;
        }
    }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionException

     * @param actualCount actual number of arguments
     * @throws ExpressionException if validation of arguments fails
     */
    static void checkArgumentsCount(String functionName, int minCount, int maxCount, int actualCount) throws ExpressionException {
        if (actualCount < minCount || actualCount > maxCount) {
            throw new ExpressionException(EXCEPTION_LOCALIZER.format(
                    "invalid-num-args-range",
                    new Object[]{
                        functionName,
                        new Integer(minCount),
                        new Integer(maxCount),
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.