Package org.apache.cocoon.environment.commandline

Examples of org.apache.cocoon.environment.commandline.FileSavingEnvironment


        throws Exception {
       
        parameters.put("user-agent", userAgent);
        parameters.put("accept", accept);

        FileSavingEnvironment env =
            new FileSavingEnvironment(deparameterizedURI, context, attributes,
                                      parameters, empty, null, cliContext,
                                      new NullOutputStream(), log);
        processLenient(env);
        return env.getContentType();
    }
View Full Code Here


        Map parameters,
        Map links,
        List gatheredLinks,
        OutputStream stream)
        throws Exception {
        FileSavingEnvironment env =
            new FileSavingEnvironment(
                deparameterizedURI,
                context,
                attributes,
                parameters,
                links,
                gatheredLinks,
                cliContext,
                stream,
                new LogKitLogger(log));

        // Here Cocoon can throw an exception if there are errors in processing the page
        cocoon.process(env);

        // if we get here, the page was created :-)
        return env.getStatus();
    }
View Full Code Here

     * @return a <code>String</code> value denoting the type of content
     * @exception Exception if an error occurs
     */
    protected String getType(String deparameterizedURI, Map parameters)
        throws Exception {
        FileSavingEnvironment env =
            new FileSavingEnvironment(
                deparameterizedURI,
                context,
                attributes,
                parameters,
                empty,
                null,
                cliContext,
                new NullOutputStream(),
                new LogKitLogger(log));
        processLenient(env);
        return env.getContentType();
    }
View Full Code Here

        Map parameters,
        Map links,
        List gatheredLinks,
        OutputStream stream)
        throws Exception {
        FileSavingEnvironment env =
            new FileSavingEnvironment(
                deparameterizedURI,
                context,
                attributes,
                parameters,
                links,
                gatheredLinks,
                cliContext,
                stream,
                new LogKitLogger(log));

        // Here Cocoon can throw an exception if there are errors in processing the page
        cocoon.process(env);

        // if we get here, the page was created :-)
        return env.getStatus();
    }
View Full Code Here

     * @return a <code>String</code> value denoting the type of content
     * @exception Exception if an error occurs
     */
    protected String getType(String deparameterizedURI, Map parameters)
        throws Exception {
        FileSavingEnvironment env =
            new FileSavingEnvironment(
                deparameterizedURI,
                context,
                attributes,
                parameters,
                empty,
                null,
                cliContext,
                new NullOutputStream(),
                new LogKitLogger(log));
        processLenient(env);
        return env.getContentType();
    }
View Full Code Here

    throws Exception {

        parameters.put("user-agent", userAgent);
        parameters.put("accept", accept);

        FileSavingEnvironment env =
            new FileSavingEnvironment(deparameterizedURI, lastModified, context,
                                      null, parameters, links,
                                      gatheredLinks, cliContext, stream, log);

        // Here Cocoon can throw an exception if there are errors in processing the page
        cocoon.process(env);

        // if we get here, the page was created :-)
        int status = env.getStatus();
        if (!env.isModified()) {
            status = -1;
        }
        return status;
    }
View Full Code Here

    throws Exception {

        parameters.put("user-agent", userAgent);
        parameters.put("accept", accept);

        FileSavingEnvironment env =
            new FileSavingEnvironment(deparameterizedURI, lastModified, context,
                                      null, parameters, links,
                                      gatheredLinks, cliContext, null, log);

        XMLConsumer consumer = new ContentHandlerWrapper(handler);
        ProcessingPipeline pipeline = cocoon.buildPipeline(env);
        CocoonComponentManager.enterEnvironment(env, cocoon.getComponentManager(), cocoon);
        try {
            pipeline.prepareInternal(env);
            pipeline.process(env, consumer);
        } finally {
            CocoonComponentManager.leaveEnvironment();
        }

        // if we get here, the page was created :-)
        int status = env.getStatus();
        if (!env.isModified()) {
            status = -1;
        }
        return status;
    }
View Full Code Here

        throws Exception {

        parameters.put("user-agent", userAgent);
        parameters.put("accept", accept);

        FileSavingEnvironment env =
            new FileSavingEnvironment(deparameterizedURI, context, null,
                                      parameters, empty, null, cliContext,
                                      new NullOutputStream(), log);
        processLenient(env);
        return env.getContentType();
    }
View Full Code Here

        throws Exception {

        parameters.put("user-agent", userAgent);
        parameters.put("accept", accept);

        FileSavingEnvironment env =
            new FileSavingEnvironment(
                deparameterizedURI,
                lastModified,
                context,
                attributes,
                parameters,
                links,
                gatheredLinks,
                cliContext,
                stream,
                new LogKitLogger(log));

        // Here Cocoon can throw an exception if there are errors in processing the page
        cocoon.process(env);

        // if we get here, the page was created :-)
        int status = env.getStatus();
        if (!env.isModified()) {
            status = -1;
        }
        return status;
    }
View Full Code Here

        throws Exception {
       
        parameters.put("user-agent", userAgent);
        parameters.put("accept", accept);

        FileSavingEnvironment env =
            new FileSavingEnvironment(
                deparameterizedURI,
                context,
                attributes,
                parameters,
                empty,
                null,
                cliContext,
                new NullOutputStream(),
                new LogKitLogger(log));
        processLenient(env);
        return env.getContentType();
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.environment.commandline.FileSavingEnvironment

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.