cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/linotype/java/org/apache/cocoon/components SourceRepository.java
Date Sun, 16 Nov 2003 00:28:40 GMT
vgritsenko    2003/11/15 16:28:40

  Modified:    src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript
                        auth.js
               src/blocks/cron/samples docs.xml
               src/blocks/eventcache/conf eventcache.xconf
                        eventcache.xsamples eventregistry.xconf
               src/blocks/eventcache/samples event.js eventcache.xsp
                        sitemap.xmap
               src/blocks/linotype/conf linotype.xsamples
               src/blocks/linotype/java/org/apache/cocoon/components
                        SourceRepository.java
  Log:
  line endings
  
  Revision  Changes    Path
  1.6       +135 -135  cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript/auth.js
  
  Index: auth.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript/auth.js,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- auth.js	21 Sep 2003 12:01:17 -0000	1.5
  +++ auth.js	16 Nov 2003 00:28:40 -0000	1.6
  @@ -1,136 +1,136 @@
  -/*
  - ============================================================================
  -                   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 modifica-
  - tion, 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
  -    apache@apache.org.
  -
  - 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  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  - ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  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 individuals
  - on  behalf of the Apache Software  Foundation and was  originally created by
  - Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache
  - Software Foundation, please see <http://www.apache.org/>.
  -
  -*/
  -
  -/**
  - * Flow/Javascript wrapper to Cocoon authentication framework.
  - *
  - * WARNING   -  THIS IS EXPERIMENTAL STUFF!!! Use it at your own risk
  - *
  - * @author <a href="mailto:uv@upaya.co.uk">Upayavira</a>
  - * @version CVS $Id$
  -*/
  -
  -function auth_checkAuthentication(handler, application) {
  -
  -    var authMgr = null;
  -    var authenticated = false;
  -    try {
  -        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  -
  -        // do authentication
  -        authenticated = authMgr.checkAuthentication(null, handler, application);
  -        if (!authenticated) {
  -            cocoon.redirectTo(authMgr.getForwardingURI(handler));
  -        }
  -    } finally {
  -        cocoon.releaseComponent(authMgr);
  -    }
  -    return authenticated;
  -}
  -
  -function auth_isAuthenticated(handler) {
  -    var authMgr = null;
  -    try {
  -        // ApplicationName, do we need it?
  -        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  -        
  -        var userHandler = authMgr.isAuthenticated(handler);
  -        return (userHandler!=null);
  -    } finally {
  -        cocoon.releaseComponent(authMgr);
  -    }
  -}
  -
  -function auth_login(handler, application, params) {
  -
  -    var authParams = new Packages.org.apache.excalibur.source.SourceParameters();
  -    for (var name in params) {
  -      if (name.substring(0,10).equals("parameter_")) {
  -        authParams.setParameter(name.substring(10), params[name]);
  -      }
  -    }
  -    
  -    var authMgr = null;
  -    try {
  -        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  -        return authMgr.login( handler, application, authParams) != null;
  -    } finally {
  -        cocoon.releaseComponent(authMgr);
  -    }
  -}
  -
  -function auth_logout(handler, modeString) {
  -    var mode;
  -    if ( modeString == null | modeString == "" || modeString == "if-not-authenticated" ) {
  -        mode = Packages.org.apache.cocoon.webapps.authentication.AuthenticationConstants.LOGOUT_MODE_IF_NOT_AUTHENTICATED;
  -    } else if ( modeString == "if-unused" ) {
  -        mode = Packages.org.apache.cocoon.webapps.authentication.AuthenticationConstants.LOGOUT_MODE_IF_UNUSED;
  -    } else if ( modeString == "immediately" ) {
  -        mode = Packages.org.apache.cocoon.webapps.authentication.AuthenticationConstants.LOGOUT_MODE_IMMEDIATELY;
  -    } else {
  -       throw new Error("Unknown mode"); // " + modeString);
  -    }
  -
  -    var authMgr = null;
  -    try {
  -        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  -        var state = authMgr.getState();
  -
  -        if (handler == null && state!=null) {
  -            handler = state.getHandlerName();
  -        }
  -
  -        if ( null == handler )
  -            throw new Error("LogoutAction requires at least the handler parameter.");
  -        authMgr.logout( handler, mode );
  -    } finally {
  -        cocoon.releaseComponent(authMgr);
  -    }
  +/*
  + ============================================================================
  +                   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 modifica-
  + tion, 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
  +    apache@apache.org.
  +
  + 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  DAMAGES (INCLU-
  + DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  + OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  + ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  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 individuals
  + on  behalf of the Apache Software  Foundation and was  originally created by
  + Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache
  + Software Foundation, please see <http://www.apache.org/>.
  +
  +*/
  +
  +/**
  + * Flow/Javascript wrapper to Cocoon authentication framework.
  + *
  + * WARNING   -  THIS IS EXPERIMENTAL STUFF!!! Use it at your own risk
  + *
  + * @author <a href="mailto:uv@upaya.co.uk">Upayavira</a>
  + * @version CVS $Id$
  +*/
  +
  +function auth_checkAuthentication(handler, application) {
  +
  +    var authMgr = null;
  +    var authenticated = false;
  +    try {
  +        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  +
  +        // do authentication
  +        authenticated = authMgr.checkAuthentication(null, handler, application);
  +        if (!authenticated) {
  +            cocoon.redirectTo(authMgr.getForwardingURI(handler));
  +        }
  +    } finally {
  +        cocoon.releaseComponent(authMgr);
  +    }
  +    return authenticated;
  +}
  +
  +function auth_isAuthenticated(handler) {
  +    var authMgr = null;
  +    try {
  +        // ApplicationName, do we need it?
  +        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  +        
  +        var userHandler = authMgr.isAuthenticated(handler);
  +        return (userHandler!=null);
  +    } finally {
  +        cocoon.releaseComponent(authMgr);
  +    }
  +}
  +
  +function auth_login(handler, application, params) {
  +
  +    var authParams = new Packages.org.apache.excalibur.source.SourceParameters();
  +    for (var name in params) {
  +      if (name.substring(0,10).equals("parameter_")) {
  +        authParams.setParameter(name.substring(10), params[name]);
  +      }
  +    }
  +    
  +    var authMgr = null;
  +    try {
  +        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  +        return authMgr.login( handler, application, authParams) != null;
  +    } finally {
  +        cocoon.releaseComponent(authMgr);
  +    }
  +}
  +
  +function auth_logout(handler, modeString) {
  +    var mode;
  +    if ( modeString == null | modeString == "" || modeString == "if-not-authenticated" ) {
  +        mode = Packages.org.apache.cocoon.webapps.authentication.AuthenticationConstants.LOGOUT_MODE_IF_NOT_AUTHENTICATED;
  +    } else if ( modeString == "if-unused" ) {
  +        mode = Packages.org.apache.cocoon.webapps.authentication.AuthenticationConstants.LOGOUT_MODE_IF_UNUSED;
  +    } else if ( modeString == "immediately" ) {
  +        mode = Packages.org.apache.cocoon.webapps.authentication.AuthenticationConstants.LOGOUT_MODE_IMMEDIATELY;
  +    } else {
  +       throw new Error("Unknown mode"); // " + modeString);
  +    }
  +
  +    var authMgr = null;
  +    try {
  +        authMgr = cocoon.getComponent(Packages.org.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  +        var state = authMgr.getState();
  +
  +        if (handler == null && state!=null) {
  +            handler = state.getHandlerName();
  +        }
  +
  +        if ( null == handler )
  +            throw new Error("LogoutAction requires at least the handler parameter.");
  +        authMgr.logout( handler, mode );
  +    } finally {
  +        cocoon.releaseComponent(authMgr);
  +    }
   }
  
  
  
  1.3       +92 -92    cocoon-2.1/src/blocks/cron/samples/docs.xml
  
  Index: docs.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/cron/samples/docs.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- docs.xml	4 Sep 2003 16:00:16 -0000	1.2
  +++ docs.xml	16 Nov 2003 00:28:40 -0000	1.3
  @@ -1,39 +1,40 @@
   <?xml version="1.0" encoding="UTF-8"?>
  +
   <document>
       <body>
           <section>
  -		    <title>Cron Job Scheduler</title>
  -		
  -		    <p>
  -		        This implementation of the Java interface 
  -		        <link href="/api/java/org/apache/cocoon/components/cron/JobScheduler.html">
  -		        <code>JobScheduler</code></link> 
  -		        is based on the <link href="http://quartz.sf.net">Quartz</link>
  -		        job scheduling project and the 
  -		        <link href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.html">
  -		        <code>PooledExecutor</code></link> of 
  -		        <link href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
  -		        Doug Leas Concurrency Package</link> as a ThreadPool implementation for the Quartz Scheduler.
  -		    </p>
  -		    
  -		    <p style="background-color: yellow">
  -		        <strong>WARNING:</strong> Consider the <link href="/api/java/org/apache/cocoon/components/cron/JobScheduler.html">
  -		        <code>JobScheduler</code></link> interface as beta in terms of defined functionality as it will be 
  -		        extended with additional requirements in the near future (i.e. getJobList). 
  -		    </p>
  -		
  -		    <p>
  -		        This <link href="/api/java/org/apache/cocoon/components/cron/QuartzJobScheduler.html">
  -		        <code>QuartzJobScheduler</code></link> implementation is written as a standard 
  -		        <link href="http://avalon.apache.org/">Avalon</link> component. So, its definition you'll find in the
  -		        <code>cocoon.xconf</code> file of Cocoon if you've included the cron-block in your build (see 
  -		        block.properties or local.block.properties file respectively).
  -		    </p>
  -		
  -			<p>
  -			    The snippet below shows the configuration example of the component itself:
  -			</p>
  -		    <source>
  +            <title>Cron Job Scheduler</title>
  +        
  +            <p>
  +                This implementation of the Java interface 
  +                <link href="/api/java/org/apache/cocoon/components/cron/JobScheduler.html">
  +                <code>JobScheduler</code></link> 
  +                is based on the <link href="http://quartz.sf.net">Quartz</link>
  +                job scheduling project and the 
  +                <link href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.html">
  +                <code>PooledExecutor</code></link> of 
  +                <link href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
  +                Doug Leas Concurrency Package</link> as a ThreadPool implementation for the Quartz Scheduler.
  +            </p>
  +            
  +            <p style="background-color: yellow">
  +                <strong>WARNING:</strong> Consider the <link href="/api/java/org/apache/cocoon/components/cron/JobScheduler.html">
  +                <code>JobScheduler</code></link> interface as beta in terms of defined functionality as it will be 
  +                extended with additional requirements in the near future (i.e. getJobList). 
  +            </p>
  +        
  +            <p>
  +                This <link href="/api/java/org/apache/cocoon/components/cron/QuartzJobScheduler.html">
  +                <code>QuartzJobScheduler</code></link> implementation is written as a standard 
  +                <link href="http://avalon.apache.org/">Avalon</link> component. So, its definition you'll find in the
  +                <code>cocoon.xconf</code> file of Cocoon if you've included the cron-block in your build (see 
  +                block.properties or local.block.properties file respectively).
  +            </p>
  +        
  +            <p>
  +                The snippet below shows the configuration example of the component itself:
  +            </p>
  +            <source>
   &lt;component role="org.apache.cocoon.components.cron.JobScheduler"
              class="org.apache.cocoon.components.cron.QuartzJobScheduler"
              logger="cron"&gt;
  @@ -44,23 +45,23 @@
           ...
       &lt;/triggers&gt;
   &lt;/component&gt;
  -		    </source>
  -	
  -	        <p>
  -	            There is nothing special about it. As you could see from the snippet above, inside the job 
  -	            scheduler component definition there are two parts:
  -	            <ul>
  -	                <li>ThreadPool definition</li>
  -	                <li>Trigger definitions</li>
  -	            </ul>
  -	        </p>	        
  +            </source>
  +    
  +            <p>
  +                There is nothing special about it. As you could see from the snippet above, inside the job 
  +                scheduler component definition there are two parts:
  +                <ul>
  +                    <li>ThreadPool definition</li>
  +                    <li>Trigger definitions</li>
  +                </ul>
  +            </p>            
   
               <section>
  -                <title>ThreadPool</title>	
  -		        <p>
  -		            The ThreadPool definition look like this:
  -		        </p>
  -		        <source>
  +                <title>ThreadPool</title>    
  +                <p>
  +                    The ThreadPool definition look like this:
  +                </p>
  +                <source>
   &lt;!-- Definitions for a thread pool used to schedule jobs --&gt;
   &lt;thread-pool&gt;
   
  @@ -95,22 +96,22 @@
       &lt;!-- The maximum time to wait for running jobs to complete. Defaults to unlimited time (&lt;0 == default) --&gt;
       &lt;shutdown-wait-time-ms&gt;5000&lt;/shutdown-wait-time-ms&gt;
   &lt;/thread-pool&gt;
  -		        </source>
  -		        <p>
  -		            As mentioned in the beginning, more information about the thread pool details of the base
  +                </source>
  +                <p>
  +                    As mentioned in the beginning, more information about the thread pool details of the base
                       <link href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.html">
                       <code>PooledExecutor</code></link> class can be found there.
                   </p>
  -		    </section>
  -		    
  -	        <section>
  -	            <title>Triggers</title>
  -		        <p>
  -		            The trigger definition section consists of a single <code>&lt;triggers&gt;</code> element with as much as
  -		            needed <code>&lt;trigger&gt;</code> elements inside it. A <code>&lt;trigger&gt;</code> element 
  -		            looks like:
  -		        </p>
  -		        <source>
  +            </section>
  +            
  +            <section>
  +                <title>Triggers</title>
  +                <p>
  +                    The trigger definition section consists of a single <code>&lt;triggers&gt;</code> element with as much as
  +                    needed <code>&lt;trigger&gt;</code> elements inside it. A <code>&lt;trigger&gt;</code> element 
  +                    looks like:
  +                </p>
  +                <source>
   &lt;!-- Definintions of triggers --&gt;
   &lt;triggers&gt;
   
  @@ -148,33 +149,33 @@
           &lt;weekdays&gt;SUN-FRI&lt;/weekdays&gt;
       &lt;/trigger&gt;
   &lt;/triggers&gt;
  -			    </source>
  -			    <p>
  -			        The <code>&lt;cron&gt;</code> element is simply the concatenation of the values of the elements 
  -			        <code>&lt;seconds&gt;</code>, <code>&lt;minutes&gt;</code>, <code>&lt;hours&gt;</code>, 
  -			        <code>&lt;days&gt;</code>, <code>&lt;months&gt;</code>, <code>&lt;weekdays&gt;</code>, and 
  -			        <code>&lt;year&gt;</code> delimeted with spaces. You can use either form but the 
  -			        <code>&lt;cron&gt;</code> element will be preferred by the implementation if you use both forms 
  -			        together in one <code>&lt;trigger&gt;</code> element. A description of the 
  -			        expressions used inside the <code>&lt;trigger&gt;</code> elements is described in the 
  -			        <link href="http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html">
  -		            <code>CronTrigger</code></link> class.
  -		        </p>
  -			</section>
  -		    
  -		    <section>
  -		        <title>Job Components</title>
  -			    <p>
  -			        The 
  -			        <link href="/api/java/org/apache/cocoon/components/cron/CronJob.html"><code>CronJob</code></link> 
  -			        object doing your work can be defined in the <code>cocoon.xconf</code> 
  -			        file as a regular Avalon components. The <code>role</code> attribute given to this component is 
  -			        refered to by the <code>target</code> attribute in the <code>&lt;trigger&gt;</code> element above.
  -			        Below is the sample for the 
  -			        <link href="/api/java/org/apache/cocoon/components/cron/TestCronJob.html">
  -			        <code>TestCronJob</code></link> component.
  -			    </p>
  -			    <source>
  +                </source>
  +                <p>
  +                    The <code>&lt;cron&gt;</code> element is simply the concatenation of the values of the elements 
  +                    <code>&lt;seconds&gt;</code>, <code>&lt;minutes&gt;</code>, <code>&lt;hours&gt;</code>, 
  +                    <code>&lt;days&gt;</code>, <code>&lt;months&gt;</code>, <code>&lt;weekdays&gt;</code>, and 
  +                    <code>&lt;year&gt;</code> delimeted with spaces. You can use either form but the 
  +                    <code>&lt;cron&gt;</code> element will be preferred by the implementation if you use both forms 
  +                    together in one <code>&lt;trigger&gt;</code> element. A description of the 
  +                    expressions used inside the <code>&lt;trigger&gt;</code> elements is described in the 
  +                    <link href="http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html">
  +                    <code>CronTrigger</code></link> class.
  +                </p>
  +            </section>
  +            
  +            <section>
  +                <title>Job Components</title>
  +                <p>
  +                    The 
  +                    <link href="/api/java/org/apache/cocoon/components/cron/CronJob.html"><code>CronJob</code></link> 
  +                    object doing your work can be defined in the <code>cocoon.xconf</code> 
  +                    file as a regular Avalon components. The <code>role</code> attribute given to this component is 
  +                    refered to by the <code>target</code> attribute in the <code>&lt;trigger&gt;</code> element above.
  +                    Below is the sample for the 
  +                    <link href="/api/java/org/apache/cocoon/components/cron/TestCronJob.html">
  +                    <code>TestCronJob</code></link> component.
  +                </p>
  +                <source>
   &lt;!-- sample definition of cron job --&gt;
   &lt;component role="org.apache.cocoon.components.cron.CronJob/test"
              class="org.apache.cocoon.components.cron.TestCronJob"
  @@ -182,17 +183,16 @@
       &lt;msg&gt;I'm here&lt;/msg&gt;
       &lt;sleep&gt;23000&lt;/sleep&gt;
   &lt;/component&gt;
  -			    </source>
  +                </source>
               </section>
   
               <section>
                   <title>Samples</title>
                   <p>
                       Now you should take a look at the samples to show you how the API of the 
  -           		    <link href="cron.html"><code>JobScheduler</code></link> can be used.
  -           		</p>
  +                    <link href="cron.html"><code>JobScheduler</code></link> can be used.
  +                </p>
               </section>
  -
           </section>
       </body>
  -</document>
  \ No newline at end of file
  +</document>
  
  
  
  1.3       +6 -5      cocoon-2.1/src/blocks/eventcache/conf/eventcache.xconf
  
  Index: eventcache.xconf
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/conf/eventcache.xconf,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- eventcache.xconf	11 Aug 2003 09:50:40 -0000	1.2
  +++ eventcache.xconf	16 Nov 2003 00:28:40 -0000	1.3
  @@ -1,5 +1,6 @@
  -<?xml version="1.0"?>
  -<xconf xpath="/cocoon" unless="component[@class='org.apache.cocoon.caching.impl.EventAwareCacheImpl']">
  -	<component role="org.apache.cocoon.caching.Cache/EventAware"
  -               class="org.apache.cocoon.caching.impl.EventAwareCacheImpl"/>
  -</xconf>
  +<?xml version="1.0"?>
  +
  +<xconf xpath="/cocoon" unless="component[@class='org.apache.cocoon.caching.impl.EventAwareCacheImpl']">
  +    <component role="org.apache.cocoon.caching.Cache/EventAware"
  +               class="org.apache.cocoon.caching.impl.EventAwareCacheImpl"/>
  +</xconf>
  
  
  
  1.2       +11 -11    cocoon-2.1/src/blocks/eventcache/conf/eventcache.xsamples
  
  Index: eventcache.xsamples
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/conf/eventcache.xsamples,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- eventcache.xsamples	14 Jul 2003 02:50:45 -0000	1.1
  +++ eventcache.xsamples	16 Nov 2003 00:28:40 -0000	1.2
  @@ -1,11 +1,11 @@
  -<?xml version="1.0"?>
  -
  -<xsamples xpath="/samples" unless="group[@name='Event Based Cache']">
  -  <group name="Event Based Cache">
  -  	<sample name="Event Based Cache" href="eventcache/demo?pageKey=one">
  -  	  A sample demonstrating a new system of cache invalidation based on 
  -  	  events usually external to Cocoon.  Example uses include cache content 
  -  	  until a back-end database is updated, or EJB signals an update.
  -  	</sample>
  -  </group>
  -</xsamples>
  +<?xml version="1.0"?>
  +
  +<xsamples xpath="/samples" unless="group[@name='Event Based Cache']">
  +  <group name="Event Based Cache">
  +    <sample name="Event Based Cache" href="eventcache/demo?pageKey=one">
  +      A sample demonstrating a new system of cache invalidation based on 
  +      events usually external to Cocoon.  Example uses include cache content 
  +      until a back-end database is updated, or EJB signals an update.
  +    </sample>
  +  </group>
  +</xsamples>
  
  
  
  1.2       +6 -4      cocoon-2.1/src/blocks/eventcache/conf/eventregistry.xconf
  
  Index: eventregistry.xconf
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/conf/eventregistry.xconf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- eventregistry.xconf	14 Jul 2003 02:50:45 -0000	1.1
  +++ eventregistry.xconf	16 Nov 2003 00:28:40 -0000	1.2
  @@ -1,7 +1,9 @@
   <?xml version="1.0"?>
  +
   <xconf xpath="/cocoon" 
  -	   unless="component[@class='org.apache.cocoon.caching.impl.DefaultEventRegistryImpl']">
  -	<!-- The event registry which maps Cache events to Pipeline keys -->
  -	<component role="org.apache.cocoon.caching.EventRegistry"
  -        	   class="org.apache.cocoon.caching.impl.DefaultEventRegistryImpl"/>
  +       unless="component[@class='org.apache.cocoon.caching.impl.DefaultEventRegistryImpl']">
  +
  +  <!-- The event registry which maps Cache events to Pipeline keys -->
  +  <component role="org.apache.cocoon.caching.EventRegistry"
  +             class="org.apache.cocoon.caching.impl.DefaultEventRegistryImpl"/>
   </xconf>
  
  
  
  1.4       +10 -10    cocoon-2.1/src/blocks/eventcache/samples/event.js
  
  Index: event.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/samples/event.js,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- event.js	2 Oct 2003 04:21:17 -0000	1.3
  +++ event.js	16 Nov 2003 00:28:40 -0000	1.4
  @@ -1,10 +1,10 @@
  -var role = Packages.org.apache.cocoon.caching.Cache.ROLE + "/EventAware";
  -
  -function cacheEvent() {
  -	var cache = cocoon.getComponent(role);
  -	var event = new Packages.org.apache.cocoon.caching.validity.NamedEvent(cocoon.request.event);
  -	var rand = Math.random() * 10000000000000000000;
  -	cache.processEvent(event);
  -	cocoon.releaseComponent(cache);
  -	cocoon.redirectTo("demo?pageKey=" + cocoon.request.pageKey + "&rand="+rand);
  -}
  \ No newline at end of file
  +var role = Packages.org.apache.cocoon.caching.Cache.ROLE + "/EventAware";
  +
  +function cacheEvent() {
  +    var cache = cocoon.getComponent(role);
  +    var event = new Packages.org.apache.cocoon.caching.validity.NamedEvent(cocoon.request.event);
  +    var rand = Math.random() * 10000000000000000000;
  +    cache.processEvent(event);
  +    cocoon.releaseComponent(cache);
  +    cocoon.redirectTo("demo?pageKey=" + cocoon.request.pageKey + "&rand="+rand);
  +}
  
  
  
  1.3       +153 -155  cocoon-2.1/src/blocks/eventcache/samples/eventcache.xsp
  
  Index: eventcache.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/samples/eventcache.xsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- eventcache.xsp	2 Oct 2003 04:21:17 -0000	1.2
  +++ eventcache.xsp	16 Nov 2003 00:28:40 -0000	1.3
  @@ -1,155 +1,153 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!--
  -    XSP event-based cache sample.
  -
  -    Cvs $Id$
  - -->
  -
  -
  -<xsp:page language="java"
  -          xmlns:xsp="http://apache.org/xsp"
  -          xmlns:xsp-request="http://apache.org/xsp/request/2.0">
  -
  -<xsp:structure>
  -    <xsp:include>org.apache.excalibur.source.SourceValidity</xsp:include>
  -    <xsp:include>org.apache.cocoon.caching.validity.EventValidity</xsp:include>
  -    <xsp:include>org.apache.cocoon.caching.validity.NamedEvent</xsp:include>
  -    <xsp:include>java.io.Serializable</xsp:include>
  -</xsp:structure>
  -
  -<xsp:logic>
  -
  -    // artificial slowdown to make the effects of the cache visible
  -    final int DELAY_SECS = 2;
  -
  -    /**
  -    * Generate the unique key for the cache.
  -    *
  -    * This key must be unique inside the space of this XSP page, it is used
  -    * to find the page contents in the cache (if getValidity says that the
  -    * contents are still valid).
  -    *
  -    * This method will be invoked before the getValidity() method.
  -    *
  -    * @return The generated key or null if the component
  -    *         is currently not cacheable.
  -    */
  -    public Serializable getKey()
  -    {
  -       // for our test, pages having the same value of "pageKey" will share
  -       // the same cache location
  -       String key = request.getParameter("pageKey") ;
  -       return ((key==null||"".equals(key)) ? "one" : key);
  -    }
  -
  -    /**
  -    * Generate the validity object, tells the cache how long to
  -    * keep contents having this key around.  In this case, it will 
  -    * be until an Event is retrieved matching the NamedEvent created below.
  -    *
  -    * Before this method can be invoked the getKey() method
  -    * will be invoked.
  -    *
  -    * @return The generated validity object or null if the
  -    *         component is currently not cacheable.
  -    */
  -    public SourceValidity getValidity() {
  -       String key = request.getParameter("pageKey") ;
  -       return new EventValidity(
  -       			new NamedEvent(
  -       				(key==null||"".equals(key)) ? "one" : key));
  -    }
  - </xsp:logic>
  -
  -
  -  <page>
  -    <title>Demonstrating Event-Aware Caching</title>
  -    <content>
  -    	<para>
  -	    	This xsp page is based on (copied from) the cacheable xsp sample 
  -	    	but there are some important differences.  If you don't already 
  -	    	understand at least the basics of caching in Cocoon, you should 
  -	    	probably start there, not here.  Read the text below, and the 
  -	    	sitemap and source for more details.
  -    	</para>
  -        <para>
  -            I pause for <xsp:expr>DELAY_SECS</xsp:expr> seconds during generation, so 
  -            that you can tell if I'm being served from the cache or not.
  -            <br/>
  -            What you see here was generated on <b><xsp:expr>new java.util.Date()</xsp:expr></b>.
  -        </para>
  -
  -        <para>
  -            I'm cached for each unique value of request parameter 'pageKey'.  Other 
  -            parameters do not matter.
  -            <br/>
  -            Here the value is:
  -            <b><xsp-request:get-parameter name="pageKey"/></b>.  
  -            <br/>
  -            If this is not the same as the 'pageKey' parameter in the page URL, we have a problem.
  -        </para>
  -
  -		<para>
  -			Unlike other cacheable pages in Cocoon, I can be un-cached by events external 
  -			to Cocoon - for instance, when a database table or row is updated.
  -			<br/>
  -			My cache entry will be invalidated (actually, removed) when an event named 
  -			<i><xsp-request:get-parameter name="pageKey"/></i> occurs.  This can be manually 
  -			simulated by clicking one of the "uncache" links below.
  -		</para>
  -        <para>Test links:
  -            <ul>
  -                <li><a href="?pageKey=one">pageKey=one</a> 
  -                	(<a href="action?pageKey=one&amp;event=one">uncache with action</a>) 
  -                	(<a href="flow?pageKey=one&amp;event=one">uncache with flow</a>)</li>
  -                <li><a href="?pageKey=two">pageKey=two</a>
  -                	(<a href="action?pageKey=two&amp;event=two">uncache with action</a>) 
  -                	(<a href="flow?pageKey=two&amp;event=two">uncache with flow</a>)</li>
  -            </ul>
  -            Note: the random numbers you see included in the url after an uncache link 
  -            serve two purposes in the example, making it easier to see the effect of the 
  -            cache invalidation.  They prevent browser caching and they demonstrate that 
  -            only our designated key matters in the retrieval from cache.  
  -        </para>
  -        <para>
  -			This event based cache system consists essentially of three parts:
  -			<ul>
  -				<li>A new type of SourceValidity, EventValidity, which contains information 
  -				on the Event which will invalidate this cached content.  Until this event is 
  -				received, EventValidities will usually always return valid, though they don't 
  -				have to.</li>
  -				<li>An extension to Cocoon's Cache implementation.  Cocoon's Cache is really just 
  -				a thin wrapper around Avalon-Excalibur's Store project.  The EventAwareCacheImpl 
  -				does two things.  It examines each pipeline on its way into the cache to 
  -				determine if any of its SourceValidities are instances of EventValidity.  If so, 
  -				it notifies an event registry as described next.  The second critical function of 
  -				the EventAware cache implementation is that it allows other components to 
  -				contact it and notify it of an Event.  The Cache then looks up the keys 
  -				mapped to that event in the event registry and cleans out the cache and 
  -				registry accordingly.  <i>See the sitemap of this sample for an example of 
  -				configuring a pipeline to use this implementation.</i></li>
  -				<li>The EventRegistry is responsible for mapping Events to cache keys, and 
  -				providing information about that mapping to systems that need it, usually just 
  -				the EventAwareCache.  Another crucial responsibility of the EventRegistry is to 
  -				persist its data across container shutdown and startup.  The default implementation 
  -				does by serializing an object to disk (currently in WEB-INF).  If recovering this 
  -				fails, the EventAwareCache is notified, and it is expected to ensure there are no 
  -				orphaned EventValidities (currently by clearing the entire cache).
  -				</li>
  -			</ul>
  -			Note that though this example uses xsp with actions or flow, any pipeline component can be 
  -			made to use EventValidity, and any code with access to the ComponentManager can 
  -			translate real-world events to Events and notify the Cache of them.  
  -        </para>
  -        <xsp:logic>
  -          // slowdown page generation.
  -            try {
  -              Thread.sleep(DELAY_SECS * 1000L);
  -            } catch (InterruptedException ie) {
  -              // Not much that can be done...
  -            }
  -        </xsp:logic>
  -    </content>
  -  </page>
  -</xsp:page>
  \ No newline at end of file
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +
  +<!--+
  +    | XSP event-based cache sample.
  +    |
  +    | CVS $Id$
  +    +-->
  +
  +<xsp:page language="java"
  +          xmlns:xsp="http://apache.org/xsp"
  +          xmlns:xsp-request="http://apache.org/xsp/request/2.0">
  +
  +<xsp:structure>
  +    <xsp:include>org.apache.excalibur.source.SourceValidity</xsp:include>
  +    <xsp:include>org.apache.cocoon.caching.validity.EventValidity</xsp:include>
  +    <xsp:include>org.apache.cocoon.caching.validity.NamedEvent</xsp:include>
  +    <xsp:include>java.io.Serializable</xsp:include>
  +</xsp:structure>
  +
  +<xsp:logic>
  +    // artificial slowdown to make the effects of the cache visible
  +    final int DELAY_SECS = 2;
  +
  +    /**
  +     * Generate the unique key for the cache.
  +     *
  +     * This key must be unique inside the space of this XSP page, it is used
  +     * to find the page contents in the cache (if getValidity says that the
  +     * contents are still valid).
  +     *
  +     * This method will be invoked before the getValidity() method.
  +     *
  +     * @return The generated key or null if the component
  +     *         is currently not cacheable.
  +     */
  +    public Serializable getKey()
  +    {
  +       // for our test, pages having the same value of "pageKey" will share
  +       // the same cache location
  +       String key = request.getParameter("pageKey") ;
  +       return ((key==null||"".equals(key)) ? "one" : key);
  +    }
  +
  +    /**
  +     * Generate the validity object, tells the cache how long to
  +     * keep contents having this key around.  In this case, it will 
  +     * be until an Event is retrieved matching the NamedEvent created below.
  +     *
  +     * Before this method can be invoked the getKey() method
  +     * will be invoked.
  +     *
  +     * @return The generated validity object or null if the
  +     *         component is currently not cacheable.
  +     */
  +    public SourceValidity getValidity() {
  +       String key = request.getParameter("pageKey") ;
  +       return new EventValidity(
  +                   new NamedEvent(
  +                       (key==null||"".equals(key)) ? "one" : key));
  +    }
  + </xsp:logic>
  +
  +
  +  <page>
  +    <title>Demonstrating Event-Aware Caching</title>
  +    <content>
  +        <para>
  +            This xsp page is based on (copied from) the cacheable xsp sample 
  +            but there are some important differences.  If you don't already 
  +            understand at least the basics of caching in Cocoon, you should 
  +            probably start there, not here.  Read the text below, and the 
  +            sitemap and source for more details.
  +        </para>
  +        <para>
  +            I pause for <xsp:expr>DELAY_SECS</xsp:expr> seconds during generation, so 
  +            that you can tell if I'm being served from the cache or not.
  +            <br/>
  +            What you see here was generated on <b><xsp:expr>new java.util.Date()</xsp:expr></b>.
  +        </para>
  +
  +        <para>
  +            I'm cached for each unique value of request parameter 'pageKey'.  Other 
  +            parameters do not matter.
  +            <br/>
  +            Here the value is:
  +            <b><xsp-request:get-parameter name="pageKey"/></b>.  
  +            <br/>
  +            If this is not the same as the 'pageKey' parameter in the page URL, we have a problem.
  +        </para>
  +
  +        <para>
  +            Unlike other cacheable pages in Cocoon, I can be un-cached by events external 
  +            to Cocoon - for instance, when a database table or row is updated.
  +            <br/>
  +            My cache entry will be invalidated (actually, removed) when an event named 
  +            <i><xsp-request:get-parameter name="pageKey"/></i> occurs.  This can be manually 
  +            simulated by clicking one of the "uncache" links below.
  +        </para>
  +        <para>Test links:
  +            <ul>
  +                <li><a href="?pageKey=one">pageKey=one</a> 
  +                    (<a href="action?pageKey=one&amp;event=one">uncache with action</a>) 
  +                    (<a href="flow?pageKey=one&amp;event=one">uncache with flow</a>)</li>
  +                <li><a href="?pageKey=two">pageKey=two</a>
  +                    (<a href="action?pageKey=two&amp;event=two">uncache with action</a>) 
  +                    (<a href="flow?pageKey=two&amp;event=two">uncache with flow</a>)</li>
  +            </ul>
  +            Note: the random numbers you see included in the url after an uncache link 
  +            serve two purposes in the example, making it easier to see the effect of the 
  +            cache invalidation.  They prevent browser caching and they demonstrate that 
  +            only our designated key matters in the retrieval from cache.  
  +        </para>
  +        <para>
  +            This event based cache system consists essentially of three parts:
  +            <ul>
  +                <li>A new type of SourceValidity, EventValidity, which contains information 
  +                on the Event which will invalidate this cached content.  Until this event is 
  +                received, EventValidities will usually always return valid, though they don't 
  +                have to.</li>
  +                <li>An extension to Cocoon's Cache implementation.  Cocoon's Cache is really just 
  +                a thin wrapper around Avalon-Excalibur's Store project.  The EventAwareCacheImpl 
  +                does two things.  It examines each pipeline on its way into the cache to 
  +                determine if any of its SourceValidities are instances of EventValidity.  If so, 
  +                it notifies an event registry as described next.  The second critical function of 
  +                the EventAware cache implementation is that it allows other components to 
  +                contact it and notify it of an Event.  The Cache then looks up the keys 
  +                mapped to that event in the event registry and cleans out the cache and 
  +                registry accordingly.  <i>See the sitemap of this sample for an example of 
  +                configuring a pipeline to use this implementation.</i></li>
  +                <li>The EventRegistry is responsible for mapping Events to cache keys, and 
  +                providing information about that mapping to systems that need it, usually just 
  +                the EventAwareCache.  Another crucial responsibility of the EventRegistry is to 
  +                persist its data across container shutdown and startup.  The default implementation 
  +                does by serializing an object to disk (currently in WEB-INF).  If recovering this 
  +                fails, the EventAwareCache is notified, and it is expected to ensure there are no 
  +                orphaned EventValidities (currently by clearing the entire cache).
  +                </li>
  +            </ul>
  +            Note that though this example uses xsp with actions or flow, any pipeline component can be 
  +            made to use EventValidity, and any code with access to the ComponentManager can 
  +            translate real-world events to Events and notify the Cache of them.  
  +        </para>
  +        <xsp:logic>
  +          // slowdown page generation.
  +            try {
  +              Thread.sleep(DELAY_SECS * 1000L);
  +            } catch (InterruptedException ie) {
  +              // Not much that can be done...
  +            }
  +        </xsp:logic>
  +    </content>
  +  </page>
  +</xsp:page>
  
  
  
  1.4       +66 -66    cocoon-2.1/src/blocks/eventcache/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/samples/sitemap.xmap,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sitemap.xmap	2 Oct 2003 04:21:17 -0000	1.3
  +++ sitemap.xmap	16 Nov 2003 00:28:40 -0000	1.4
  @@ -1,66 +1,66 @@
  -<?xml version="1.0"?>
  -
  -<!--
  -  CVS $Id$
  -  
  -  Event Cache Sample
  --->
  -
  -<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  -  <map:components>
  -    <map:generators default="file"/>
  -    <map:transformers default="xslt"/>
  -    <map:readers default="resource"/>
  -    <map:serializers default="html"/>
  -    <map:matchers default="wildcard"/>
  -    <map:selectors default="browser"/>
  -    <map:actions>
  -    	<map:action name="cacheevent" src="org.apache.cocoon.acting.CacheEventAction"/>
  -    </map:actions>
  -    
  -    <map:pipes default="caching">
  -	  <!-- A pipe must be defined configured to use the EventAware cache. -->
  -      <map:pipe name="event-aware" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline">
  -        <parameter name="cache-role" value="org.apache.cocoon.caching.Cache/EventAware"/>
  -      </map:pipe>
  -    </map:pipes>
  -  </map:components> 
  -  
  -  <map:flow language="javascript">
  -     <map:script src="event.js"/>
  -  </map:flow>
  -  
  -  <map:views>
  -    <map:view from-label="content" name="content">
  -      <map:serialize type="xml"/>
  -    </map:view>
  -  </map:views>
  -
  -  <map:pipelines>
  -  	<!-- Our content must occur in a pipeline configured to use our Event Aware cache --> 
  -    <map:pipeline type="event-aware">
  -      
  -      <map:match pattern="flow">
  -      	<map:call function="cacheEvent"/>
  -      </map:match>
  -	  <map:match pattern="action">
  -	  	<map:act type="cacheevent">
  -        	<map:parameter name="event" value="{request-param:event}"/>
  -        </map:act>
  -	  	<map:redirect-to uri="demo?pageKey={request-param:pageKey}&amp;rand={random:x}"/>
  -	  </map:match>
  -      <map:match pattern="*">
  -        <map:generate type="serverpages" src="eventcache.xsp"/>
  -	    <map:transform src="context://samples/stylesheets/dynamic-page2html.xsl">
  -	        <map:parameter name="servletPath" value="{request:servletPath}"/>
  -	        <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  -	        <map:parameter name="contextPath" value="{request:contextPath}"/>
  -	        <map:parameter name="file" value="eventcache.xsp"/>
  -	        <map:parameter name="remove" value="{0}"/>
  -	    </map:transform>
  -        <map:serialize/>
  -      </map:match>
  -    </map:pipeline>
  -  </map:pipelines>
  -</map:sitemap>
  -
  +<?xml version="1.0"?>
  +
  +<!--+
  +    | Event Cache Sample
  +    |
  +    | CVS $Id$
  +    +-->
  +
  +<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:serializers default="html"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +    <map:actions>
  +    	<map:action name="cacheevent" src="org.apache.cocoon.acting.CacheEventAction"/>
  +    </map:actions>
  +    
  +    <map:pipes default="caching">
  +	  <!-- A pipe must be defined configured to use the EventAware cache. -->
  +      <map:pipe name="event-aware" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline">
  +        <parameter name="cache-role" value="org.apache.cocoon.caching.Cache/EventAware"/>
  +      </map:pipe>
  +    </map:pipes>
  +  </map:components> 
  +  
  +  <map:flow language="javascript">
  +     <map:script src="event.js"/>
  +  </map:flow>
  +  
  +  <map:views>
  +    <map:view from-label="content" name="content">
  +      <map:serialize type="xml"/>
  +    </map:view>
  +  </map:views>
  +
  +  <map:pipelines>
  +  	<!-- Our content must occur in a pipeline configured to use our Event Aware cache --> 
  +    <map:pipeline type="event-aware">
  +      
  +      <map:match pattern="flow">
  +      	<map:call function="cacheEvent"/>
  +      </map:match>
  +	  <map:match pattern="action">
  +	  	<map:act type="cacheevent">
  +        	<map:parameter name="event" value="{request-param:event}"/>
  +        </map:act>
  +	  	<map:redirect-to uri="demo?pageKey={request-param:pageKey}&amp;rand={random:x}"/>
  +	  </map:match>
  +      <map:match pattern="*">
  +        <map:generate type="serverpages" src="eventcache.xsp"/>
  +	    <map:transform src="context://samples/stylesheets/dynamic-page2html.xsl">
  +	        <map:parameter name="servletPath" value="{request:servletPath}"/>
  +	        <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  +	        <map:parameter name="contextPath" value="{request:contextPath}"/>
  +	        <map:parameter name="file" value="eventcache.xsp"/>
  +	        <map:parameter name="remove" value="{0}"/>
  +	    </map:transform>
  +        <map:serialize/>
  +      </map:match>
  +    </map:pipeline>
  +  </map:pipelines>
  +</map:sitemap>
  +
  
  
  
  1.2       +11 -11    cocoon-2.1/src/blocks/linotype/conf/linotype.xsamples
  
  Index: linotype.xsamples
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/conf/linotype.xsamples,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- linotype.xsamples	17 Jun 2003 01:32:45 -0000	1.1
  +++ linotype.xsamples	16 Nov 2003 00:28:40 -0000	1.2
  @@ -1,11 +1,11 @@
  -<?xml version="1.0"?>
  -
  -<xsamples xpath="/samples" unless="group[@name='Linotype']">
  -
  -  <group name="Linotype">
  -    <sample name="Blogging Tool" href="linotype/">
  -      This is a demo of a full blown blogging tool written on top of Apache Cocoon.
  -    </sample>
  -  </group>
  -  
  -</xsamples>
  +<?xml version="1.0"?>
  +
  +<xsamples xpath="/samples" unless="group[@name='Linotype']">
  +
  +  <group name="Linotype">
  +    <sample name="Blogging Tool" href="linotype/">
  +      This is a demo of a full blown blogging tool written on top of Apache Cocoon.
  +    </sample>
  +  </group>
  +  
  +</xsamples>
  
  
  
  1.2       +1 -0      cocoon-2.1/src/blocks/linotype/java/org/apache/cocoon/components/SourceRepository.java
  
  Index: SourceRepository.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/linotype/java/org/apache/cocoon/components/SourceRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SourceRepository.java	27 Jul 2003 13:13:10 -0000	1.1
  +++ SourceRepository.java	16 Nov 2003 00:28:40 -0000	1.2
  @@ -70,6 +70,7 @@
   
   /**
    * @author stefano
  + * @version CVS $Id$
    */
   public class SourceRepository {
       
  
  
  

Mime
View raw message