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 re...@locus.apache.org on 2000/09/26 05:17:24 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/lock Lock.java LockImpl.java
remm 00/09/25 20:17:24
Modified: src/share/org/apache/slide/lock Lock.java LockImpl.java
Log:
- Removed some useless throws declarations in the Lock interface
Revision Changes Path
1.6 +15 -46 jakarta-slide/src/share/org/apache/slide/lock/Lock.java
Index: Lock.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/lock/Lock.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Lock.java 2000/09/26 03:08:36 1.5
+++ Lock.java 2000/09/26 03:17:23 1.6
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/lock/Lock.java,v 1.5 2000/09/26 03:08:36 remm Exp $
- * $Revision: 1.5 $
- * $Date: 2000/09/26 03:08:36 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/lock/Lock.java,v 1.6 2000/09/26 03:17:23 remm Exp $
+ * $Revision: 1.6 $
+ * $Date: 2000/09/26 03:17:23 $
*
* ====================================================================
*
@@ -78,7 +78,7 @@
* Lock helper class.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public interface Lock {
@@ -91,22 +91,17 @@
*
* @param crendentialsToken Credentials token
* @param token Object containing all the lock information
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
* @exception ObjectIsAlreadyLockedException Object is already locked
* with an incompatible lock token
* @exception AccessDeniedException Insufficient credentials to allow
* object locking
*/
void lock(CredentialsToken credentialsToken, NodeLock token)
- throws ServiceConnectionFailedException, ServiceAccessException,
- ObjectIsAlreadyLockedException, AccessDeniedException,
- ObjectNotFoundException, LinkedObjectNotFoundException;
+ throws ServiceAccessException, ObjectIsAlreadyLockedException,
+ AccessDeniedException, ObjectNotFoundException;
/**
@@ -114,15 +109,12 @@
*
* @param crendentialsToken Credentials token
* @param token Object containing all the lock information
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
*/
void unlock(CredentialsToken credentialsToken, NodeLock token)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException;
+ throws ServiceAccessException, LockTokenNotFoundException;
/**
@@ -130,21 +122,16 @@
*
* @param crendentialsToken Credentials token
* @param token Object containing all the lock information
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
*/
void unlock(CredentialsToken credentialsToken, String objectUri,
String lockId)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException, ObjectNotFoundException,
- LinkedObjectNotFoundException;
+ throws ServiceAccessException, LockTokenNotFoundException,
+ ObjectNotFoundException;
/**
@@ -153,16 +140,13 @@
* @param crendentialsToken Credentials token
* @param token Object containing the lock info, as well as the new
* desired expiration date
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
*/
void renew(CredentialsToken credentialsToken, NodeLock token,
Date newExpirationDate)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException;
+ throws ServiceAccessException, LockTokenNotFoundException;
/**
@@ -171,21 +155,16 @@
* @param crendentialsToken Credentials token
* @param token Object containing the lock info, as well as the new
* desired expiration date
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
*/
void renew(CredentialsToken credentialsToken, String objectUri,
String lockId, Date newExpirationDate)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException, ObjectNotFoundException,
- LinkedObjectNotFoundException;
+ throws ServiceAccessException, LockTokenNotFoundException,
+ ObjectNotFoundException;
/**
@@ -193,22 +172,17 @@
*
* @param crendentialsToken Credentials token
* @param subject Subject on which locks are to be removed
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
* @exception AccessDeniedException Insufficient credentials to allow
* forced removal of locks
*/
void kill(CredentialsToken credentialsToken, SubjectNode subject)
- throws ServiceConnectionFailedException, ServiceAccessException,
- AccessDeniedException, LockTokenNotFoundException,
- ObjectNotFoundException, LinkedObjectNotFoundException;
+ throws ServiceAccessException, AccessDeniedException,
+ LockTokenNotFoundException, ObjectNotFoundException;
/**
@@ -216,18 +190,13 @@
*
* @param credentialsToken Credentials token
* @param objectUri Object on which we want to enumerate locks
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception ObjectNotFoundException One of the objects referenced in
* the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
*/
Enumeration enumerateLocks(CredentialsToken credentialsToken,
String objectUri)
- throws ServiceConnectionFailedException, ServiceAccessException,
- ObjectNotFoundException, LinkedObjectNotFoundException,
+ throws ServiceAccessException, ObjectNotFoundException,
LockTokenNotFoundException;
1.7 +15 -46 jakarta-slide/src/share/org/apache/slide/lock/LockImpl.java
Index: LockImpl.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/lock/LockImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- LockImpl.java 2000/09/26 02:44:16 1.6
+++ LockImpl.java 2000/09/26 03:17:24 1.7
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/lock/LockImpl.java,v 1.6 2000/09/26 02:44:16 remm Exp $
- * $Revision: 1.6 $
- * $Date: 2000/09/26 02:44:16 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/lock/LockImpl.java,v 1.7 2000/09/26 03:17:24 remm Exp $
+ * $Revision: 1.7 $
+ * $Date: 2000/09/26 03:17:24 $
*
* ====================================================================
*
@@ -78,7 +78,7 @@
* Lock helper class.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public final class LockImpl implements Lock {
@@ -129,22 +129,17 @@
*
* @param crendentialsToken Credentials token
* @param token Object containing all the lock information
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
* @exception ObjectIsAlreadyLockedException Object is already locked
* with an incompatible lock token
* @exception AccessDeniedException Insufficient credentials to allow
* object locking
*/
public void lock(CredentialsToken credentialsToken, NodeLock token)
- throws ServiceConnectionFailedException, ServiceAccessException,
- ObjectIsAlreadyLockedException, AccessDeniedException,
- ObjectNotFoundException, LinkedObjectNotFoundException {
+ throws ServiceAccessException, ObjectIsAlreadyLockedException,
+ AccessDeniedException, ObjectNotFoundException {
boolean canLock = !isLocked(credentialsToken, token, true);
@@ -173,15 +168,12 @@
*
* @param crendentialsToken Credentials token
* @param token Object containing all the lock information
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
*/
public void unlock(CredentialsToken credentialsToken, NodeLock token)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException {
+ throws ServiceAccessException, LockTokenNotFoundException {
Uri lockedUri = namespace.getUri(token.getObjectUri());
lockedUri.getDescriptorsStore().removeLock(lockedUri, token);
}
@@ -191,21 +183,16 @@
* Removes a set of linked locks.
*
* @param crendentialsToken Credentials token
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
*/
public void unlock(CredentialsToken credentialsToken, String objectUri,
String lockId)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException, ObjectNotFoundException,
- LinkedObjectNotFoundException {
+ throws ServiceAccessException, LockTokenNotFoundException,
+ ObjectNotFoundException {
Enumeration locksList = enumerateLocks(credentialsToken, objectUri);
while (locksList.hasMoreElements()) {
@@ -224,16 +211,13 @@
* @param crendentialsToken Credentials token
* @param token Object containing the lock info, as well as the new
* desired expiration date
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in
* the Lock Store service
*/
public void renew(CredentialsToken credentialsToken, NodeLock token,
Date newExpirationDate)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException {
+ throws ServiceAccessException, LockTokenNotFoundException {
token.setExpirationDate(newExpirationDate);
Uri lockedUri = namespace.getUri(token.getObjectUri());
lockedUri.getDescriptorsStore().renewLock(lockedUri, token);
@@ -244,21 +228,16 @@
* Renew a set of linked locks.
*
* @param crendentialsToken Credentials token
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
*/
public void renew(CredentialsToken credentialsToken, String objectUri,
String lockId, Date newExpirationDate)
- throws ServiceConnectionFailedException, ServiceAccessException,
- LockTokenNotFoundException, ObjectNotFoundException,
- LinkedObjectNotFoundException {
+ throws ServiceAccessException, LockTokenNotFoundException,
+ ObjectNotFoundException {
Enumeration locksList = enumerateLocks(credentialsToken, objectUri);
while (locksList.hasMoreElements()) {
@@ -276,22 +255,17 @@
*
* @param crendentialsToken Credentials token
* @param subject Subject on which locks are to be removed
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception ObjectNotFoundException One of the objects referenced in
* the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
* @exception LockTokenNotFoundException Cannot find the Lock in the
* Lock Store service
* @exception AccessDeniedException Insufficient credentials to allow
* forced removal of locks
*/
public void kill(CredentialsToken credentialsToken, SubjectNode subject)
- throws ServiceConnectionFailedException, ServiceAccessException,
- AccessDeniedException, LockTokenNotFoundException,
- ObjectNotFoundException, LinkedObjectNotFoundException {
+ throws ServiceAccessException, AccessDeniedException,
+ LockTokenNotFoundException, ObjectNotFoundException {
// We retrieve the enumeration of locks which have been put on the
// subject.
@@ -315,18 +289,13 @@
*
* @param credentialsToken Credentials token
* @param objectUri Object on which we want to enumerate locks
- * @exception ServiceConnectionFailedException Connection to Lock Store
- * service failed
* @exception ServiceAccessException Low level service access exception
* @exception ObjectNotFoundException One of the objects referenced
* in the lock token were not found
- * @exception LinkedObjectNotFoundException Broken link encountered
- * during object retrieval
*/
public Enumeration enumerateLocks(CredentialsToken credentialsToken,
String objectUri)
- throws ServiceConnectionFailedException, ServiceAccessException,
- ObjectNotFoundException, LinkedObjectNotFoundException,
+ throws ServiceAccessException, ObjectNotFoundException,
LockTokenNotFoundException {
// We retrieve the LockStore service from the namespace.
Vector locksVector = new Vector();