jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1532343 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Editor.java
Date Tue, 15 Oct 2013 14:05:45 GMT
Author: jukka
Date: Tue Oct 15 14:05:44 2013
New Revision: 1532343

URL: http://svn.apache.org/r1532343
Log:
OAK-673: Unified hook processing

Add javadocs to enter/leave

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Editor.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Editor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Editor.java?rev=1532343&r1=1532342&r2=1532343&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Editor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Editor.java
Tue Oct 15 14:05:44 2013
@@ -36,8 +36,31 @@ import javax.annotation.CheckForNull;
  */
 public interface Editor {
 
+    /**
+     * Called before the given before and after states are compared.
+     * The implementation can use this method to initialize any internal
+     * state needed for processing the results of the comparison. For example
+     * an implementation could look up the effective node type of the after
+     * state to know what constraints to apply to on the content changes.
+     *
+     * @param before before state, non-existent if this node was added
+     * @param after after state, non-existent if this node was removed
+     * @throws CommitFailedException if this commit should be rejected
+     */
     void enter(NodeState before, NodeState after) throws CommitFailedException;
 
+    /**
+     * Called after the given before and after states are compared.
+     * The implementation can use this method to post-process information
+     * collected during the content diff. For example an implementation that
+     * during the diff just recorded the fact that this node was modified
+     * in some way could then use this method to trigger an index update
+     * based on that modification flag.
+     *
+     * @param before before state, non-existent if this node was added
+     * @param after after state, non-existent if this node was removed
+     * @throws CommitFailedException if this commit should be rejected
+     */
     void leave(NodeState before, NodeState after) throws CommitFailedException;
 
     /**



Mime
View raw message