jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1336182 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NameMapper.java
Date Wed, 09 May 2012 13:19:58 GMT
Author: jukka
Date: Wed May  9 13:19:57 2012
New Revision: 1336182

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

Define how NameMapper should deal with error cases

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NameMapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NameMapper.java?rev=1336182&r1=1336181&r2=1336182&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NameMapper.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NameMapper.java
Wed May  9 13:19:57 2012
@@ -18,9 +18,26 @@ package org.apache.jackrabbit.oak.namepa
 
 public interface NameMapper {
 
-    // TODO consider error handling
+    /**
+     * Returns the Oak name for the given JCR name, or {@code null} if no
+     * such mapping exists because the given JCR name contains an unknown
+     * namespace URI or prefix, or is otherwise invalid.
+     *
+     * @param jcrName JCR name
+     * @return Oak name, or {@code null}
+     */
     String getOakName(String jcrName);
 
-    // TODO consider error handling
+    /**
+     * Returns the JCR name for the given Oak name. The given name is
+     * expected to have come from a valid Oak repository that contains
+     * only valid names with 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 oakName Oak name
+     * @return JCR name
+     */
     String getJcrName(String oakName);
+
 }



Mime
View raw message