Hi,
Here is the second patch set of my generic ContentInterceptors proposed
modifications.
These ones affect org/apache/slide/content/ContentInterceptor.java and
org/apache/slide/content/ContentImpl.java and just add to
ContentInterceptor class a new method postRemoveContent and its calls
in ContentImpl class just after content removing.
This new method has already been approved by Remy some times ago.
These patches must be applied after the first ones I send earlier
today.
Regards
JP
ps : As for earlier patches, these ones will be ported to HEAD branch as
soon as approved.
---
slide_1_0_Quota_1_parameters/src/share/org/apache/slide/content/ContentInterceptor.java
Mon Apr 8 09:40:03 2002
+++
+slide_1_0_Quota_2_postRemove/src/share/org/apache/slide/content/ContentInterceptor.java
+ Mon Apr 8 13:35:08 2002
@@ -141,6 +141,18 @@
NodeRevisionDescriptor revisionDescriptor,
NodeRevisionContent revisionContent) {
}
-
+
+
+ /**
+ * That method will be called just after removing content.
+ *
+ * @param revisionDescriptors null when a specified revision is removed
+ * @param revisionDescriptor null when all revisions are removed
+ */
+ public void postRemoveContent
+ (SlideToken token, NodeRevisionDescriptors revisionDescriptors,
+ NodeRevisionDescriptor revisionDescriptor) {
+ }
+
}
--- slide_1_0_Quota_1_parameters/src/share/org/apache/slide/content/ContentImpl.java
Mon Apr 8 09:40:03 2002
+++ slide_1_0_Quota_2_postRemove/src/share/org/apache/slide/content/ContentImpl.java
+ Mon Apr 8 13:48:33 2002
@@ -88,7 +88,8 @@
protected static final int PRE_STORE = 0;
protected static final int POST_STORE = 1;
protected static final int POST_RETRIEVE = 2;
-
+ protected static final int POST_REMOVE = 3;
+
// ----------------------------------------------------------- Constructors
@@ -982,6 +983,9 @@
objectUri.getStore().removeRevisionDescriptors(objectUri);
+ // Invoke interceptors
+ invokeInterceptors(token, revisionDescriptors, null, null, POST_REMOVE);
+
}
@@ -1041,6 +1045,9 @@
(objectUri, revisionDescriptor);
objectUri.getStore()
.removeRevisionDescriptor(objectUri, revisionNumber);
+
+ // Invoke interceptors
+ invokeInterceptors(token, null, revisionDescriptor, null, POST_REMOVE);
}
@@ -1206,6 +1213,11 @@
contentInterceptors[i].postRetrieveContent
(token, revisionDescriptors,
revisionDescriptor, revisionContent);
+ break;
+ case POST_REMOVE:
+ contentInterceptors[i].postRemoveContent
+ (token, revisionDescriptors,
+ revisionDescriptor);
break;
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>