jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1328630 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
Date Sat, 21 Apr 2012 10:30:53 GMT
Author: jukka
Date: Sat Apr 21 10:30:52 2012
New Revision: 1328630

URL: http://svn.apache.org/viewvc?rev=1328630&view=rev
Log:
OAK-18: Define Oak API

Restore the default RepositoryImpl constructor for testing purposes

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java?rev=1328630&r1=1328629&r2=1328630&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
Sat Apr 21 10:30:52 2012
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.oak.jcr;
 
 import org.apache.jackrabbit.commons.SimpleValueFactory;
+import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.slf4j.Logger;
@@ -46,6 +47,14 @@ public class RepositoryImpl implements R
         this.context = context;
     }
 
+    /**
+     * Utility constructor that creates a new in-memory repository for use
+     * mostly in test cases.
+     */
+    public RepositoryImpl() throws RepositoryException {
+        this(new GlobalContext(new MicroKernelImpl()));
+    }
+
     //---------------------------------------------------------< Repository >---
     /**
      * @see javax.jcr.Repository#getDescriptorKeys()



Mime
View raw message