You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/02/09 01:17:49 UTC
svn commit: r620051 -
/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/generation/LenyaMetaDataGenerator.java
Author: andreas
Date: Fri Feb 8 16:17:48 2008
New Revision: 620051
URL: http://svn.apache.org/viewvc?rev=620051&view=rev
Log:
Simplified validity resolving in LenyaMetaDataGenerator - use validity of the source instead of generating a timestamp validity.
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/generation/LenyaMetaDataGenerator.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/generation/LenyaMetaDataGenerator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/generation/LenyaMetaDataGenerator.java?rev=620051&r1=620050&r2=620051&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/generation/LenyaMetaDataGenerator.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/generation/LenyaMetaDataGenerator.java Fri Feb 8 16:17:48 2008
@@ -84,6 +84,8 @@
/** The repository content holder to generate the meta data for */
private ContentHolder content;
+
+ private SourceValidity validity;
/**
* Recycle this component. All instance variables are set to <code>null</code>.
@@ -92,6 +94,7 @@
this.content = null;
this.src = null;
this.parser = null;
+ this.validity = null;
super.recycle();
}
@@ -121,6 +124,7 @@
try {
source = (RepositorySource) resolver.resolveURI(src);
this.content = source.getContent();
+ this.validity = source.getValidity();
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -147,14 +151,7 @@
* not cacheable.
*/
public SourceValidity getValidity() {
- long lastModified;
- try {
- lastModified = this.content.getLastModified();
- } catch (Exception e) {
- getLogger().error("Error determining last modification date", e);
- return null;
- }
- return new TimeStampValidity(lastModified);
+ return this.validity;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org