On 1.10.12 15:36, [email protected] wrote:
Author: mreutegg
Date: Mon Oct  1 14:36:57 2012
New Revision: 1392352

URL: http://svn.apache.org/viewvc?rev=1392352&view=rev
Log:
OAK-41: Initial repository setup

[...]
+public class InitialContent extends DefaultMicroKernelTracker {
+
+    @Override
+    public void available(MicroKernel mk) {
+        NodeStore nodeStore = new Oak(mk).createNodeStore();
+        // FIXME: depends on CoreValue's name mangling
+        NodeState root = nodeStore.getRoot();
+        if (root.hasChildNode("jcr:system")) {
+            mk.commit("/", "^\"jcr:primaryType\":\"nam:rep:root\" ", null, 
null);
+        } else {
+            mk.commit("/", "^\"jcr:primaryType\":\"nam:rep:root\"" +
+                    "+\"jcr:system\":{" +
+                    "\"jcr:primaryType\"    :\"nam:rep:system\"," +
+                    "\":unique\"            
:{\"jcr:uuid\":{},\"rep:authorizableId\":{},\"rep:principalName\":{}}," +
+                    "\"jcr:versionStorage\" 
:{\"jcr:primaryType\":\"nam:rep:versionStorage\"}," +
+                    "\"jcr:nodeTypes\"      
:{\"jcr:primaryType\":\"nam:rep:nodeTypes\"}," +
+                    "\"jcr:activities\"     
:{\"jcr:primaryType\":\"nam:rep:Activities\"}," +
+                    "\"rep:privileges\"     
:{\"jcr:primaryType\":\"nam:rep:Privileges\"}}", null, null);
+        }
+
+        BuiltInNodeTypes.register(new Oak(mk).createRoot());
+    }
+}

Shouldn't it be pretty easy to resolve this FIXME now? I.e. either use a Root instance or a NodeStore and NodeBuilders for adding this initial structure?

Michael

Reply via email to