jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1304617 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Date Fri, 23 Mar 2012 21:38:21 GMT
Author: mduerig
Date: Fri Mar 23 21:38:20 2012
New Revision: 1304617

URL: http://svn.apache.org/viewvc?rev=1304617&view=rev
Log:
OAK-15: Clean up oak-jcr

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1304617&r1=1304616&r2=1304617&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Fri Mar 23 21:38:20 2012
@@ -47,6 +47,7 @@ import javax.jcr.RepositoryException;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.Value;
 import javax.jcr.lock.Lock;
+import javax.jcr.lock.LockManager;
 import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.version.Version;
@@ -635,7 +636,6 @@ public class NodeImpl extends ItemImpl i
         checkSessionHasPendingChanges();
 
         // TODO
-
     }
 
     /**
@@ -683,7 +683,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public boolean isCheckedOut() throws RepositoryException {
-        return getSession().getWorkspace().getVersionManager().isCheckedOut(getPath());
+        return getVersionManager().isCheckedOut(getPath());
     }
 
     /**
@@ -691,7 +691,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public void restore(String versionName, boolean removeExisting) throws RepositoryException
{
-        getSession().getWorkspace().getVersionManager().restore(getPath(), versionName, removeExisting);
+        getVersionManager().restore(getPath(), versionName, removeExisting);
     }
 
     /**
@@ -699,7 +699,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public void restore(Version version, boolean removeExisting) throws RepositoryException
{
-        getSession().getWorkspace().getVersionManager().restore(version, removeExisting);
+        getVersionManager().restore(version, removeExisting);
     }
 
     /**
@@ -745,7 +745,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public Lock lock(boolean isDeep, boolean isSessionScoped) throws RepositoryException
{
-        return getSession().getWorkspace().getLockManager().lock(getPath(), isDeep, isSessionScoped,
Long.MAX_VALUE, null);
+        return getLockManager().lock(getPath(), isDeep, isSessionScoped, Long.MAX_VALUE,
null);
     }
 
     /**
@@ -753,7 +753,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public Lock getLock() throws RepositoryException {
-        return getSession().getWorkspace().getLockManager().getLock(getPath());
+        return getLockManager().getLock(getPath());
     }
 
     /**
@@ -761,7 +761,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public void unlock() throws RepositoryException {
-        getSession().getWorkspace().getLockManager().unlock(getPath());
+        getLockManager().unlock(getPath());
     }
 
     /**
@@ -769,7 +769,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public boolean holdsLock() throws RepositoryException {
-        return getSession().getWorkspace().getLockManager().holdsLock(getPath());
+        return getLockManager().holdsLock(getPath());
     }
 
     /**
@@ -777,7 +777,7 @@ public class NodeImpl extends ItemImpl i
      */
     @Override
     public boolean isLocked() throws RepositoryException {
-        return getSession().getWorkspace().getLockManager().isLocked(getPath());
+        return getLockManager().isLocked(getPath());
     }
 
 
@@ -790,13 +790,11 @@ public class NodeImpl extends ItemImpl i
     @Override
     public void removeSharedSet() throws RepositoryException {
         // TODO
-
     }
 
     @Override
     public void removeShare() throws RepositoryException {
         // TODO
-
     }
 
     /**
@@ -828,6 +826,10 @@ public class NodeImpl extends ItemImpl i
         return getSession().getWorkspace().getVersionManager();
     }
 
+    private LockManager getLockManager() throws RepositoryException {
+        return getSession().getWorkspace().getLockManager();
+    }
+
     private Path path() {
         return state.getPath();
     }



Mime
View raw message