jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1399315 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: core/ContentRepositoryImpl.java core/ContentSessionImpl.java plugins/commit/AnnotatingConflictHandlerProvider.java
Date Wed, 17 Oct 2012 15:56:48 GMT
Author: mduerig
Date: Wed Oct 17 15:56:47 2012
New Revision: 1399315

URL: http://svn.apache.org/viewvc?rev=1399315&view=rev
Log:
OAK-363: Make conflict handler configurable through Oak builder

Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/AnnotatingConflictHandlerProvider.java
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/core/ContentSessionImpl.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=1399315&r1=1399314&r2=1399315&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 Oct 17 15:56:47 2012
@@ -25,15 +25,15 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
-import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandlerProvider;
+import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
-import org.apache.jackrabbit.oak.spi.commit.ConflictHandlerProvider;
+import org.apache.jackrabbit.oak.spi.commit.ConflictHandler;
 import org.apache.jackrabbit.oak.spi.query.CompositeQueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
-import org.apache.jackrabbit.oak.spi.security.authentication.LoginContextProvider;
 import org.apache.jackrabbit.oak.spi.security.authentication.LoginContext;
+import org.apache.jackrabbit.oak.spi.security.authentication.LoginContextProvider;
 import org.apache.jackrabbit.oak.spi.security.authorization.AccessControlProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.slf4j.Logger;
@@ -51,8 +51,7 @@ public class ContentRepositoryImpl imple
     // TODO: retrieve default wsp-name from configuration
     private static final String DEFAULT_WORKSPACE_NAME = "default";
 
-    private static final ConflictHandlerProvider DEFAULT_CONFLICT_HANDLER_PROVIDER =
-            new AnnotatingConflictHandlerProvider();
+    private static final ConflictHandler DEFAULT_CONFLICT = new AnnotatingConflictHandler();
 
     private final SecurityProvider securityProvider;
     private final QueryIndexProvider indexProvider;
@@ -111,7 +110,7 @@ public class ContentRepositoryImpl imple
 
         AccessControlProvider acProvider = securityProvider.getAccessControlProvider();
         return new ContentSessionImpl(loginContext, acProvider, workspaceName,
-                nodeStore, DEFAULT_CONFLICT_HANDLER_PROVIDER, indexProvider);
+                nodeStore, DEFAULT_CONFLICT, indexProvider);
     }
 
     //--------------------------------------------------------------------------

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java?rev=1399315&r1=1399314&r2=1399315&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
Wed Oct 17 15:56:47 2012
@@ -27,7 +27,7 @@ import org.apache.jackrabbit.oak.api.Aut
 import org.apache.jackrabbit.oak.api.Blob;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.Root;
-import org.apache.jackrabbit.oak.spi.commit.ConflictHandlerProvider;
+import org.apache.jackrabbit.oak.spi.commit.ConflictHandler;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.security.authentication.LoginContext;
 import org.apache.jackrabbit.oak.spi.security.authorization.AccessControlProvider;
@@ -46,18 +46,18 @@ class ContentSessionImpl implements Cont
     private final AccessControlProvider accProvider;
     private final String workspaceName;
     private final NodeStore store;
-    private final ConflictHandlerProvider conflictHandlerProvider;
+    private final ConflictHandler conflictHandler;
     private final QueryIndexProvider indexProvider;
 
     public ContentSessionImpl(LoginContext loginContext,
             AccessControlProvider accProvider, String workspaceName,
-            NodeStore store, ConflictHandlerProvider conflictHandlerProvider,
+            NodeStore store, ConflictHandler conflictHandler,
             QueryIndexProvider indexProvider) {
         this.loginContext = loginContext;
         this.accProvider = accProvider;
         this.workspaceName = workspaceName;
         this.store = store;
-        this.conflictHandlerProvider = conflictHandlerProvider;
+        this.conflictHandler = conflictHandler;
         this.indexProvider = indexProvider;
     }
 
@@ -76,8 +76,8 @@ class ContentSessionImpl implements Cont
     @Override
     public Root getLatestRoot() {
         RootImpl root = new RootImpl(store, workspaceName, loginContext.getSubject(), accProvider,
indexProvider);
-        if (conflictHandlerProvider != null) {
-            root.setConflictHandler(conflictHandlerProvider.getConflictHandler());
+        if (conflictHandler != null) {
+            root.setConflictHandler(conflictHandler);
         }
         return root;
     }



Mime
View raw message