jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1471521 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Date Wed, 24 Apr 2013 16:37:44 GMT
Author: mduerig
Date: Wed Apr 24 16:37:43 2013
New Revision: 1471521

URL: http://svn.apache.org/r1471521
Log:
OAK-144: Implement observation
OAK-618: ChangeProcessor must ignore hidden properties
ignore hidden children of added/removed nodes

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java?rev=1471521&r1=1471520&r2=1471521&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Wed Apr 24 16:37:43 2013
@@ -31,10 +31,10 @@ import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterators;
 import org.apache.jackrabbit.commons.iterator.EventIteratorAdapter;
-import org.apache.jackrabbit.oak.spi.observation.ChangeExtractor;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
+import org.apache.jackrabbit.oak.spi.observation.ChangeExtractor;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeStateDiff;
@@ -296,7 +296,13 @@ class ChangeProcessor implements Runnabl
 
         private Iterator<Iterator<Event>> generateChildEvents(final int eventType,
final String parentPath, NodeState node) {
             return Iterators.transform(
-                    node.getChildNodeEntries().iterator(),
+                    Iterators.filter(node.getChildNodeEntries().iterator(),
+                        new Predicate<ChildNodeEntry>() {
+                            @Override
+                            public boolean apply(ChildNodeEntry entry) {
+                                return !NodeStateUtils.isHidden(entry.getName());
+                            }
+                    }),
                     new Function<ChildNodeEntry, Iterator<Event>>() {
                         @Override
                         public Iterator<Event> apply(ChildNodeEntry entry) {



Mime
View raw message