jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1397371 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/api/ main/java/org/apache/jackrabbit/oak/core/ main/java/org/apache/jackrabbit/oak/kernel/ main/java/org/apache/jackrabbit/oak/plugins/memory/ main/java/o...
Date Thu, 11 Oct 2012 23:27:26 GMT
Author: mduerig
Date: Thu Oct 11 23:27:25 2012
New Revision: 1397371

URL: http://svn.apache.org/viewvc?rev=1397371&view=rev
Log:
OAK-350: Unify PropertyState and CoreValue
- Remove now obsolete CoreValueFactory and CoreValue

Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CoreValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/CoreValueFactory.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/BinaryValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BinaryValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/BooleanValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DecimalValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/DoubleValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/GenericValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/LongValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryValue.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryValueFactory.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/StringValue.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryTest.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentSession.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/AbstractQueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/JsopUtil.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/JsopUtilTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentSession.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentSession.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/ContentSession.java
Thu Oct 11 23:27:25 2012
@@ -83,13 +83,5 @@ public interface ContentSession extends 
     @Nonnull
     Root getLatestRoot();
 
-    /**
-     * Returns the internal value factory.
-     *
-     * @return the internal value factory.
-     */
-    @Nonnull
-    CoreValueFactory getCoreValueFactory();
-
     // TODO : add versioning operations
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java Thu
Oct 11 23:27:25 2012
@@ -135,11 +135,4 @@ public interface Root {
     @Nonnull
     SessionQueryEngine getQueryEngine();
 
-    /**
-     * Get the value factory.
-     *
-     * @return the value factory
-     */
-    CoreValueFactory getValueFactory();
-
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
Thu Oct 11 23:27:25 2012
@@ -24,7 +24,6 @@ import javax.security.auth.login.LoginEx
 
 import org.apache.jackrabbit.oak.api.AuthInfo;
 import org.apache.jackrabbit.oak.api.ContentSession;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.spi.commit.ConflictHandlerProvider;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
@@ -95,9 +94,4 @@ class ContentSessionImpl implements Cont
         return workspaceName;
     }
 
-    @Nonnull
-    @Override
-    public CoreValueFactory getCoreValueFactory() {
-        return store.getValueFactory();
-    }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
Thu Oct 11 23:27:25 2012
@@ -28,7 +28,6 @@ import javax.security.auth.Subject;
 
 import org.apache.jackrabbit.oak.api.ChangeExtractor;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.SessionQueryEngine;
 import org.apache.jackrabbit.oak.api.TreeLocation;
@@ -254,11 +253,6 @@ public class RootImpl implements Root {
         return new SessionQueryEngineImpl(store, indexProvider);
     }
 
-    @Override
-    public CoreValueFactory getValueFactory() {
-        return store.getValueFactory();
-    }
-
     //-----------------------------------------------------------< internal >---
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
Thu Oct 11 23:27:25 2012
@@ -22,7 +22,6 @@ import javax.annotation.Nonnull;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.mk.api.MicroKernelException;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
 import org.apache.jackrabbit.oak.spi.commit.EmptyObserver;
@@ -122,11 +121,6 @@ public class KernelNodeStore implements 
         return new KernelNodeStoreBranch(this, getRoot());
     }
 
-    @Override
-    public CoreValueFactory getValueFactory() {
-        return new CoreValueFactoryImpl(kernel);
-    }
-
     //-----------------------------------------------------------< internal >---
 
     @Nonnull

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
Thu Oct 11 23:27:25 2012
@@ -19,7 +19,6 @@ package org.apache.jackrabbit.oak.plugin
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
@@ -43,11 +42,6 @@ public class MemoryNodeStore implements 
         return new MemoryNodeStoreBranch(root.get());
     }
 
-    @Override
-    public CoreValueFactory getValueFactory() {
-        return MemoryValueFactory.INSTANCE;
-    }
-
     private class MemoryNodeStoreBranch implements NodeStoreBranch {
 
         private final NodeState base;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImpl.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/TokenProviderImpl.java
Thu Oct 11 23:27:25 2012
@@ -36,7 +36,6 @@ import javax.jcr.SimpleCredentials;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.api.security.authentication.token.TokenCredentials;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java
Thu Oct 11 23:27:25 2012
@@ -18,8 +18,6 @@ package org.apache.jackrabbit.oak.spi.st
 
 import javax.annotation.Nonnull;
 
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
-
 /**
  * Storage abstraction for trees. At any given point in time the stored
  * tree is rooted at a single immutable node state.
@@ -46,12 +44,4 @@ public interface NodeStore {
     @Nonnull
     NodeStoreBranch branch();
 
-    /**
-     * Returns the factory for creating values used for building node states.
-     *
-     * @return value factory
-     */
-    @Nonnull
-    CoreValueFactory getValueFactory();
-
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/AbstractQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/AbstractQueryTest.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/AbstractQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/AbstractQueryTest.java
Thu Oct 11 23:27:25 2012
@@ -34,7 +34,6 @@ import java.util.Map;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.AbstractOakTest;
 import org.apache.jackrabbit.oak.api.ContentSession;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.Result;
 import org.apache.jackrabbit.oak.api.ResultRow;
 import org.apache.jackrabbit.oak.api.Root;
@@ -63,7 +62,6 @@ public abstract class AbstractQueryTest 
     protected static final String TEST_INDEX_HOME = DEFAULT_INDEX_HOME;
     protected static final String INDEX_DEFINITION_NODE_TYPE = "nam:oak:queryIndexDefinition";
 
-    protected CoreValueFactory vf;
     protected SessionQueryEngine qe;
     protected ContentSession session;
     protected Root root;
@@ -75,7 +73,6 @@ public abstract class AbstractQueryTest 
         session = createAdminSession();
         root = session.getLatestRoot();
         qe = root.getQueryEngine();
-        vf = root.getValueFactory();
         createTestIndexNode();
     }
 
