Package org.apache.cocoon.environment.commandline

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


     * @param stream an <code>OutputStream</code> to write the content to
     * @return a <code>String</code> value for the content
     * @exception Exception if an error occurs
     */
    protected String getPage(String deparameterizedURI, 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.getContentType();
    }
View Full Code Here


     * @param parameters a <code>Map</code> value for the request
     * @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

        cocoon.process(env);
        return env.getLinks();
    }

    protected String getPage(String deparameterizedURI, Map parameters, Map links, OutputStream stream) throws Exception {
        FileSavingEnvironment env = new FileSavingEnvironment(deparameterizedURI,
                        context,
                        attributes,
                        parameters,
                        links,
                        stream,
                        this.log);
        cocoon.process(env);
        return env.getContentType();
    }
View Full Code Here

        public void write(byte b[]) throws IOException { }
        public void write(byte b[], int off, int len) throws IOException { }
    }

    protected String getType(String deparameterizedURI, Map parameters) throws Exception {
        FileSavingEnvironment env = new FileSavingEnvironment(deparameterizedURI,
                     context,
                     attributes,
                     parameters,
                     empty,
                     new NullOutputStream(),
                     this.log);
        cocoon.process(env);
        return env.getContentType();
    }
View Full Code Here

     * @param stream an <code>OutputStream</code> to write the content to
     * @return a <code>String</code> value for the content
     * @exception Exception if an error occurs
     */
    protected String getPage(String deparameterizedURI, Map parameters, Map links, OutputStream stream) throws Exception {
        FileSavingEnvironment env = new FileSavingEnvironment(deparameterizedURI,
                        context,
                        attributes,
                        parameters,
                        links,
                        stream,
                        this.log);
        cocoon.process(env);
        return env.getContentType();
    }
View Full Code Here

     * @param parameters a <code>Map</code> value for the request
     * @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,
                     new NullOutputStream(),
                     this.log);
        cocoon.process(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, 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(), log);
        processLenient(env);
        return env.getContentType();
    }
View Full Code Here

     * @param stream an <code>OutputStream</code> to write the content to
     * @return a <code>String</code> value for the content
     * @exception Exception if an error occurs
     */
    protected String getPage(String deparameterizedURI, 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.getContentType();
    }
View Full Code Here

     * @param parameters a <code>Map</code> value for the request
     * @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

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.