jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1336184 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/PathMapper.java
Date Wed, 09 May 2012 13:20:33 GMT
Author: jukka
Date: Wed May  9 13:20:33 2012
New Revision: 1336184

URL: http://svn.apache.org/viewvc?rev=1336184&view=rev
Log:
OAK-89: Improve exception handling

Define how PathMapper should deal with error cases

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/PathMapper.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/PathMapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/PathMapper.java?rev=1336184&r1=1336183&r2=1336184&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/PathMapper.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/PathMapper.java
Wed May  9 13:20:33 2012
@@ -21,8 +21,27 @@ package org.apache.jackrabbit.oak.namepa
  */
 public interface PathMapper {
 
+    /**
+     * Returns the Oak path for the given JCR path, or {@code null} if no
+     * such mapping exists because the given JCR path contains a name element
+     * with an unknown namespace URI or prefix, or is otherwise invalid.
+     *
+     * @param jcrPath JCR path
+     * @return Oak path, or {@code null}
+     */
     String getOakPath(String jcrPath);
 
+    /**
+     * Returns the JCR path for the given Oak path. The given path is
+     * expected to have come from a valid Oak repository that contains
+     * only valid paths whose name elements only use proper namespace
+     * mappings. If that's not the case, either a programming error or
+     * a repository corruption has occurred and an appropriate unchecked
+     * exception gets thrown.
+     *
+     * @param oakPath Oak path
+     * @return JCR path
+     */
     String getJcrPath(String oakPath);
 
 }



Mime
View raw message