Examples of ProcessingPipeline


Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

            try {
               
                if ( !this.internal ) {
                    processingResult = usedProcessor.process(newEnv);
                } else {
                    ProcessingPipeline pp = usedProcessor.processInternal(newEnv);
                    if (pp != null) pp.release();
                    processingResult = pp != null;
                }
            } finally {
                CocoonComponentManager.endProcessing(newEnv, processKey);
            }

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

            context.getProcessingPipeline().addTransformer(
                "<gatherer>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS
            );
        }

        ProcessingPipeline pipeline = context.getProcessingPipeline();

        Map objectModel = env.getObjectModel();

        pipeline.setSerializer(
            this.serializerName,
            null,
            Parameters.EMPTY_PARAMETERS, // No parameters on serializers
            this.pipelineHints == null
                ? Parameters.EMPTY_PARAMETERS
                : VariableResolver.buildParameters(this.pipelineHints, context, objectModel),
            this.mimeType.resolve(context, env.getObjectModel())
        );

        // Set status code if there is one
        if (this.statusCode >= 0) {
            env.setStatus(this.statusCode);
        }

        if (! context.isInternalRequest()) {
            // Process pipeline
            return pipeline.process(env);

        } else {
            // Return true : pipeline is finished.
            return true;
        }

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

        try {
            env.changeContext(resolvedPrefix, resolvedSource);

            if (context.isInternalRequest()) {
                // Propagate pipelines
                ProcessingPipeline pp = processor.processInternal(env);
                if ( pp != null ) {
                    context.setProcessingPipeline( pp );
                    return true;
                } else {
                    return false;

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

    public final boolean invoke(Environment env,  InvokeContext context)
      throws Exception {

        Map objectModel = env.getObjectModel();

        ProcessingPipeline pipeline = context.getProcessingPipeline();

        pipeline.setReader(
            this.readerName,
            source.resolve(context, objectModel),
            VariableResolver.buildParameters(this.parameters, context, objectModel),
            this.mimeType.resolve(context, objectModel)
        );

        // Set status code if there is one
        if (this.statusCode >= 0) {
            env.setStatus(this.statusCode);
        }

        if (! context.isInternalRequest()) {
            // Process pipeline
            return pipeline.process(env);

        } else {
            // Return true : pipeline is finished.
            return true;
        }

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

                }
            }
        }
       
        Map objectModel = env.getObjectModel();
        ProcessingPipeline pipeline = context.getProcessingPipeline();

        // Perform link translation if requested
        if (objectModel.containsKey(Constants.LINK_OBJECT)) {
            pipeline.addTransformer("<translator>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
        }
       
        if (objectModel.containsKey(Constants.LINK_COLLECTION_OBJECT) && env.isExternal()) {
            pipeline.addTransformer("<gatherer>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
        }

        pipeline.setSerializer(
            this.serializerName,
            source.resolve(context, objectModel),
            VariableResolver.buildParameters(this.parameters, context, objectModel),
            this.pipelineHints == null
                ? Parameters.EMPTY_PARAMETERS
                : VariableResolver.buildParameters(this.pipelineHints, context, objectModel),
            this.mimeType.resolve(context, env.getObjectModel())
        );

        // Set status code if there is one
        if (this.statusCode >= 0) {
            env.setStatus(this.statusCode);
        }

        if (! context.isBuildingPipelineOnly()) {
            // Process pipeline
            return pipeline.process(env);

        } else {
            // Return true : pipeline is finished.
            return true;
        }

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

        try {
            env.changeContext(resolvedPrefix, resolvedSource);

            if (context.isBuildingPipelineOnly()) {
                // Propagate pipelines
                ProcessingPipeline pp = processor.buildPipeline(env);
                if (pp != null) {
                    context.setProcessingPipeline( pp );
                    pipelineWasBuilt = true;
                }
            } else {

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

        try {
            env.changeContext(resolvedPrefix, resolvedSource);

            if (context.isBuildingPipelineOnly()) {
                // Propagate pipelines
                ProcessingPipeline pp = processor.buildPipeline(env);
                if ( pp != null ) {
                    context.setProcessingPipeline( pp );
                    return true;
                } else {
                    return false;

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

        boolean infoEnabled = getLogger().isInfoEnabled();

        Map objectModel = env.getObjectModel();

        // Setup aggregator
        ProcessingPipeline processingPipeline = context.getProcessingPipeline();

        processingPipeline.setGenerator("<aggregator>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);

        ContentAggregator aggregator = (ContentAggregator)processingPipeline.getGenerator();
        aggregator.setRootElement(
            this.element.resolve(context, objectModel),
            this.nsURI.resolve(context, objectModel),
            this.nsPrefix.resolve(context, objectModel)
        );

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

                }
            }
        }
       
        Map objectModel = env.getObjectModel();
        ProcessingPipeline pipeline = context.getProcessingPipeline();

        // Perform link translation if requested
        if (objectModel.containsKey(Constants.LINK_OBJECT)) {
            pipeline.addTransformer("<translator>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
        }
       
        if (objectModel.containsKey(Constants.LINK_COLLECTION_OBJECT) && env.isExternal()) {
            pipeline.addTransformer("<gatherer>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
        }

        pipeline.setSerializer(
            this.serializerName,
            source.resolve(context, objectModel),
            VariableResolver.buildParameters(this.parameters, context, objectModel),
            this.pipelineHints == null
                ? Parameters.EMPTY_PARAMETERS
                : VariableResolver.buildParameters(this.pipelineHints, context, objectModel),
            this.mimeType.resolve(context, env.getObjectModel())
        );

        // Set status code if there is one
        if (this.statusCode >= 0) {
            env.setStatus(this.statusCode);
        }

        if (! context.isBuildingPipelineOnly()) {
            // Process pipeline
            return pipeline.process(env);

        } else {
            // Return true : pipeline is finished.
            return true;
        }

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline

    public final boolean invoke(Environment env,  InvokeContext context)
      throws Exception {

        Map objectModel = env.getObjectModel();

        ProcessingPipeline pipeline = context.getProcessingPipeline();

        pipeline.setReader(
            this.readerName,
            source.resolve(context, objectModel),
            VariableResolver.buildParameters(this.parameters, context, objectModel),
            this.mimeType.resolve(context, objectModel)
        );

        // Set status code if there is one
        if (this.statusCode >= 0) {
            env.setStatus(this.statusCode);
        }

        if (! context.isBuildingPipelineOnly()) {
            // Process pipeline
            return pipeline.process(env);

        } else {
            // Return true : pipeline is finished.
            return true;
        }
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.