pier 2003/03/17 16:53:38
Modified: src/idl/cocoon Script.idl _module.idl
Added: src/idl/cocoon Cocoon.idl Context.idl Log.idl Request.idl
Log:
Night time round-up reflection of today's discussions on the flow Object
Model in the IDL sources.
Revision Changes Path
1.2 +4 -7 cocoon-2.1/src/idl/cocoon/Script.idl
Index: Script.idl
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/idl/cocoon/Script.idl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Script.idl 17 Mar 2003 23:29:24 -0000 1.1
+++ Script.idl 18 Mar 2003 00:53:37 -0000 1.2
@@ -77,17 +77,14 @@
/**
* The current <b>Cocoon</b> instance associated with this script.
+ * <i>(suggested by Stefano Mazzocchi)</i>
*/
readonly attribute cocoon::Cocoon cocoon;
/**
- * The current <b>Request</b> instance associated with this script.
+ * The current <b>Log</b> instance used for logging from this script.
+ * <i>(suggested by Sylvain Wallez)</i>.
*/
- readonly attribute cocoon::Request request;
-
- /**
- * The current <b>Response</b> instance associated with this script.
- */
- readonly attribute cocoon::Response response;
+ readonly attribute cocoon::Log log;
};
1.4 +12 -4 cocoon-2.1/src/idl/cocoon/_module.idl
Index: _module.idl
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/idl/cocoon/_module.idl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- _module.idl 17 Mar 2003 23:29:24 -0000 1.3
+++ _module.idl 18 Mar 2003 00:53:37 -0000 1.4
@@ -55,18 +55,26 @@
* ------------------------------------------------------------------------- */
/**
- * The <b>flow</b> module defines the object model used by the <b>Flow</b>
+ * The <b>cocoon</b> module defines the object model used by the <b>Flow</b>
* system available on <b>Apache Cocoon 2.1</b>.
*/
-module flow {
+module cocoon {
// Interfaces definitions.
+ interface Cocoon;
+ interface Context;
+ interface Log;
+ interface Request;
interface Script;
// Interfaces inclusions.
- #include "cocoon/flow/Script.idl"
+ #include "cocoon/Cocoon.idl"
+ #include "cocoon/Context.idl"
+ #include "cocoon/Log.idl"
+ #include "cocoon/Request.idl"
+ #include "cocoon/Script.idl"
// Sub-modules inclusions.
- #include "cocoon/flow/javascript/_module.idl"
+ //#include "cocoon/javascript/_module.idl"
};
1.1 cocoon-2.1/src/idl/cocoon/Cocoon.idl
Index: Cocoon.idl
===================================================================
/* ========================================================================= *
* 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 <http://www.apache.org/>." *
* *
* 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 *
* <mailto:[EMAIL PROTECTED]>. *
* *
* 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 <mailto:[EMAIL PROTECTED]>. For more information *
* about the Apache Software Foundation please see <http://www.apache.org/>. *
* *
* ------------------------------------------------------------------------- */
/**
* <p>
* The <code>Cocoon</code> interface defines the main Cocoon liaison
* available to flow scripts.
* </p>
*/
interface Cocoon {
/**
* The current <b>Log</b> instance used for logging.
* <i>(suggested by Jeremy Quinn)</i>.
*/
readonly attribute cocoon::Log log;
/**
* The current <b>Request</b> instance associated with this script.
* <i>(suggested by Stefano Mazzocchi)</i>
*/
readonly attribute cocoon::Request request;
/**
* The current <b>Context</b> instance.
* <i>(suggested by Stefano Mazzocchi)</i>
* <p><b>NOTE: "<code>context</code>" is a reserved word in
* IDL (at least it seems so). This name has been mangled accordingly
* to allow IDLDoc to produce the documentation.</b></p>
*/
readonly attribute cocoon::Context contxt;
/**
* <p>
* Passes control to the Cocoon sitemap to generate the output page.
* </p>
* <p>
* TODO: What happens when the control returns to a script which (for
* example) calls again <code>sendPage(AndWait)</code>???
* </p>
*
* @param uri the relative URL of the page to be sent back to the client.
* @param bean a context object which can be accessed inside this page to
* extract various values and place them in the generated page.
*/
void sendPage(in string url, in Object bean)
raises (java::Exception);
/**
* <p>
* Passes control to the Cocoon sitemap to generate the output page,
* interrupting the execution until another request comes in.
* </p>
* <p>
* The flow script is suspended after the page is generated and the
* whole execution stack saved in a continuation.
* </p>
*
* @param uri the relative URL of the page to be sent back to the client.
* @param bean a context object which can be accessed inside this page to
* extract various values and place them in the generated page.
*/
void sendPageAndWait(in string url, in Object bean)
raises (java::Exception);
};
1.1 cocoon-2.1/src/idl/cocoon/Context.idl
Index: Context.idl
===================================================================
/* ========================================================================= *
* 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 <http://www.apache.org/>." *
* *
* 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 *
* <mailto:[EMAIL PROTECTED]>. *
* *
* 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 <mailto:[EMAIL PROTECTED]>. For more information *
* about the Apache Software Foundation please see <http://www.apache.org/>. *
* *
* ------------------------------------------------------------------------- */
/**
* <p>
* <b>(TODO)</b> The <code>Context</code> object.
* </p>
*/
interface Context {
};
1.1 cocoon-2.1/src/idl/cocoon/Log.idl
Index: Log.idl
===================================================================
/* ========================================================================= *
* 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 <http://www.apache.org/>." *
* *
* 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 *
* <mailto:[EMAIL PROTECTED]>. *
* *
* 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 <mailto:[EMAIL PROTECTED]>. For more information *
* about the Apache Software Foundation please see <http://www.apache.org/>. *
* *
* ------------------------------------------------------------------------- */
/**
* <p>
* The <code>Log</code> interface defines a way for flow scripts to report
* messages and errors to the Cocoon logging facility.
* </p>
*/
interface Log {
/**
* Log an informative message.
*
* @param message The message to log.
*/
void info (in string message);
/**
* Log an error message.
*
* @param message The message to log.
*/
void error (in string message);
/**
* Log a debug message.
*
* @param message The message to log.
*/
void debug (in string message);
};
1.1 cocoon-2.1/src/idl/cocoon/Request.idl
Index: Request.idl
===================================================================
/* ========================================================================= *
* 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 <http://www.apache.org/>." *
* *
* 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 *
* <mailto:[EMAIL PROTECTED]>. *
* *
* 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 <mailto:[EMAIL PROTECTED]>. For more information *
* about the Apache Software Foundation please see <http://www.apache.org/>. *
* *
* ------------------------------------------------------------------------- */
/**
* <p>
* <b>(TODO)</b> The <code>Request</code> object.
* </p>
*/
interface Request {
};