stephan 2002/08/19 04:49:41
Modified: src/scratchpad/src/org/apache/cocoon/components/source/impl
SlideSource.java
Log:
Update the last modification date if properties or permissions have
changed.
Revision Changes Path
1.18 +15 -1
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/SlideSource.java
Index: SlideSource.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/SlideSource.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- SlideSource.java 19 Aug 2002 08:05:27 -0000 1.17
+++ SlideSource.java 19 Aug 2002 11:49:41 -0000 1.18
@@ -952,6 +952,12 @@
NodePermission permission = new NodePermission
(this.config.getFilesPath()+this.uri, subject, action, inheritable,
negative);
this.security.grantPermission(this.slideToken, permission);
+
+ // Last modification date
+ revisionDescriptor.setLastModified(new Date());
+
+ content.store(slideToken, this.config.getFilesPath()+this.uri,
revisionDescriptor, null);
+
} catch (SlideException se) {
getLogger().warn("Couldn't grant permission", se);
throw new SourceException("Couldn't grant permission", se);
@@ -1272,6 +1278,10 @@
try {
revisionDescriptor.setProperty(sourceproperty.getName(),
sourceproperty.getNamespace(),
sourceproperty.getValueAsString());
+
+ // Last modification date
+ revisionDescriptor.setLastModified(new Date());
+
content.store(slideToken, this.config.getFilesPath()+this.uri,
revisionDescriptor, null);
} catch (SlideException se) {
throw new SourceException("Could not set property", se);
@@ -1322,6 +1332,10 @@
try {
if ((revisionDescriptor!=null) && (!namespace.equals("DAV:"))) {
revisionDescriptor.removeProperty(name,namespace);
+
+ // Last modification date
+ revisionDescriptor.setLastModified(new Date());
+
content.store(slideToken, this.config.getFilesPath()+this.uri,
revisionDescriptor, null);
}
} catch (SlideException se) {
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]