dviner 2003/07/14 10:23:56
Modified: java/src/org/apache/xindice/core Collection.java
DBObserver.java
Log:
Committing patch sent by Igor, as described in
http://marc.theaimsgroup.com/?t=105713274900005&r=1&w=2.
This patch adds the ability of the DBObserver to observe the creation
of new Collections.
--dviner
Revision Changes Path
1.20 +3 -1
xml-xindice/java/src/org/apache/xindice/core/Collection.java
Index: Collection.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/Collection.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Collection.java 10 Jul 2003 14:32:54 -0000 1.19
+++ Collection.java 14 Jul 2003 17:23:56 -0000 1.20
@@ -522,6 +522,8 @@
public boolean create() throws DBException {
// update the meta information if necessary
updateCollectionMeta();
+
+ DBObserver.getInstance().createCollection(this);
return true;
}
1.3 +9 -0
xml-xindice/java/src/org/apache/xindice/core/DBObserver.java
Index: DBObserver.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/DBObserver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DBObserver.java 31 Oct 2002 06:59:56 -0000 1.2
+++ DBObserver.java 14 Jul 2003 17:23:56 -0000 1.3
@@ -27,6 +27,9 @@
public void dropCollection( Collection col )
throws DBException {}
+ public void createCollection( Collection col )
+ throws DBException {}
+
public void putDocument(
Collection col, Key key, Document document, boolean create )
throws DBException {}
@@ -79,6 +82,12 @@
* Called before Collection.drop()
*/
public abstract void dropCollection( Collection col )
+ throws DBException;
+
+ /**
+ * Called after Collection.create()
+ */
+ public abstract void createCollection( Collection col )
throws DBException;
/**