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/01/11 10:38:54 UTC
cvs commit: jakarta-slide/src/stores/slidestore/reference MemoryDescriptorsStore.java
juergen 01/01/11 01:38:54
Modified: src/stores/slidestore/reference MemoryDescriptorsStore.java
Log:
The memory descriptor extends now the FileContentStore to fix a class cast exception in org.apache.slide.store.StandardStore.initialize(StandardStore.java:294)
Revision Changes Path
1.2 +43 -43 jakarta-slide/src/stores/slidestore/reference/MemoryDescriptorsStore.java
Index: MemoryDescriptorsStore.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/stores/slidestore/reference/MemoryDescriptorsStore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MemoryDescriptorsStore.java 2000/12/05 06:46:50 1.1
+++ MemoryDescriptorsStore.java 2001/01/11 09:38:52 1.2
@@ -1,13 +1,13 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/stores/slidestore/reference/MemoryDescriptorsStore.java,v 1.1 2000/12/05 06:46:50 remm Exp $
- * $Revision: 1.1 $
- * $Date: 2000/12/05 06:46:50 $
+ * $Header: /home/cvs/jakarta-slide/src/stores/slidestore/reference/MemoryDescriptorsStore.java,v 1.2 2001/01/11 09:38:52 juergen Exp $
+ * $Revision: 1.2 $
+ * $Date: 2001/01/11 09:38:52 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -15,7 +15,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -23,15 +23,15 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
+ * from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
@@ -59,7 +59,7 @@
*
* [Additional notices, if required by prior licensing conditions]
*
- */
+ */
package slidestore.reference;
@@ -78,12 +78,12 @@
/**
* Memory only (no persistence) DescriptorsStore implementation.
* Reference implementation.
- *
+ *
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
-public class MemoryDescriptorsStore extends ServiceImpl
- implements LockStore, NodeStore, RevisionDescriptorsStore,
+public class MemoryDescriptorsStore extends FileContentStore
+ implements LockStore, NodeStore, RevisionDescriptorsStore,
RevisionDescriptorStore, SecurityStore {
@@ -124,7 +124,7 @@
/**
- * Initializes the descriptors store with a set of parameters.
+ * Initializes the descriptors store with a set of parameters.
* Those could be :
* <li>User name, login info
* <li>Host name on which to connect
@@ -132,7 +132,7 @@
* <li>JDBC driver whoich is to be used :-)
* <li>Anything else ...
*
- * @param parameters Hashtable containing the parameters' name
+ * @param parameters Hashtable containing the parameters' name
* and associated value
*/
public void setParameters(Hashtable parameters) {
@@ -170,7 +170,7 @@
/**
* Initializes descriptors store.
*
- * @exception ServiceInitializationFailedException Throws an exception
+ * @exception ServiceInitializationFailedException Throws an exception
* if the descriptors store has already been initialized before
*/
public synchronized void initialize(NamespaceAccessToken token)
@@ -185,7 +185,7 @@
/**
* Deletes descriptors store. Should remove stored data if possible.
- *
+ *
* @exception ServiceResetFailedException Reset failed
*/
public synchronized void reset()
@@ -200,10 +200,10 @@
/**
* Does nothing.
- *
+ *
* @exception ServiceAccessException Service access error
*/
- public void commit()
+ public void commit()
throws ServiceAccessException {
}
@@ -223,7 +223,7 @@
/**
* Idicates whether or not the objects managed by this service should be
* cached. Caching is enabled by default.
- *
+ *
* @return boolean True if results should be cached
*/
public boolean cacheResults() {
@@ -271,7 +271,7 @@
* @param object SlideObject
* @param uri Uri of the object we want to create
* @exception ServiceAccessException Error accessing the Descriptors Store
- * @exception ObjectAlreadyExistsException An object already exists
+ * @exception ObjectAlreadyExistsException An object already exists
* at this Uri
*/
public void createObject(Uri uri, ObjectNode object)
@@ -279,7 +279,7 @@
try {
if (objects.containsKey(uri.toString())) {
throw new ObjectAlreadyExistsException(uri.toString());
- }
+ }
storeObject(uri, object);
} catch(ObjectNotFoundException e) {
// Never happens
@@ -305,7 +305,7 @@
/**
* Store an object permissions in the Descriptors Store.
- *
+ *
* @param permission Permission we want to create
* @exception ServiceAccessException Error accessing the Descriptors Store
*/
@@ -325,7 +325,7 @@
/**
* Store an object permissions in the Descriptors Store.
- *
+ *
* @param permission Permission we want to create
* @exception ServiceAccessException Error accessing the Descriptors Store
*/
@@ -343,7 +343,7 @@
/**
* Revoke all the permissions on the object .
- *
+ *
* @param permission Permission we want to create
* @exception ServiceAccessException Error accessing the Descriptors Store
*/
@@ -360,7 +360,7 @@
/**
* Store an object permissions in the Descriptors Store.
- *
+ *
* @param permission Permission we want to create
* @exception ServiceAccessException Error accessing the Descriptors Store
*/
@@ -379,7 +379,7 @@
/**
* Puts a lock on a subject.
- *
+ *
* @param lock Lock token
* @exception ServiceAccessException Service access error
*/
@@ -399,7 +399,7 @@
/**
* Renews a lock.
- *
+ *
* @param lock Token to renew
* @exception ServiceAccessException Service access error
* @exception LockTokenNotFoundException Lock token was not found
@@ -423,7 +423,7 @@
/**
* Removes (cancels) a lock.
- *
+ *
* @param lock Token to remove
* @exception ServiceAccessException Service access error
* @exception LockTokenNotFoundException Lock token was not found
@@ -446,7 +446,7 @@
/**
* Kills a lock.
- *
+ *
* @param lock Token to remove
* @exception ServiceAccessException Service access error
* @exception LockTokenNotFoundException Lock token was not found
@@ -459,7 +459,7 @@
/**
* Returns the list of locks put on a subject.
- *
+ *
* @param subject Subject
* @return Enumeration List of locks which have been put on the subject
* @exception ServiceAccessException Service access error
@@ -479,10 +479,10 @@
/**
* Retrieve a revision descriptors.
- *
+ *
* @param uri Uri
* @exception ServiceAccessException Service access error
- * @exception RevisionDescriptorNotFoundException Revision descriptor
+ * @exception RevisionDescriptorNotFoundException Revision descriptor
* was not found
*/
public NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
@@ -497,7 +497,7 @@
/**
* Create new revision descriptors.
- *
+ *
* @param uri Uri
* @param revisionDescriptors Node revision descriptors
* @exception ServiceAccessException Service access error
@@ -511,11 +511,11 @@
/**
* Update revision descriptors.
- *
+ *
* @param uri Uri
* @param revisionDescriptors Node revision descriptors
* @exception ServiceAccessException Service access error
- * @exception RevisionDescriptorNotFoundException Revision descriptor
+ * @exception RevisionDescriptorNotFoundException Revision descriptor
* was not found
*/
public void storeRevisionDescriptors
@@ -530,7 +530,7 @@
/**
* Remove revision descriptors.
- *
+ *
* @param uri Uri
* @exception ServiceAccessException Service access error
*/
@@ -542,7 +542,7 @@
/**
* Retrieve revision descriptor.
- *
+ *
* @param Uri uri
* @param revisionNumber Node revision number
*/
@@ -559,7 +559,7 @@
/**
* Create new revision descriptor.
- *
+ *
* @param uri Uri
* @param revisionDescriptor Node revision descriptor
* @exception ServiceAccessException Service access error
@@ -567,18 +567,18 @@
public void createRevisionDescriptor
(Uri uri, NodeRevisionDescriptor revisionDescriptor)
throws ServiceAccessException {
- descriptor.put(uri + "-" + revisionDescriptor.getRevisionNumber(),
+ descriptor.put(uri + "-" + revisionDescriptor.getRevisionNumber(),
revisionDescriptor.cloneObject());
}
/**
* Update revision descriptor.
- *
+ *
* @param uri Uri
* @param revisionDescriptors Node revision descriptor
* @exception ServiceAccessException Service access error
- * @exception RevisionDescriptorNotFoundException Revision descriptor
+ * @exception RevisionDescriptorNotFoundException Revision descriptor
* was not found
*/
public void storeRevisionDescriptor
@@ -594,7 +594,7 @@
/**
* Remove revision descriptor.
- *
+ *
* @param uri Uri
* @param revisionNumber Revision number
* @exception ServiceAccessException Service access error