jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r478583 - /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
Date Thu, 23 Nov 2006 14:12:04 GMT
Author: angela
Date: Thu Nov 23 06:12:04 2006
New Revision: 478583

URL: http://svn.apache.org/viewvc?view=rev&rev=478583
Log:
work in progress

ups

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java?view=diff&rev=478583&r1=478582&r2=478583
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
Thu Nov 23 06:12:04 2006
@@ -36,6 +36,8 @@
     private final boolean isDeep;
     private final boolean isSessionScoped;
 
+    private LockInfo lockInfo = null;
+
     private LockOperation(NodeState nodeState, boolean isDeep, boolean isSessionScoped) {
         this.nodeState = nodeState;
         this.isDeep = isDeep;
@@ -75,10 +77,19 @@
     }
 
     public void setLockInfo(LockInfo lockInfo) {
+        if (lockInfo == null) {
+            throw new IllegalArgumentException("IdIterator must not be null.");
+        }
+        if (this.lockInfo != null) {
+            throw new IllegalStateException("Merge operation has already been executed ->
FailedIds already set.");
+        }
         this.lockInfo = lockInfo;
     }
 
     public LockInfo getLockInfo() {
+        if (lockInfo == null) {
+            throw new IllegalStateException("Merge operation has not been executed yet.");
+        }
         return lockInfo;
     }
     //------------------------------------------------------------< Factory >---



Mime
View raw message