Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 99327 invoked by uid 500); 10 Jan 2003 14:19:46 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 99318 invoked by uid 500); 10 Jan 2003 14:19:46 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 10 Jan 2003 14:19:46 -0000 Message-ID: <20030110141946.93879.qmail@icarus.apache.org> From: cziegeler@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/java/org/apache/cocoon/sitemap ContentAggregator.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N cziegeler 2003/01/10 06:19:46 Modified: src/java/org/apache/cocoon/components/pipeline/impl NewAbstractCachingProcessingPipeline.java src/java/org/apache/cocoon/components/source/impl SitemapSource.java src/java/org/apache/cocoon/sitemap ContentAggregator.java Added: src/java/org/apache/cocoon/components/source/impl SourceDeferredValidity.java Log: First implementation of deferred validities Revision Changes Path 1.3 +3 -2 xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/impl/NewAbstractCachingProcessingPipeline.java Index: NewAbstractCachingProcessingPipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/impl/NewAbstractCachingProcessingPipeline.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- NewAbstractCachingProcessingPipeline.java 10 Jan 2003 10:44:43 -0000 1.2 +++ NewAbstractCachingProcessingPipeline.java 10 Jan 2003 14:19:45 -0000 1.3 @@ -828,11 +828,12 @@ this.serializerRole = null; this.readerRole = null; - this.toCacheKey = null; + this.fromCacheKey = null; this.cachedResponse = null; this.transformerIsCacheableProcessingComponent = null; this.toCacheKey = null; + this.toCacheSourceValidities = null; } /** 1.33 +7 -11 xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java Index: SitemapSource.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- SitemapSource.java 9 Jan 2003 11:27:59 -0000 1.32 +++ SitemapSource.java 10 Jan 2003 14:19:45 -0000 1.33 @@ -69,7 +69,7 @@ import org.apache.excalibur.source.SourceException; import org.apache.excalibur.source.SourceNotFoundException; import org.apache.excalibur.source.SourceValidity; -import org.apache.excalibur.source.impl.validity.AggregatedValidity; +import org.apache.excalibur.source.impl.validity.DeferredAggregatedValidity; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.Locator; @@ -342,15 +342,11 @@ if (redirectURL == null) { SourceValidity[] eventPipelineValidities = this.processingPipeline.getValiditiesForEventPipeline(); if ( eventPipelineValidities != null ) { - if (eventPipelineValidities.length == 1) { - this.sourceValidity = eventPipelineValidities[0]; - } else { - AggregatedValidity av = new AggregatedValidity(); - for(int i=0; i < eventPipelineValidities.length;i++) { - av.add(eventPipelineValidities[i]); - } - this.sourceValidity = av; - } + DeferredAggregatedValidity av = new DeferredAggregatedValidity(); + for(int i=0; i < eventPipelineValidities.length;i++) { + av.add(eventPipelineValidities[i]); + } + this.sourceValidity = av; } } else { 1.1 xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/SourceDeferredValidity.java Index: SourceDeferredValidity.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 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 . For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.components.source.impl; import org.apache.excalibur.source.Source; import org.apache.excalibur.source.SourceValidity; import org.apache.excalibur.source.impl.validity.DeferredValidity; /** * Implementation of a {@link Source} that gets its content * by invoking a pipeline. * * @author Carsten Ziegeler * @version CVS $Id: SourceDeferredValidity.java,v 1.1 2003/01/10 14:19:45 cziegeler Exp $ */ public final class SourceDeferredValidity implements DeferredValidity { private Source source; public SourceDeferredValidity(Source source) { this.source = source; } /** * @see org.apache.excalibur.source.impl.validity.DeferredValidity#getValidity() */ public SourceValidity getValidity() { return this.source.getValidity(); } } 1.10 +3 -3 xml-cocoon2/src/java/org/apache/cocoon/sitemap/ContentAggregator.java Index: ContentAggregator.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/ContentAggregator.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ContentAggregator.java 5 Dec 2002 10:40:08 -0000 1.9 +++ ContentAggregator.java 10 Jan 2003 14:19:45 -0000 1.10 @@ -62,7 +62,7 @@ import org.apache.excalibur.source.Source; import org.apache.excalibur.source.SourceException; import org.apache.excalibur.source.SourceValidity; -import org.apache.excalibur.source.impl.validity.AggregatedValidity; +import org.apache.excalibur.source.impl.validity.DeferredAggregatedValidity; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; @@ -210,7 +210,7 @@ */ public SourceValidity generateValidity() { try { - AggregatedValidity v = new AggregatedValidity(); + DeferredAggregatedValidity v = new DeferredAggregatedValidity(); Source current; for (int i = 0; i < this.parts.size(); i++) { current = ((Part)this.parts.get(i)).source; ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org