jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1185750 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src: main/java/org/apache/jackrabbit/spi2microkernel/ test/java/org/apache/jackrabbit/spi2microkernel/
Date Tue, 18 Oct 2011 16:46:46 GMT
Author: mduerig
Date: Tue Oct 18 16:46:45 2011
New Revision: 1185750

URL: http://svn.apache.org/viewvc?rev=1185750&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
use json formatting for all commit messages

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/NodeTypeStore.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/NodeTypeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/NodeTypeStore.java?rev=1185750&r1=1185749&r2=1185750&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/NodeTypeStore.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/NodeTypeStore.java
Tue Oct 18 16:46:45 2011
@@ -133,7 +133,8 @@ public class NodeTypeStore {
                 jsop.append("-\"").append(NT_DEFINITION_NAME).append("\"\r");
             }
             jsop.append("+\"").append(NT_DEFINITION_NAME).append("\":").append(sb);
-            microKernel.commit('/' + systemWorkspace, jsop.toString(), rev, "register default
node types");
+            microKernel.commit('/' + systemWorkspace, jsop.toString(), rev,
+                    new CommitInfo().setMessage("register default node types").toJson());
         }
         catch (IOException e) {
             log.error(e.getMessage(), e);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1185750&r1=1185749&r2=1185750&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Tue Oct 18 16:46:45 2011
@@ -899,8 +899,8 @@ public class RepositoryServiceImpl exten
             }
 
             String repRoot = Values.nameToString(NameConstants.REP_ROOT);
-            microKernel.commit("/", "+\"" + name + "\" : {\"{jcr}primaryType\":" + repRoot
+ '}',
-                    revisionId, "create workspace " + name);
+            microKernel.commit("/", "+\"" + name + "\" : {\"{jcr}primaryType\":" + repRoot
+ '}', revisionId,
+                    new CommitInfo().setMessage("create workspace " + name).toJson());
         }
         catch (MicroKernelException e) {
             log.error(e.getMessage(), e);
@@ -921,7 +921,8 @@ public class RepositoryServiceImpl exten
                 throw new NoSuchWorkspaceException("No such workspace: " + name);
             }
 
-            microKernel.commit("/", "-\"" + name + '\"', revisionId, "delete workspace");
+            microKernel.commit("/", "-\"" + name + '\"', revisionId,
+                    new CommitInfo().setMessage("delete workspace").toJson());
         }
         catch (MicroKernelException e) {
             log.error(e.getMessage(), e);
@@ -1071,8 +1072,7 @@ public class RepositoryServiceImpl exten
                 @Override
                 public String apply(MicroKernel microKernel) throws RepositoryException {
                     String rev = getRevision(sessionInfo);
-                    CommitInfo commitInfo = commitInfo(sessionInfo);
-                    return microKernel.commit("/", jsop.toString(), rev, commitInfo.toJson());
+                    return microKernel.commit("/", jsop.toString(), rev, commitInfo(sessionInfo).toJson());
                 }
             });
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java?rev=1185750&r1=1185749&r2=1185750&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Tue Oct 18 16:46:45 2011
@@ -113,9 +113,9 @@ public class RepositoryTest {
                             "\"{}stringProp\":\"stringVal\"," +
                             "\"{}intProp\":42," +
                             "\"{}mvProp\":[1,2,3]}, " +
-                            "\"{}bar\" : {}}", head, "");
+                            "\"{}bar\" : {}}", head, "{}");
 
-            mk.commit("/default", "+\"{}" + testNode + "\" : {" + ptUnstructured + '}', head,
"");
+            mk.commit("/default", "+\"{}" + testNode + "\" : {" + ptUnstructured + '}', head,
"{}");
         }
         finally {
             mk.dispose();



Mime
View raw message