jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1548118 - /jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java
Date Thu, 05 Dec 2013 12:54:03 GMT
Author: jukka
Date: Thu Dec  5 12:54:03 2013
New Revision: 1548118

URL: http://svn.apache.org/r1548118
Log:
OAK-458: Define upgrade from Jackrabbit2.x to Jackrabbit OAK

GroupEditor needs to run before the reference index update

Modified:
    jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java

Modified: jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java?rev=1548118&r1=1548117&r2=1548118&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java
(original)
+++ jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java
Thu Dec  5 12:54:03 2013
@@ -48,6 +48,7 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.CompositeEditorProvider;
+import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
 import org.apache.jackrabbit.oak.spi.commit.EditorHook;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
@@ -279,12 +280,13 @@ public class RepositoryUpgrade {
             copyWorkspaces(builder, idxToPrefix);
 
             // TODO: default hooks?
-            CommitHook hook = new EditorHook(new CompositeEditorProvider(
-                    new RegistrationEditorProvider(),
-                    new GroupEditorProvider(),
-                    new IndexUpdateProvider(new CompositeIndexEditorProvider(
-                            new ReferenceEditorProvider(),
-                            new PropertyIndexEditorProvider()))));
+            CommitHook hook = new CompositeHook(
+                    new EditorHook(new GroupEditorProvider()),
+                    new EditorHook(new CompositeEditorProvider(
+                            new RegistrationEditorProvider(),
+                            new IndexUpdateProvider(new CompositeIndexEditorProvider(
+                                    new ReferenceEditorProvider(),
+                                    new PropertyIndexEditorProvider())))));
             target.merge(builder, hook, null);
         } catch (Exception e) {
             throw new RepositoryException("Failed to copy content", e);



Mime
View raw message