jackrabbit-oak-commits mailing list archives

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

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

Include property index updates in the upgrade.
Optimize the hook organization to avoid extra tree traversals

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=1548089&r1=1548088&r2=1548089&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 11:21:27 2013
@@ -38,14 +38,16 @@ import org.apache.jackrabbit.core.nodety
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.plugins.index.CompositeIndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexUpdateProvider;
+import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
 import org.apache.jackrabbit.oak.plugins.index.reference.ReferenceEditorProvider;
 import org.apache.jackrabbit.oak.plugins.name.NamespaceConstants;
 import org.apache.jackrabbit.oak.plugins.name.Namespaces;
 import org.apache.jackrabbit.oak.plugins.nodetype.RegistrationEditorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
-import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
+import org.apache.jackrabbit.oak.spi.commit.CompositeEditorProvider;
 import org.apache.jackrabbit.oak.spi.commit.EditorHook;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
@@ -277,11 +279,12 @@ public class RepositoryUpgrade {
             copyWorkspaces(builder, idxToPrefix);
 
             // TODO: default hooks?
-            CommitHook hook = new CompositeHook(
-                    new EditorHook(new RegistrationEditorProvider()),
-                    new EditorHook(new GroupEditorProvider()),
-                    new EditorHook(new IndexUpdateProvider(new ReferenceEditorProvider()))
-            );
+            CommitHook hook = new EditorHook(new CompositeEditorProvider(
+                    new RegistrationEditorProvider(),
+                    new GroupEditorProvider(),
+                    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