jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1158390 - in /jackrabbit/sandbox/jackrabbit-mk: jackrabbit-spi2microkernel/ jackrabbit-spi2microkernel/pom.xml jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java pom.xml
Date Tue, 16 Aug 2011 17:37:23 GMT
Author: mduerig
Date: Tue Aug 16 17:37:22 2011
New Revision: 1158390

URL: http://svn.apache.org/viewvc?rev=1158390&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/   (props changed)
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/pom.xml
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/pom.xml

Propchange: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Aug 16 17:37:22 2011
@@ -2,3 +2,5 @@
 .classpath
 target
 .settings
+
+*.iml

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/pom.xml?rev=1158390&r1=1158389&r2=1158390&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/pom.xml (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/pom.xml Tue Aug 16 17:37:22
2011
@@ -23,32 +23,38 @@
                              http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.apache.jackrabbit</groupId>
+    <parent>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-parent</artifactId>
+      <version>2.3-JR3-MICROKERNEL</version>
+      <relativePath>../jackrabbit-parent/pom.xml</relativePath>
+    </parent>
     <artifactId>spi2microkernel</artifactId>
     <version>0.1-SNAPSHOT</version>
-    <name>SPI2MicroKernel</name>
+    <name>Jackrabbit SPI to MicroKernel</name>
     <description>Microkernel based SPI implementation</description>
+    <packaging>jar</packaging>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
             <artifactId>jackrabbit-spi</artifactId>
-            <version>2.3-SNAPSHOT</version>
+            <version>2.3-JR3-MICROKERNEL</version>
         </dependency>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
             <artifactId>jackrabbit-spi-commons</artifactId>
-            <version>2.3-SNAPSHOT</version>
+            <version>2.3-JR3-MICROKERNEL</version>
         </dependency>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
             <artifactId>jackrabbit-jcr2spi</artifactId>
-            <version>2.3-SNAPSHOT</version>
+            <version>2.3-JR3-MICROKERNEL</version>
         </dependency>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
             <artifactId>jackrabbit-jcr-commons</artifactId>
-            <version>2.3-SNAPSHOT</version>
+            <version>2.3-JR3-MICROKERNEL</version>
         </dependency>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
@@ -63,25 +69,21 @@
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
-            <version>1.4</version>
         </dependency>
         <dependency>
             <groupId>javax.jcr</groupId>
             <artifactId>jcr</artifactId>
-            <version>2.0</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>1.6.1</version>
         </dependency>
 
         <!-- test dependencies -->
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
-            <version>1.6.1</version>
+            <version>1.6.1  </version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -93,30 +95,17 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.5</version>
+            <version>4.8.2</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
             <artifactId>jackrabbit-jcr-tests</artifactId>
-            <version>2.3-SNAPSHOT</version>
+            <version>2.3-JR3-MICROKERNEL</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-                <version>2.0.2</version>
-            </plugin>
-        </plugins>
-    </build>
-
     <profiles>
         <profile>
             <id>tck</id>
@@ -126,7 +115,6 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-surefire-plugin</artifactId>
-                        <version>2.9</version>
                         <configuration>
                             <includes>
                                 <include>**/TckTests.java</include>

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=1158390&r1=1158389&r2=1158390&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 Aug 16 17:37:22 2011
@@ -330,19 +330,26 @@ public class RepositoryServiceImpl exten
 
     //------------------------------------------< Reading Items >---
 
-    public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, NodeId
nodeId) throws RepositoryException {
+    public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId
itemId) throws RepositoryException {
         try {
-            String wspName = sessionInfo.getWorkspaceName();
-            Path path = getPath(nodeId);
-            String mkPath = Paths.pathToString(wspName, path);
-            String rev = microKernel.getHeadRevision();
-
-            if (microKernel.nodeExists(mkPath, rev)) {
-                String json = microKernel.getNodes(mkPath, rev);
-                return buildItemInfos(path, json, readFromDataStore);
+            if (!itemId.denotesNode()) {
+                PropertyInfo info = getPropertyInfo(sessionInfo, (PropertyId) itemId);
+                return Iterators.singleton(info);
             }
             else {
-                throw new PathNotFoundException(path.toString());
+                NodeId nodeId = (NodeId) itemId;
+                String wspName = sessionInfo.getWorkspaceName();
+                Path path = getPath(nodeId);
+                String mkPath = Paths.pathToString(wspName, path);
+                String rev = microKernel.getHeadRevision();
+
+                if (microKernel.nodeExists(mkPath, rev)) {
+                    String json = microKernel.getNodes(mkPath, rev);
+                    return buildItemInfos(path, json, readFromDataStore);
+                }
+                else {
+                    throw new PathNotFoundException(path.toString());
+                }
             }
         }
         catch (MicroKernelException e) {

Modified: jackrabbit/sandbox/jackrabbit-mk/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/pom.xml?rev=1158390&r1=1158389&r2=1158390&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/pom.xml (original)
+++ jackrabbit/sandbox/jackrabbit-mk/pom.xml Tue Aug 16 17:37:22 2011
@@ -42,6 +42,7 @@
     <module>jackrabbit-spi</module>
     <module>jackrabbit-spi-commons</module>
     <module>jackrabbit-jcr2spi</module>
+    <module>jackrabbit-spi2microkernel</module>
   </modules>
 
 </project>



Mime
View raw message