cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r517390 - /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/LinkRewriterReader.java
Date Mon, 12 Mar 2007 20:52:18 GMT
Author: gkossakowski
Date: Mon Mar 12 13:52:17 2007
New Revision: 517390

URL: http://svn.apache.org/viewvc?view=rev&rev=517390
Log:
Implement caching for LinkRewriterReader.

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/LinkRewriterReader.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/LinkRewriterReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/LinkRewriterReader.java?view=diff&rev=517390&r1=517389&r2=517390
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/LinkRewriterReader.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/LinkRewriterReader.java
Mon Mar 12 13:52:17 2007
@@ -6,6 +6,7 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
+import java.io.Serializable;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -13,6 +14,7 @@
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.caching.CacheableProcessingComponent;
 import org.apache.cocoon.components.modules.input.InputModule;
 import org.apache.cocoon.components.source.util.SourceUtil;
 import org.apache.cocoon.environment.Context;
@@ -27,6 +29,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceValidity;
 import org.xml.sax.SAXException;
 
 /**
@@ -36,7 +39,7 @@
  * <code>encoding</code> - see {@link #setEncoding}<br>
  * <code>expires</code> - see {@link #setExpires}.
  */
-public class LinkRewriterReader extends AbstractReader {
+public class LinkRewriterReader extends AbstractReader implements CacheableProcessingComponent
{
 
     /** The default logger for this class. */
     private Log logger = LogFactory.getLog(getClass());
@@ -195,5 +198,13 @@
 
         return inputSource.getMimeType();
     }
+
+	public Serializable getKey() {
+		return inputSource.getURI();
+	}
+
+	public SourceValidity getValidity() {
+		return inputSource.getValidity();
+	}
 
 }



Mime
View raw message