jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1336131 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: core/ContentRepositoryImpl.java kernel/KernelNodeStore.java
Date Wed, 09 May 2012 12:21:14 GMT
Author: jukka
Date: Wed May  9 12:21:14 2012
New Revision: 1336131

URL: http://svn.apache.org/viewvc?rev=1336131&view=rev
Log:
OAK-68: Extension point for commit validation

Add placeholder for the commit hook

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java?rev=1336131&r1=1336130&r2=1336131&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
Wed May  9 12:21:14 2012
@@ -23,6 +23,7 @@ import org.apache.jackrabbit.oak.api.Con
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.QueryEngine;
 import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
+import org.apache.jackrabbit.oak.spi.commit.EmptyCommitHook;
 import org.apache.jackrabbit.oak.spi.security.authentication.CallbackHandlerImpl;
 import org.apache.jackrabbit.oak.spi.security.authentication.ConfigurationImpl;
 import org.apache.jackrabbit.oak.query.QueryEngineImpl;
@@ -76,7 +77,7 @@ public class ContentRepositoryImpl imple
      */
     public ContentRepositoryImpl(MicroKernel mk, QueryIndexProvider indexProvider) {
         microKernel = mk;
-        nodeStore = new KernelNodeStore(microKernel);
+        nodeStore = new KernelNodeStore(microKernel, new EmptyCommitHook());
         QueryIndexProvider qip = (indexProvider == null) ? getDefaultIndexProvider(microKernel)
: indexProvider;
         queryEngine = new QueryEngineImpl(nodeStore, microKernel, qip);
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java?rev=1336131&r1=1336130&r2=1336131&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
Wed May  9 12:21:14 2012
@@ -24,6 +24,7 @@ import org.apache.jackrabbit.oak.api.Pro
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeState;
+import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.state.AbstractNodeState;
 import org.apache.jackrabbit.oak.spi.state.AbstractNodeStore;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
@@ -57,6 +58,11 @@ public class KernelNodeStore extends Abs
     private final MicroKernel kernel;
 
     /**
+     * Commit hook.
+     */
+    private final CommitHook commitHook;
+
+    /**
      * Value factory backed by the {@link #kernel} instance.
      */
     private final CoreValueFactory valueFactory;
@@ -66,8 +72,9 @@ public class KernelNodeStore extends Abs
      */
     private KernelNodeState root;
 
-    public KernelNodeStore(MicroKernel kernel) {
+    public KernelNodeStore(MicroKernel kernel, CommitHook commitHook) {
         this.kernel = kernel;
+        this.commitHook = commitHook;
         this.valueFactory = new CoreValueFactoryImpl(kernel);
         this.root = new KernelNodeState(
                 kernel, valueFactory, "/", kernel.getHeadRevision());



Mime
View raw message