Examples of PipelineComponent


Examples of org.apache.cocoon.pipeline.component.PipelineComponent

    public void installComponent(String type, Map<String, ? extends Object> componentParameters) {
        if (this.pipeline == null) {
            throw new IllegalStateException("Pipeline component cannot be installed without having a pipeline.");
        }

        PipelineComponent component = this.componentProvider.createComponent(type);
        Map<String, ? extends Object> resolvedParameters = this.resolveParameters(componentParameters);
        component.setConfiguration(resolvedParameters);
        this.pipeline.addComponent(component);

        if (component instanceof Finisher) {
            this.hasFinisher = true;
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.component.PipelineComponent

            }
        }
    }

    protected void setupComponents(OutputStream outputStream, Map<String, Object> parameters) {
        PipelineComponent first = this.components.getFirst();

        // first component must be a Starter
        if (!(first instanceof Starter)) {
            String msg = "Cannot execute pipeline, first pipeline component is no starter";
            this.logger.error(msg);
            throw new SetupException(new IllegalStateException(msg));
        }

        // last component must be a Finisher
        PipelineComponent last = this.components.getLast();
        if (!(last instanceof Finisher)) {
            String msg = "Cannot execute pipeline, last pipeline component is no finisher";
            this.logger.error(msg);
            throw new SetupException(new IllegalStateException(msg));
        }

        // now try to link the components, always two components at a time
        // start at the first component
        PipelineComponent currentComponent = first;
        first.setup(parameters);

        // next component to link is the second in the list
        for (ListIterator<T> i = this.components.listIterator(1); i.hasNext();) {
            // link the current with the next component
            PipelineComponent nextComponent = i.next();
            this.linkComponents(currentComponent, nextComponent);

            // now advance to the next component
            currentComponent = nextComponent;
            currentComponent.setup(parameters);
View Full Code Here

Examples of org.apache.cocoon.pipeline.component.PipelineComponent

    public void installComponent(String type, Map<String, ? extends Object> componentParameters) {
        if (this.pipeline == null) {
            throw new IllegalStateException("Pipeline component cannot be installed without having a pipeline.");
        }

        PipelineComponent component = this.componentProvider.createComponent(type);
        Map<String, ? extends Object> resolvedParameters = this.resolveParameters(componentParameters);
        component.setConfiguration(resolvedParameters);
        this.pipeline.addComponent(component);

        if (component instanceof Finisher) {
            this.hasFinisher = true;
        }
View Full Code Here

Examples of org.apache.cocoon.pipeline.component.PipelineComponent

            }
        }
    }

    protected void setupComponents(OutputStream outputStream, Map<String, Object> parameters) {
        PipelineComponent first = this.components.getFirst();

        // first component must be a Starter
        if (!(first instanceof Starter)) {
            String msg = "Cannot execute pipeline, first pipeline component is no starter";
            this.logger.error(msg);
            throw new IllegalStateException(msg);
        }

        // last component must be a Finisher
        PipelineComponent last = this.components.getLast();
        if (!(last instanceof Finisher)) {
            String msg = "Cannot execute pipeline, last pipeline component is no finisher";
            this.logger.error(msg);
            throw new IllegalStateException(msg);
        }

        // now try to link the components, always two components at a time
        // start at the first component
        PipelineComponent currentComponent = first;
        first.setup(parameters);

        // next component to link is the second in the list
        for (ListIterator<PipelineComponent> i = this.components.listIterator(1); i.hasNext();) {
            // link the current with the next component
            PipelineComponent nextComponent = i.next();
            this.linkComponents(currentComponent, nextComponent);

            // now advance to the next component
            currentComponent = nextComponent;
            currentComponent.setup(parameters);
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.