cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/transformation XMLFormTransformer.java
Date Tue, 04 Jun 2002 09:42:02 GMT
cziegeler    2002/06/04 02:42:02

  Modified:    src/java/org/apache/cocoon/generation
                        XMLDBCollectionGenerator.java XMLDBGenerator.java
               src/java/org/apache/cocoon/reading DatabaseReader.java
               src/java/org/apache/cocoon/transformation
                        XMLFormTransformer.java
  Log:
  Moved more components from Cacheable to CacheableProcessingComponent
  
  Revision  Changes    Path
  1.7       +8 -8      xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBCollectionGenerator.java
  
  Index: XMLDBCollectionGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBCollectionGenerator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLDBCollectionGenerator.java	23 Feb 2002 16:47:39 -0000	1.6
  +++ XMLDBCollectionGenerator.java	4 Jun 2002 09:42:01 -0000	1.7
  @@ -59,9 +59,9 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  -import org.apache.cocoon.caching.CacheValidity;
  -import org.apache.cocoon.caching.Cacheable;
  +import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.environment.SourceResolver;
  +import org.apache.excalibur.source.SourceValidity;
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   
  @@ -96,12 +96,12 @@
    * slash in the base tag is important!
    *
    * @author <a href="mailto:gianugo@rabellino.it">Gianugo Rabellino</a>
  - * @version CVS $Id: XMLDBCollectionGenerator.java,v 1.6 2002/02/23 16:47:39 gianugo Exp
$
  + * @version CVS $Id: XMLDBCollectionGenerator.java,v 1.7 2002/06/04 09:42:01 cziegeler
