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/12 18:02:58 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/store Store.java
juergen 01/01/12 09:02:57
Modified: src/share/org/apache/slide/store Store.java
Log:
make the store interface smaller and interface changes in the store more easy.
Revision Changes Path
1.2 +13 -303 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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Store.java 2000/11/19 04:18:38 1.1
+++ Store.java 2001/01/12 17:02:53 1.2
@@ -1,13 +1,13 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/Store.java,v 1.1 2000/11/19 04:18:38 remm Exp $
- * $Revision: 1.1 $
- * $Date: 2000/11/19 04:18:38 $
+ * $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 $
*
* ====================================================================
*
* 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,28 +59,20 @@
*
* [Additional notices, if required by prior licensing conditions]
*
- */
+ */
package org.apache.slide.store;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import java.util.Date;
-import java.io.FileWriter;
-import java.io.IOException;
import org.apache.slide.common.*;
-import org.apache.slide.structure.*;
-import org.apache.slide.security.*;
-import org.apache.slide.lock.*;
-import org.apache.slide.content.*;
/**
* 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.1 $
+ * @version $Revision: 1.2 $
*/
-public interface Store extends Service {
+public interface Store extends ContentStore, LockStore, NodeStore,
+ RevisionDescriptorStore, RevisionDescriptorsStore, SecurityStore {
// ------------------------------------------------------ Interface Methods
@@ -124,287 +116,5 @@
void setContentStore(ContentStore contentStore);
- /**
- * Retrive an object.
- *
- * @param uri Uri of the object we want to retrieve
- * @exception ServiceAccessException Error accessing the Data Source
- * @exception ObjectNotFoundException The object to retrieve was not found
- */
- ObjectNode retrieveObject(Uri uri)
- throws ServiceAccessException, ObjectNotFoundException;
-
-
- /**
- * Update an object.
- *
- * @param object Object to update
- * @exception ServiceAccessException Error accessing the Data Source
- * @exception ObjectNotFoundException The object to update was not found
- */
- void storeObject(Uri uri, ObjectNode object)
- throws ServiceAccessException, ObjectNotFoundException;
-
-
- /**
- * Create a new object.
- *
- * @param object ObjectNode
- * @param uri Uri of the object we want to create
- * @exception ServiceAccessException Error accessing the Data Source
- * @exception ObjectAlreadyExistsException An object already exists
- * at this Uri
- */
- void createObject(Uri uri, ObjectNode object)
- throws ServiceAccessException, ObjectAlreadyExistsException;
-
-
- /**
- * Remove an object.
- *
- * @param object Object to remove
- * @exception ServiceAccessException Error accessing the Data Source
- * @exception ObjectNotFoundException The object to remove was not found
- */
- void removeObject(Uri uri, ObjectNode object)
- throws ServiceAccessException, ObjectNotFoundException;
-
-
- /**
- * Grant a new permission.
- *
- * @param permission Permission we want to create
- * @exception ServiceAccessException Error accessing the Data Source
- */
- void grantPermission(Uri uri, NodePermission permission)
- throws ServiceAccessException;
-
-
- /**
- * Revoke a permission.
- *
- * @param permission Permission we want to create
- * @exception ServiceAccessException Error accessing the Data Source
- */
- void revokePermission(Uri uri, NodePermission permission)
- throws ServiceAccessException;
-
-
- /**
- * Revoke all the permissions on an object.
- *
- * @param permission Permission we want to create
- * @exception ServiceAccessException Error accessing the Data Source
- */
- void revokePermissions(Uri uri)
- throws ServiceAccessException;
-
-
- /**
- * Enumerate permissions on an object.
- *
- * @param permission Permission we want to create
- * @exception ServiceAccessException Error accessing the Data Source
- */
- Enumeration enumeratePermissions(Uri uri)
- throws ServiceAccessException;
-
-
- /**
- * Create a new lock.
- *
- * @param lock Lock token
- * @exception ServiceAccessException Service access error
- */
- void putLock(Uri uri, NodeLock lock)
- throws ServiceAccessException;
-
-
- /**
- * Renew a lock.
- *
- * @param lock Token to renew
- * @exception ServiceAccessException Service access error
- * @exception LockTokenNotFoundException Lock token was not found
- */
- void renewLock(Uri uri, NodeLock lock)
- throws ServiceAccessException, LockTokenNotFoundException;
-
-
- /**
- * Unlock.
- *
- * @param lock Token to remove
- * @exception ServiceAccessException Service access error
- * @exception LockTokenNotFoundException Lock token was not found
- */
- void removeLock(Uri uri, NodeLock lock)
- throws ServiceAccessException, LockTokenNotFoundException;
-
-
- /**
- * Kill a lock.
- *
- * @param lock Token to remove
- * @exception ServiceAccessException Service access error
- * @exception LockTokenNotFoundException Lock token was not found
- */
- void killLock(Uri uri, NodeLock lock)
- throws ServiceAccessException, LockTokenNotFoundException;
-
-
- /**
- * Enumerate locks on an object.
- *
- * @param subject Subject
- * @return Enumeration List of locks which have been put on the subject
- * @exception ServiceAccessException Service access error
- */
- Enumeration enumerateLocks(Uri uri)
- throws ServiceAccessException;
-
-
- /**
- * Retrieve the revisions informations of an object.
- *
- * @param uri Uri
- * @exception ServiceAccessException Service access error
- * @exception RevisionDescriptorNotFoundException Revision descriptor
- * was not found
- */
- NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
- throws ServiceAccessException, RevisionDescriptorNotFoundException;
-
-
- /**
- * Create a new revision information object.
- *
- * @param uri Uri
- * @param revisionDescriptors Node revision descriptors
- * @exception ServiceAccessException Service access error
- */
- void createRevisionDescriptors(Uri uri,
- NodeRevisionDescriptors revisionDescriptors)
- throws ServiceAccessException;
-
-
- /**
- * Update revision information.
- *
- * @param uri Uri
- * @param revisionDescriptors Node revision descriptors
- * @exception ServiceAccessException Service access error
- * @exception RevisionDescriptorNotFoundException Revision descriptor
- * was not found
- */
- void storeRevisionDescriptors(Uri uri,
- NodeRevisionDescriptors revisionDescriptors)
- throws ServiceAccessException, RevisionDescriptorNotFoundException;
-
-
- /**
- * Remove revision information.
- *
- * @param uri Uri
- * @exception ServiceAccessException Service access error
- */
- void removeRevisionDescriptors(Uri uri)
- throws ServiceAccessException;
-
-
- /**
- * Retrieve an individual object's revision descriptor.
- *
- * @param Uri uri
- * @param revisionNumber Node revision number
- */
- NodeRevisionDescriptor retrieveRevisionDescriptor
- (Uri uri, NodeRevisionNumber revisionNumber)
- throws ServiceAccessException, RevisionDescriptorNotFoundException;
-
-
- /**
- * Create a new revision descriptor.
- *
- * @param uri Uri
- * @param revisionDescriptor Node revision descriptor
- * @exception ServiceAccessException Service access error
- */
- void createRevisionDescriptor(Uri uri,
- NodeRevisionDescriptor revisionDescriptor)
- throws ServiceAccessException;
-
-
- /**
- * Update a revision descriptor.
- *
- * @param uri Uri
- * @param revisionDescriptors Node revision descriptor
- * @exception ServiceAccessException Service access error
- * @exception RevisionDescriptorNotFoundException Revision descriptor
- * was not found
- */
- void storeRevisionDescriptor(Uri uri,
- NodeRevisionDescriptor revisionDescriptor)
- throws ServiceAccessException, RevisionDescriptorNotFoundException;
-
-
- /**
- * Remove a revision descriptor.
- *
- * @param uri Uri
- * @param revisionNumber Revision number
- * @exception ServiceAccessException Service access error
- */
- void removeRevisionDescriptor(Uri uri, NodeRevisionNumber number)
- throws ServiceAccessException;
-
-
- /**
- * Retrive revision content.
- *
- * @param uri Uri
- * @param revisionNumber Node revision number
- */
- NodeRevisionContent retrieveRevisionContent
- (Uri uri, NodeRevisionNumber revisionNumber)
- throws ServiceAccessException, RevisionNotFoundException;
-
-
- /**
- * Create a new revision
- *
- * @param uri Uri
- * @param revisionDescriptor Node revision descriptor
- * @param revisionContent Node revision content
- */
- void createRevisionContent
- (Uri uri, NodeRevisionDescriptor revisionDescriptor,
- NodeRevisionContent revisionContent)
- throws ServiceAccessException, RevisionAlreadyExistException;
-
-
- /**
- * Modify the latest revision of an object.
- *
- * @param uri Uri
- * @param revisionDescriptor Node revision descriptor
- * @param revisionContent Node revision content
- */
- void storeRevisionContent
- (Uri uri, NodeRevisionDescriptor revisionDescriptor,
- NodeRevisionContent revisionContent)
- throws ServiceAccessException, RevisionNotFoundException;
-
-
- /**
- * Remove revision.
- *
- * @param uri Uri
- * @param revisionNumber Node revision number
- */
- void removeRevisionContent(Uri uri, NodeRevisionNumber revisionNumber)
- throws ServiceAccessException;
-
}