jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1330723 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/JcrNameParser.java
Date Thu, 26 Apr 2012 09:01:07 GMT
Author: angela
Date: Thu Apr 26 09:01:07 2012
New Revision: 1330723

URL: http://svn.apache.org/viewvc?rev=1330723&view=rev
Log:
javadoc

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/JcrNameParser.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/JcrNameParser.java?rev=1330723&r1=1330722&r2=1330723&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/JcrNameParser.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/JcrNameParser.java
Thu Apr 26 09:01:07 2012
@@ -16,9 +16,15 @@
  */
 package org.apache.jackrabbit.oak.namepath;
 
-
 import org.apache.jackrabbit.util.XMLChar;
 
+/**
+ * Parses and validates JCR names. Upon successful completion of
+ * {@link #parse(String, org.apache.jackrabbit.oak.namepath.JcrNameParser.Listener)}
+ * the specified listener is informed about the (resulting) JCR name.
+ * In case of failure {@link Listener#error(String)} is called indicating
+ * the reason.
+ */
 public class JcrNameParser {
 
     // constants for parser
@@ -29,14 +35,41 @@ public class JcrNameParser {
     private static final int STATE_URI_START = 4;
     private static final int STATE_URI = 5;
 
+    /**
+     * Listener interface for this name parser.
+     */
     interface Listener {
+
+        /**
+         * Informs this listener that parsing the jcr name failed.
+         *
+         * @param message Details about the error.
+         * @see JcrNameParser#parse(String, org.apache.jackrabbit.oak.namepath.JcrNameParser.Listener)
+         */
         void error(String message);
+
+        /**
+         * Informs this listener about the result of {@link JcrNameParser#parse(String, org.apache.jackrabbit.oak.namepath.JcrNameParser.Listener)}
+         *
+         * @param name The resulting name upon successful completion of
+         * {@link JcrNameParser#parse(String, org.apache.jackrabbit.oak.namepath.JcrNameParser.Listener)}
+         */
         void name(String name);
     }
 
+    /**
+     * Avoid instantiation
+     */
     private JcrNameParser() {
     }
 
+    /**
+     * Parse the specified jcr name and inform the specified {@code listener}
+     * about the result or any error that may occur during parsing.
+     *
+     * @param jcrName The jcr name to be parsed.
+     * @param listener The listener to be informed about success or failure.
+     */
     public static void parse(String jcrName, Listener listener) {
         // trivial check
         int len = jcrName == null ? 0 : jcrName.length();



Mime
View raw message