Exp $
    * @deprecated Use the XML:DB pseudo protocol instead.
    */
   
    public class XMLDBCollectionGenerator extends ComposerGenerator
  -   implements Cacheable, Configurable,Initializable {
  +   implements CacheableProcessingComponent, Configurable,Initializable {
   
       protected static final String URI =
         "http://apache.org/cocoon/xmldb/1.0";
  @@ -204,22 +204,22 @@
       /**
        * The component isn't cached (yet)
        */
  -    public CacheValidity getValidity() {
  +    public SourceValidity getValidity() {
         return null;
       }
   
       /**
        * The component isn't cached (yet)
        */
  -    public CacheValidity generateValidity() {
  +    public SourceValidity generateValidity() {
         return null;
       }
   
       /**
        * The component isn't cached (yet)
        */
  -    public long generateKey() {
  -      return 0;
  +    public java.io.Serializable generateKey() {
  +      return null;
       }
   
      /**
  
  
  
  1.7       +8 -8      xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBGenerator.java
  
  Index: XMLDBGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBGenerator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLDBGenerator.java	23 Feb 2002 16:47:39 -0000	1.6
  +++ XMLDBGenerator.java	4 Jun 2002 09:42:01 -0000	1.7
  @@ -59,9 +59,9 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  -import org.apache.cocoon.caching.CacheValidity;
  -import org.apache.cocoon.caching.Cacheable;
  +import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.environment.SourceResolver;
  +import org.apache.excalibur.source.SourceValidity;
   import org.xml.sax.SAXException;
   
   import org.xmldb.api.DatabaseManager;
  @@ -95,12 +95,12 @@
    * slash in the base tag is important!
    *
    * @author <a href="mailto:gianugo@rabellino.it">Gianugo Rabellino</a>
  - * @version CVS $Id: XMLDBGenerator.java,v 1.6 2002/02/23 16:47:39 gianugo Exp $
  + * @version CVS $Id: XMLDBGenerator.java,v 1.7 2002/06/04 09:42:01 cziegeler Exp $
    * @deprecated Use the XML:DB pseudo protocol instead.
    */
   
    public class XMLDBGenerator extends ComposerGenerator
  -   implements Cacheable, Configurable,Initializable {
  +   implements CacheableProcessingComponent, Configurable,Initializable {
   
       protected String driver;
       protected String base;
  @@ -195,22 +195,22 @@
       /**
        * The component isn't cached (yet)
        */
  -    public CacheValidity getValidity() {
  +    public SourceValidity getValidity() {
         return null;
       }
   
       /**
        * The component isn't cached (yet)
        */
  -    public CacheValidity generateValidity() {
  +    public SourceValidity generateValidity() {
         return null;
       }
   
       /**
        * The component isn't cached (yet)
        */
  -    public long generateKey() {
  -      return 0;
  +    public java.io.Serializable generateKey() {
  +      return null;
       }
   
      /**
  
  
  
  1.9       +13 -11    xml-cocoon2/src/java/org/apache/cocoon/reading/DatabaseReader.java
  
  Index: DatabaseReader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/reading/DatabaseReader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DatabaseReader.java	22 Feb 2002 07:03:54 -0000	1.8
  +++ DatabaseReader.java	4 Jun 2002 09:42:02 -0000	1.9
  @@ -60,15 +60,15 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  -import org.apache.cocoon.caching.CacheValidity;
  -import org.apache.cocoon.caching.Cacheable;
  -import org.apache.cocoon.caching.NOPCacheValidity;
  -import org.apache.cocoon.caching.TimeStampCacheValidity;
  +import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.Response;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.util.HashUtil;
  +import org.apache.excalibur.source.SourceValidity;
  +import org.apache.excalibur.source.impl.validity.NOPValidity;
  +import org.apache.excalibur.source.impl.validity.TimeStampValidity;
   import org.xml.sax.SAXException;
   
   import java.io.BufferedInputStream;
  @@ -84,9 +84,11 @@
    * to pull the image from, and source specifies the source key information.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Id: DatabaseReader.java,v 1.8 2002/02/22 07:03:54 cziegeler Exp $
  + * @version CVS $Id: DatabaseReader.java,v 1.9 2002/06/04 09:42:02 cziegeler Exp $
    */
  -public class DatabaseReader extends AbstractReader implements Composable, Configurable,
Disposable, Cacheable, Poolable {
  +public class DatabaseReader
  +   extends AbstractReader
  +   implements Composable, Configurable, Disposable, CacheableProcessingComponent, Poolable
{
       private ComponentSelector dbselector;
       private String dsn;
       private long lastModified = System.currentTimeMillis();
  @@ -321,8 +323,8 @@
        *
        * @return The generated key hashes the src
        */
  -    public long generateKey() {
  -        return HashUtil.hash(this.source);
  +    public java.io.Serializable generateKey() {
  +        return this.source;
       }
   
       /**
  @@ -331,12 +333,12 @@
        * @return The generated validity object or <code>null</code> if the
        *         component is currently not cacheable.
        */
  -    public CacheValidity generateValidity() {
  +    public SourceValidity generateValidity() {
           if (this.lastModified > 0) {
  -            return new TimeStampCacheValidity(this.lastModified);
  +            return new TimeStampValidity(this.lastModified);
           } else {
               if (this.defaultCache) {
  -                return NOPCacheValidity.CACHE_VALIDITY;
  +                return NOPValidity.SHARED_INSTANCE;
               } else {
                   return null;
               }
  
  
  
  1.5       +1 -1      xml-cocoon2/src/java/org/apache/cocoon/transformation/XMLFormTransformer.java
  
  Index: XMLFormTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XMLFormTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLFormTransformer.java	2 Jun 2002 03:33:35 -0000	1.4
  +++ XMLFormTransformer.java	4 Jun 2002 09:42:02 -0000	1.5
  @@ -100,7 +100,7 @@
   public class XMLFormTransformer extends AbstractSAXTransformer
   {
   
  -  // @todo : implements Cacheable {
  +  // @todo : implements CacheableProcessingComponent {
   
   
   
  
  
  

----------------------------------------------------------------------
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


Mime
View raw message