Examples of StreamPipeline


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

            context.getEventPipeline().addTransformer(
                "<translator>", null, Parameters.EMPTY_PARAMETERS
            );
        }

        StreamPipeline pipeline = context.getStreamPipeline();

        List mapStack = context.getMapStack();
        Map objectModel = env.getObjectModel();
       
        if (this.mimeType == null) {       
            // No mime-type set on node
            pipeline.setSerializer(
                this.serializerName,
                null,
                Parameters.EMPTY_PARAMETERS // No parameters on serializers
            );

        } else {
            // mime-type set on node
            pipeline.setSerializer(
                this.serializerName,
                null,
                Parameters.EMPTY_PARAMETERS, // No parameters on serializers
                this.mimeType
            );
        }

        // 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;
        }
View Full Code Here

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

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

        Map objectModel = env.getObjectModel();

        StreamPipeline pipeline = context.getStreamPipeline();

        if (this.mimeType == null) {
            // No mime-type set on node
            pipeline.setReader(
                this.readerName,
                source.resolve(context, objectModel),
                VariableResolver.buildParameters(this.parameters, context, objectModel)
            );           

        } else {
            // mime-type set on node
            pipeline.setReader(
                this.readerName,
                source.resolve(context, objectModel),
                VariableResolver.buildParameters(this.parameters, context, objectModel),
                this.mimeType
            );
        }

        // 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;
        }
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.