Package com.volantis.xml.pipeline.sax.impl.template

Examples of com.volantis.xml.pipeline.sax.impl.template.TValue


    }

    // Javadoc inherited.
    public void doAction(DynamicProcess dynamicProcess) throws SAXException {

        TValue value = model.getParameterBlock().query(parameter);

        XMLPipelineContext pipelineContext = dynamicProcess.getPipelineContext();

        ExpressionContext context = pipelineContext.getExpressionContext();
View Full Code Here


            throw forwardFatalError(dynamicProcess,
                    "Default values cannot be specified for " +
                    "mandatory parameter '" + name + "'");
        } else {
            ParameterBlock parameters = model.getParameterBlock();
            TValue boundValue = parameters.query(name);

            if (boundValue != null) {
                if (boundValue.getComplexity() == Complexity.COMPLEX &&
                        complexity == Complexity.SIMPLE) {

                    throw forwardFatalError(dynamicProcess,
                            "A complex binding has been provided for the " +
                            "simple parameter " + name);
                } else {

                    model.transition(TemplateSchema.VALUE_START);

                    dynamicProcess.getPipelineContext()
                            .getFlowControlManager().exitCurrentElement();

                    // Record the fact that the existing binding value is
                    // "good"
                    boundValue.verify();

                    model.transition(TemplateSchema.VALUE_END);

                    action = new EndParameterAction(model);
                }
            } else if (use == Use.REQUIRED) {
                throw forwardFatalError(dynamicProcess,
                        "No binding has been provided for required " +
                        "parameter " + name);
            } else {
                // The parameter is optional and has no existing binding
                if (defaultValue != null) {

                    TValue value = model.createSimpleValue(defaultValue);
                    model.addDefaultValue(name, value);

                    action = new EndParameterAction(model);

                } else {
View Full Code Here

        // Make sure that all the bindings supplied by the apply are correct.
        ParameterBlock parameters = model.getParameterBlock();
        for (Iterator i = parameters.iterator(); i.hasNext();) {
            String name = (String) i.next();
            TValue binding = parameters.query(name);

            if (!binding.isVerified()) {
                forwardFatalError(dynamicProcess,
                        "Binding \"" + name + "\" has been " +
                        "supplied that does not exist in the template " +
                        "definition declarations");
            }
View Full Code Here

        if (ref == null) {
            throw forwardFatalError(dynamicProcess,
                    "A ref must be provided for a value");
        }

        TValue value = model.getParameterBlock().query(ref);
        if (value == null) {
            throw forwardFatalError(dynamicProcess,
                    "Parameter " + ref + " not defined in the current scope");
        }

        value.insert(dynamicProcess.getPipeline(), ref);

        return null;
    }
View Full Code Here

        }

        String value = attributes.getValue("value");
        String ref = attributes.getValue("ref");

        TValue tValue;
        if (value != null && ref != null) {
            throw forwardFatalError(dynamicProcess,
                    "Only one of 'value' or 'ref' may be specified");
        } else if (value != null) {
            tValue = model.createSimpleValue(value);
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.impl.template.TValue

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.