cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation RSSTransformer.java
Date Tue, 23 Dec 2003 14:38:07 GMT
cziegeler    2003/12/23 06:38:07

  Modified:    src/blocks/portal/java/org/apache/cocoon/portal/transformation
                        RSSTransformer.java
  Log:
  Support caching
  
  Revision  Changes    Path
  1.5       +21 -2     cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/RSSTransformer.java
  
  Index: RSSTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/RSSTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RSSTransformer.java	21 Oct 2003 12:39:16 -0000	1.4
  +++ RSSTransformer.java	23 Dec 2003 14:38:07 -0000	1.5
  @@ -53,17 +53,21 @@
   import java.io.ByteArrayInputStream;
   import java.io.IOException;
   import java.io.InputStream;
  +import java.io.Serializable;
   import java.util.Map;
   
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.sax.XMLDeserializer;
   import org.apache.cocoon.components.sax.XMLSerializer;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.transformation.AbstractSAXTransformer;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
   import org.apache.cocoon.xml.XMLConsumer;
  +import org.apache.excalibur.source.SourceValidity;
  +import org.apache.excalibur.source.impl.validity.NOPValidity;
   import org.apache.excalibur.xmlizer.XMLizer;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
  @@ -77,7 +81,8 @@
    * @version CVS $Id$
    */
   public final class RSSTransformer
  -extends AbstractSAXTransformer {
  +extends AbstractSAXTransformer
  +implements CacheableProcessingComponent {
   
       /** The xmlizer for converting html to xml */
       protected XMLizer xmlizer;
  @@ -197,6 +202,20 @@
           throws IOException, ProcessingException, SAXException {
           super.setupTransforming();
           this.filter = new HTMLFilter( this.xmlConsumer );
  +    }
  +
  +    /* (non-Javadoc)
  +     * @see org.apache.cocoon.caching.CacheableProcessingComponent#getKey()
  +     */
  +    public Serializable getKey() {
  +        return "1";
  +    }
  +
  +    /* (non-Javadoc)
  +     * @see org.apache.cocoon.caching.CacheableProcessingComponent#getValidity()
  +     */
  +    public SourceValidity getValidity() {
  +        return NOPValidity.SHARED_INSTANCE;
       }
   
   }
  
  
  

Mime
View raw message