/* ========================================================================= * * The Apache Software License, Version 1.1 * * ========================================================================= * * Copyright (C) 1999-2003 The Apache Software Foundation. * * All rights reserved. * * * * Redistribution and use in source and binary forms, with or without * * modification, are permitted provided that the following conditions are * * met: * * * * 1. Redistributions of source code must retain the above copyright notice, * * this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in the * * documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * * must include the following acknowledgment: * * * * "This product includes software developed by the * * Apache Software Foundation ." * * * * Alternately, this acknowledgment may appear in the software itself, if * * and wherever such third-party acknowledgments normally appear. * * * * 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be * * used to endorse or promote products derived from this software without * * prior written permission. For written permission, please contact * * . * * * * 5. Products derived from this software may not be called "Apache", nor * * may "Apache" appear in their name, without prior written permission of * * the Apache Software Foundation. * * * * ------------------------------------------------------------------------- * * * * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGE * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVI- * * CES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABI- * * LITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * * DAMAGE. * * * * This software consists of voluntary contributions made by many individua- * * ls on behalf of the Apache Software Foundation and was originally created * * by Stefano Mazzocchi . For more information * * about the Apache Software Foundation please see . * * * * ------------------------------------------------------------------------- */ /** *

* Interface to various Cocoon abstractions. *

* *

*

*
Authors:
*
* Christopher Oliver. *
*
Copyright:
*
* Copyright © 2002-2003 * The Apache Software Foundation. * All rights reserved. *
*
*

*/ interface Cocoon { readonly attribute cocoon::Request request; readonly attribute cocoon::Response response; readonly attribute cocoon::Session session; readonly attribute cocoon::Context_ context_; readonly attribute cocoon::Environment environment; readonly attribute cocoon::ComponentManager componentManager; readonly attribute cocoon::StringArray parameters; /** * Call the Cocoon sitemap for the given URI, sending the output of the * eventually matched pipeline to the specified outputstream. * * @param uri The URI for which the request should be generated. * @param biz Extra data associated with the subrequest. * @param out An OutputStream where the output should be written to. * @return Whatever the Cocoon processor returns (????). * @exception Exception If an error occurs. */ boolean process(in string uri, in Object object, in java::OutputStream stream); /** * Set the Scope object in the session object of the current * user. This effectively means that at the next invocation from the * sitemap of a JavaScript function (using the <map:call * function="...">), will obtain the same scope as the current * one. */ void createSession(); /** * Remove the Scope object from the session object of the current * user. */ void removeSession(); /** * Forward the request to a Cocoon pipeline. * * @param URI a String, the URI of the forwarded request * @param bizData an Object, the business data object * to be made available to the forwarded pipeline * @param continuation a WebContinuation, the * continuation to be called to resume the processing */ void forwardTo(in string uri, in Object bizData, in WebContinuation continuation); /** * Load the file specified as argument. * @param filename a String value * @return an Object value */ Object load(in string filename); /** * Dump to Log file all WebContinuations * in the system */ void displayAllContinuations(); /** * Call an action from JS */ void callAction(in string type, in string source, in Object parameters); /** * Obtain value from InputModule * @param type (not sure) * @param attribute_ (not sure) */ Object inputModuleGetAttribute(in string type, in string attribute_); /** * Set an attribute (starts transaction, commit or rollback required!) * @param type (not sure) * @param attribute_ (not sure) * @param value (not sure) */ void outputModuleSetAttribute(in string type, in string attribute_, in Object value); /** * Makes attributes permanent (ends transaction) * @param type (not sure) */ void outputModuleCommit(in string type); /** * Deletes attributes (ends transaction) * @param type (not sure) */ void outputModuleRollback(in string type); };