jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: svn commit: r1392352 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/ oak-core/src/main/java/org/apache/jackrabbit/oak/core/ oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/ oak-core/src/main/java/org/apache/jackrabbi...
Date Mon, 01 Oct 2012 16:22:54 GMT


On 1.10.12 15:36, mreutegg@apache.org 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

Mime
View raw message