You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2001/03/28 18:15:43 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/store StandardStore.java Store.java
juergen 01/03/28 08:15:43
Modified: src/share/org/apache/slide/common Namespace.java
src/share/org/apache/slide/store StandardStore.java
Store.java
Log:
the stores carry now their name (from domain.xml) and return it in the toString method.
Revision Changes Path
1.24 +5 -5 jakarta-slide/src/share/org/apache/slide/common/Namespace.java
Index: Namespace.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Namespace.java 2001/03/28 12:10:31 1.23
+++ Namespace.java 2001/03/28 16:15:41 1.24
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v 1.23 2001/03/28 12:10:31 juergen Exp $
- * $Revision: 1.23 $
- * $Date: 2001/03/28 12:10:31 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v 1.24 2001/03/28 16:15:41 juergen Exp $
+ * $Revision: 1.24 $
+ * $Date: 2001/03/28 16:15:41 $
*
* ====================================================================
*
@@ -93,7 +93,7 @@
* Namespace class.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.23 $
+ * @version $Revision: 1.24 $
*/
public final class Namespace {
@@ -265,7 +265,7 @@
if (!stores.containsKey(scope)) {
try {
Store store = (Store) storeClass.newInstance();
- //store.setName(storeName);
+ store.setName(storeName);
store.setParameters(parameters);
stores.put(scope, store);
1.9 +32 -4 jakarta-slide/src/share/org/apache/slide/store/StandardStore.java
Index: StandardStore.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/StandardStore.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- StandardStore.java 2001/01/12 17:42:23 1.8
+++ StandardStore.java 2001/03/28 16:15:42 1.9
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/StandardStore.java,v 1.8 2001/01/12 17:42:23 juergen Exp $
- * $Revision: 1.8 $
- * $Date: 2001/01/12 17:42:23 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/StandardStore.java,v 1.9 2001/03/28 16:15:42 juergen Exp $
+ * $Revision: 1.9 $
+ * $Date: 2001/03/28 16:15:42 $
*
* ====================================================================
*
@@ -80,7 +80,7 @@
* Abstract implementation of a store. Handles all caching operations.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class StandardStore extends AbstractStore {
@@ -100,8 +100,27 @@
descriptorsCache = new HashMapObjectCache(1000, 10000, 0.95);
descriptorCache = new HashMapObjectCache(1000, 10000, 0.8);
}
+ // the name of this store as specified in domain.xml
+ private String name;
+ /**
+ * Set the name of the store as specified in domain.xml.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+
+ /**
+ * Return the name of the store as specified in domain.xml.
+ */
+ public String getName() {
+ return this.name;
+ }
+
+
// ----------------------------------------------------- Instance Variables
@@ -671,6 +690,15 @@
NodeRevisionDescriptor revisionDescriptor)
throws ServiceAccessException {
super.removeRevisionContent(uri, revisionDescriptor);
+ }
+
+
+ /**
+ * Return the name of this store
+ *
+ */
+ public String toString() {
+ return getName() + "(" + getClass().getName() + ")";
}
1.3 +18 -5 jakarta-slide/src/share/org/apache/slide/store/Store.java
Index: Store.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/Store.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Store.java 2001/01/12 17:02:53 1.2
+++ Store.java 2001/03/28 16:15:42 1.3
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/Store.java,v 1.2 2001/01/12 17:02:53 juergen Exp $
- * $Revision: 1.2 $
- * $Date: 2001/01/12 17:02:53 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/Store.java,v 1.3 2001/03/28 16:15:42 juergen Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/03/28 16:15:42 $
*
* ====================================================================
*
@@ -69,13 +69,26 @@
* Represents a store which is used by the Slide API to access data.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public interface Store extends ContentStore, LockStore, NodeStore,
- RevisionDescriptorStore, RevisionDescriptorsStore, SecurityStore {
+ RevisionDescriptorStore, RevisionDescriptorsStore, SecurityStore {
// ------------------------------------------------------ Interface Methods
+
+
+ /**
+ * Set the name of the store as specified in domain.xml.
+ */
+ void setName(String name);
+
+
+
+ /**
+ * Return the name of the store as specified in domain.xml.
+ */
+ String getName();
/**