jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1434837 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr: NodeImpl.java SessionDelegate.java SessionImpl.java query/QueryImpl.java
Date Thu, 17 Jan 2013 18:12:19 GMT
Author: mduerig
Date: Thu Jan 17 18:12:19 2013
New Revision: 1434837

URL: http://svn.apache.org/viewvc?rev=1434837&view=rev
Log:
OAK-563: Rename SessionDelegate...OrThrow methods
rename getOakPathOrThrow to getOakPath to be consistent with corresponding Name method

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.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=1434837&r1=1434836&r2=1434837&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
Thu Jan 17 18:12:19 2013
@@ -223,7 +223,7 @@ public class NodeImpl<T extends NodeDele
             public Node perform() throws RepositoryException {
                 String oakPath = sessionDelegate.getOakPathKeepIndexOrThrowNotFound(relPath);
                 String oakName = PathUtils.getName(oakPath);
-                String parentPath = sessionDelegate.getOakPathOrThrow(PathUtils.getParentPath(oakPath));
+                String parentPath = sessionDelegate.getOakPath(PathUtils.getParentPath(oakPath));
 
                 // handle index
                 if (oakName.contains("[")) {
@@ -767,7 +767,7 @@ public class NodeImpl<T extends NodeDele
         return sessionDelegate.perform(new SessionOperation<Boolean>() {
             @Override
             public Boolean perform() throws RepositoryException {
-                String oakPath = sessionDelegate.getOakPathOrThrow(relPath);
+                String oakPath = sessionDelegate.getOakPath(relPath);
                 return dlg.getChild(oakPath) != null;
             }
         });
@@ -780,7 +780,7 @@ public class NodeImpl<T extends NodeDele
         return sessionDelegate.perform(new SessionOperation<Boolean>() {
             @Override
             public Boolean perform() throws RepositoryException {
-                String oakPath = sessionDelegate.getOakPathOrThrow(relPath);
+                String oakPath = sessionDelegate.getOakPath(relPath);
                 return dlg.getProperty(oakPath) != null;
             }
         });
@@ -1099,8 +1099,8 @@ public class NodeImpl<T extends NodeDele
      */
     @Override
     public boolean isLocked() throws RepositoryException {
-        String lockOwner = sessionDelegate.getOakPathOrThrow(JCR_LOCK_OWNER);
-        String lockIsDeep = sessionDelegate.getOakPathOrThrow(JCR_LOCK_IS_DEEP);
+        String lockOwner = sessionDelegate.getOakPath(JCR_LOCK_OWNER);
+        String lockIsDeep = sessionDelegate.getOakPath(JCR_LOCK_IS_DEEP);
 
         if (dlg.getProperty(lockOwner) != null) {
             return true;
@@ -1127,7 +1127,7 @@ public class NodeImpl<T extends NodeDele
      */
     @Override
     public boolean holdsLock() throws RepositoryException {
-        String lockOwner = sessionDelegate.getOakPathOrThrow(JCR_LOCK_OWNER);
+        String lockOwner = sessionDelegate.getOakPath(JCR_LOCK_OWNER);
         return dlg.getProperty(lockOwner) != null;
     }
 
@@ -1149,8 +1149,8 @@ public class NodeImpl<T extends NodeDele
             throws RepositoryException {
         final String userID = getSession().getUserID();
 
-        String lockOwner = sessionDelegate.getOakPathOrThrow(JCR_LOCK_OWNER);
-        String lockIsDeep = sessionDelegate.getOakPathOrThrow(JCR_LOCK_IS_DEEP);
+        String lockOwner = sessionDelegate.getOakPath(JCR_LOCK_OWNER);
+        String lockIsDeep = sessionDelegate.getOakPath(JCR_LOCK_IS_DEEP);
         try {
             ContentSession session = sessionDelegate.getContentSession();
             Root root = session.getLatestRoot();
@@ -1223,8 +1223,8 @@ public class NodeImpl<T extends NodeDele
      */
     @Override
     public void unlock() throws RepositoryException {
-        String lockOwner = sessionDelegate.getOakPathOrThrow(JCR_LOCK_OWNER);
-        String lockIsDeep = sessionDelegate.getOakPathOrThrow(JCR_LOCK_IS_DEEP);
+        String lockOwner = sessionDelegate.getOakPath(JCR_LOCK_OWNER);
+        String lockIsDeep = sessionDelegate.getOakPath(JCR_LOCK_IS_DEEP);
         try {
             Root root = sessionDelegate.getContentSession().getLatestRoot();
             Tree tree = root.getTree(dlg.getPath());
@@ -1407,7 +1407,7 @@ public class NodeImpl<T extends NodeDele
     // FIXME OAK-505: hack to filter for a subset of supported mixins for now
     // this allows only harmless mixin types so that other code like addMixin gets test coverage
     private boolean isSupportedMixinName(String mixinName) throws RepositoryException {
-        String oakName = sessionDelegate.getOakPathOrThrow(mixinName);
+        String oakName = sessionDelegate.getOakPath(mixinName);
         return "mix:title".equals(oakName) ||
             NodeTypeConstants.MIX_REFERENCEABLE.equals(oakName) ||
             NodeTypeConstants.MIX_VERSIONABLE.equals(oakName) ||
@@ -1435,7 +1435,7 @@ public class NodeImpl<T extends NodeDele
                 }
                 // TODO: END
 
-                String jcrPrimaryType = sessionDelegate.getOakPathOrThrow(Property.JCR_PRIMARY_TYPE);
+                String jcrPrimaryType = sessionDelegate.getOakPath(Property.JCR_PRIMARY_TYPE);
                 Value value = sessionDelegate.getValueFactory().createValue(nodeTypeName,
PropertyType.NAME);
                 dlg.setProperty(jcrPrimaryType, value);
                 return null;
@@ -1451,7 +1451,7 @@ public class NodeImpl<T extends NodeDele
         return sessionDelegate.perform(new SessionOperation<Property>() {
             @Override
             public Property perform() throws RepositoryException {
-                String oakName = sessionDelegate.getOakPathOrThrow(jcrName);
+                String oakName = sessionDelegate.getOakPath(jcrName);
                 if (value == null) {
                     if (hasProperty(jcrName)) {
                         Property property = getProperty(jcrName);
@@ -1491,7 +1491,7 @@ public class NodeImpl<T extends NodeDele
         return sessionDelegate.perform(new SessionOperation<Property>() {
             @Override
             public Property perform() throws RepositoryException {
-                String oakName = sessionDelegate.getOakPathOrThrow(jcrName);
+                String oakName = sessionDelegate.getOakPath(jcrName);
                 if (values == null) {
                     if (hasProperty(jcrName)) {
                         Property property = getProperty(jcrName);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java?rev=1434837&r1=1434836&r2=1434837&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
Thu Jan 17 18:12:19 2013
@@ -337,7 +337,7 @@ public class SessionDelegate {
      * @throws RepositoryException if the path can not be mapped
      */
     @Nonnull
-    public String getOakPathOrThrow(String jcrPath)
+    public String getOakPath(String jcrPath)
             throws RepositoryException {
         String oakPath = getOakPathOrNull(jcrPath);
         if (oakPath != null) {

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java?rev=1434837&r1=1434836&r2=1434837&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Thu Jan 17 18:12:19 2013
@@ -192,7 +192,7 @@ public class SessionImpl extends Abstrac
         return dlg.perform(new SessionOperation<NodeImpl>() {
             @Override
             public NodeImpl perform() throws RepositoryException {
-                String oakPath = dlg.getOakPathOrThrow(absPath);
+                String oakPath = dlg.getOakPath(absPath);
                 NodeDelegate d = dlg.getNode(oakPath);
                 if (d == null) {
                     throw new PathNotFoundException("Node with path " + absPath + " does
not exist.");
@@ -209,7 +209,7 @@ public class SessionImpl extends Abstrac
         return dlg.perform(new SessionOperation<Boolean>() {
             @Override
             public Boolean perform() throws RepositoryException {
-                String oakPath = dlg.getOakPathOrThrow(absPath);
+                String oakPath = dlg.getOakPath(absPath);
                 return dlg.getNode(oakPath) != null;
             }
         });

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java?rev=1434837&r1=1434836&r2=1434837&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
Thu Jan 17 18:12:19 2013
@@ -132,7 +132,7 @@ public class QueryImpl implements Query 
     public Node storeAsNode(String absPath) throws RepositoryException {
         manager.ensureIsAlive();
         SessionDelegate sessionDelegate = manager.getSessionDelegate();
-        String oakPath = sessionDelegate.getOakPathOrThrow(absPath);
+        String oakPath = sessionDelegate.getOakPath(absPath);
         String parent = PathUtils.getParentPath(oakPath);
         NodeDelegate parentDelegate = sessionDelegate.getNode(parent);
         if (parentDelegate == null) {



Mime
View raw message