jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1196083 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src: main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Date Tue, 01 Nov 2011 16:15:54 GMT
Author: mduerig
Date: Tue Nov  1 16:15:53 2011
New Revision: 1196083

URL: http://svn.apache.org/viewvc?rev=1196083&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
special casing for internal properties in JSOP is not necessary anymore

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1196083&r1=1196082&r2=1196083&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Tue Nov  1 16:15:53 2011
@@ -385,13 +385,9 @@ public class SubscriptionImpl implements
                     while(jsopTokenizer.read() != ']') {}
                 }
 
-                Name name = path.getName();
-                if (!name.getLocalName().startsWith(":")) {
-                    // skip internal property
-                    addItemEvent.setType(Event.PROPERTY_ADDED);
-                    addItemEvent.setItemId(createPropertyId(parentId, name));
-                    events.add(addItemEvent.buildEvent());
-                }
+                addItemEvent.setType(Event.PROPERTY_ADDED);
+                addItemEvent.setItemId(createPropertyId(parentId, path.getName()));
+                events.add(addItemEvent.buildEvent());
             }
         }
 
@@ -431,29 +427,25 @@ public class SubscriptionImpl implements
 
         private void setProperty(JsopTokenizer jsopTokenizer, EventTemplate eventTemplate,
Collection<Event> events) {
             Path path = readPath(jsopTokenizer);
-            Name name = path.getName();
-            if (!name.getLocalName().startsWith(":")) {
-                // skip internal property
-                NodeId parentId = createNodeId(getParent(path));
-
-                EventTemplate setPropertyEvent = eventTemplate.copy();
-                setPropertyEvent.setPath(path);
-                setPropertyEvent.setParentId(parentId);
-                setPropertyEvent.setItemId(createPropertyId(parentId, name));
-                // todo set primaryType, mixinTypes this needs context in the journal
-                // fixme it seems type based filtering does not respect the type hierarchy
(see JCR-2542)
+            NodeId parentId = createNodeId(getParent(path));
 
-                jsopTokenizer.read(':');
-                if (jsopTokenizer.read() == JsopTokenizer.NULL) {
-                    setPropertyEvent.setType(Event.PROPERTY_REMOVED);
-                }
-                else {
-                    setPropertyEvent.setType(Event.PROPERTY_CHANGED);
-                }
+            EventTemplate setPropertyEvent = eventTemplate.copy();
+            setPropertyEvent.setPath(path);
+            setPropertyEvent.setParentId(parentId);
+            setPropertyEvent.setItemId(createPropertyId(parentId, path.getName()));
+            // todo set primaryType, mixinTypes this needs context in the journal
+            // fixme it seems type based filtering does not respect the type hierarchy (see
JCR-2542)
 
-                events.add(setPropertyEvent.buildEvent());
-                // todo consider ways to generate events of (large) sub tree
+            jsopTokenizer.read(':');
+            if (jsopTokenizer.read() == JsopTokenizer.NULL) {
+                setPropertyEvent.setType(Event.PROPERTY_REMOVED);
+            }
+            else {
+                setPropertyEvent.setType(Event.PROPERTY_CHANGED);
             }
+
+            events.add(setPropertyEvent.buildEvent());
+            // todo consider ways to generate events of (large) sub tree
         }
 
         private void moveNode(JsopTokenizer jsopTokenizer, EventTemplate eventTemplate, Collection<Event>
events) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java?rev=1196083&r1=1196082&r2=1196083&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Tue Nov  1 16:15:53 2011
@@ -279,10 +279,6 @@ public class MicrokernelTest {
         assertEquals("/node", tokenizer.readString());
         tokenizer.read(':');
         tokenizer.read('{');
-        assertEquals(":childNodeCount", tokenizer.readString());
-        tokenizer.read(':');
-        tokenizer.read(JsopTokenizer.NUMBER);
-        assertEquals("0", tokenizer.getToken());
         tokenizer.read('}');
         tokenizer.read(JsopTokenizer.END);
     }



Mime
View raw message