@@ -140,8 +137,7 @@ public abstract class AbstractQueryTest 
     public void bindVariableTest() throws Exception {
         JsopUtil.apply(
                 root,
-                "/ + \"test\": { \"hello\": {\"id\": \"1\"}, \"world\": {\"id\": \"2\"}}",
-                vf);
+                "/ + \"test\": { \"hello\": {\"id\": \"1\"}, \"world\": {\"id\": \"2\"}}");
         root.commit();
 
         Map<String, PropertyValue> sv = new HashMap<String, PropertyValue>();
@@ -249,7 +245,7 @@ public abstract class AbstractQueryTest 
                 } else if (line.startsWith("commit")) {
                     w.println(line);
                     line = line.substring("commit".length()).trim();
-                    JsopUtil.apply(root, line, vf);
+                    JsopUtil.apply(root, line);
                     root.commit();
                 }
                 w.flush();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/JsopUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/JsopUtil.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/JsopUtil.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/JsopUtil.java
Thu Oct 11 23:27:25 2012
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.oak.query;
 
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.commons.PathUtils;
@@ -49,10 +48,9 @@ public class JsopUtil {
      * 
      * @param root
      * @param commit the commit string
-     * @param vf the value factory
      * @throws UnsupportedOperationException if the operation is not supported
      */
-    public static void apply(Root root, String commit, CoreValueFactory vf)
+    public static void apply(Root root, String commit)
             throws UnsupportedOperationException {
         int index = commit.indexOf(' ');
         String path = commit.substring(0, index).trim();
@@ -66,7 +64,7 @@ public class JsopUtil {
         if (tokenizer.matches('-')) {
             removeTree(c, tokenizer);
         } else if (tokenizer.matches('+')) {
-            addTree(c, tokenizer, vf);
+            addTree(c, tokenizer);
         } else {
             throw new UnsupportedOperationException(
                     "Unsupported " + (char) tokenizer.read() + 
@@ -85,14 +83,14 @@ public class JsopUtil {
         t.remove();
     }
 
-    private static void addTree(Tree t, JsopTokenizer tokenizer, CoreValueFactory vf) {
+    private static void addTree(Tree t, JsopTokenizer tokenizer) {
         do {
             String key = tokenizer.readString();
             tokenizer.read(':');
             if (tokenizer.matches('{')) {
                 Tree c = t.addChild(key);
                 if (!tokenizer.matches('}')) {
-                    addTree(c, tokenizer, vf);
+                    addTree(c, tokenizer);
                     tokenizer.read('}');
                 }
             } else if (tokenizer.matches('[')) {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/JsopUtilTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/JsopUtilTest.java?rev=1397371&r1=1397370&r2=1397371&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/JsopUtilTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/JsopUtilTest.java
Thu Oct 11 23:27:25 2012
@@ -19,7 +19,6 @@ package org.apache.jackrabbit.oak.util;
 import org.apache.jackrabbit.oak.AbstractOakTest;
 import org.apache.jackrabbit.oak.api.ContentRepository;
 import org.apache.jackrabbit.oak.api.ContentSession;
-import org.apache.jackrabbit.oak.api.CoreValueFactory;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.query.JsopUtil;
@@ -35,7 +34,6 @@ public class JsopUtilTest extends Abstra
 
     protected ContentSession session;
     protected Root root;
-    protected CoreValueFactory vf;
 
     @Override
     @Before
@@ -43,7 +41,6 @@ public class JsopUtilTest extends Abstra
         super.before();
         session = createAdminSession();
         root = session.getLatestRoot();
-        vf = root.getValueFactory();
     }
 
     @Override
@@ -57,7 +54,7 @@ public class JsopUtilTest extends Abstra
         assertFalse(t.hasChild("test"));
 
         String add = "/ + \"test\": { \"a\": { \"id\": \"123\" }, \"b\": {} }";
-        JsopUtil.apply(root, add, vf);
+        JsopUtil.apply(root, add);
         root.commit();
 
         t = root.getTree("/");
@@ -76,7 +73,7 @@ public class JsopUtilTest extends Abstra
         assertEquals("123", t.getProperty("id").getValue(STRING));
 
         String rm = "/ - \"test\"";
-        JsopUtil.apply(root, rm, vf);
+        JsopUtil.apply(root, rm);
         root.commit();
 
         t = root.getTree("/");



Mime
View raw message