jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1557006 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/observation/ main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ test/java/org/apache/jackrabbit/oak/plugins/observation/filter/
Date Fri, 10 Jan 2014 01:13:07 GMT
Author: jukka
Date: Fri Jan 10 01:13:07 2014
New Revision: 1557006

URL: http://svn.apache.org/r1557006
Log:
OAK-1133: Observation listener PLUS

Extract EventGenerator.Filter to a standalone EventFilter interface

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventFilter.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ACFilter.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ConstantFilter.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventGenerator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventIterator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventTypeFilter.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Filters.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Selectors.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/UniversalFilter.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilterTest.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=1557006&r1=1557005&r2=1557006&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 Fri Jan 10 01:13:07 2014
@@ -30,6 +30,7 @@ import javax.jcr.observation.EventListen
 
 import com.google.common.util.concurrent.Monitor;
 import com.google.common.util.concurrent.Monitor.Guard;
+
 import org.apache.jackrabbit.api.jmx.EventListenerMBean;
 import org.apache.jackrabbit.commons.iterator.EventIteratorAdapter;
 import org.apache.jackrabbit.commons.observation.ListenerTracker;
@@ -38,7 +39,7 @@ import org.apache.jackrabbit.oak.core.Im
 import org.apache.jackrabbit.oak.core.ImmutableTree;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.plugins.observation.filter.ACFilter;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
+import org.apache.jackrabbit.oak.plugins.observation.filter.EventFilter;
 import org.apache.jackrabbit.oak.plugins.observation.filter.EventIterator;
 import org.apache.jackrabbit.oak.plugins.observation.filter.FilterProvider;
 import org.apache.jackrabbit.oak.plugins.observation.filter.Filters;
@@ -158,8 +159,8 @@ public class ChangeProcessor implements 
                 // FIXME don't rely on toString for session id
                 if (provider.includeCommit(contentSession.toString(), info)) {
                     String basePath = provider.getPath();
-                    Filter userFilter = provider.getFilter(previousRoot, root);
-                    Filter acFilter = new ACFilter(previousRoot, root, permissionProvider, basePath);
+                    EventFilter userFilter = provider.getFilter(previousRoot, root);
+                    EventFilter acFilter = new ACFilter(previousRoot, root, permissionProvider, basePath);
                     ImmutableTree beforeTree = getTree(previousRoot, basePath);
                     ImmutableTree afterTree = getTree(root, basePath);
                     EventIterator<Event> events = new EventIterator<Event>(

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ACFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ACFilter.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ACFilter.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ACFilter.java Fri Jan 10 01:13:07 2014
@@ -26,7 +26,6 @@ import javax.annotation.Nonnull;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.core.ImmutableTree;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.PermissionProvider;
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.TreePermission;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -34,7 +33,7 @@ import org.apache.jackrabbit.oak.spi.sta
 /**
  * {@code EventTypeFilter} filters based on the access rights of the observing session.
  */
-public class ACFilter implements Filter {
+public class ACFilter implements EventFilter {
     private final TreePermission treePermission;
 
     private ACFilter(@Nonnull TreePermission treePermission) {
@@ -103,7 +102,7 @@ public class ACFilter implements Filter 
     }
 
     @Override
-    public Filter create(String name, NodeState before, NodeState after) {
+    public EventFilter create(String name, NodeState before, NodeState after) {
         return new ACFilter(treePermission.getChildPermission(name, after));
     }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ConstantFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ConstantFilter.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ConstantFilter.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ConstantFilter.java Fri Jan 10 01:13:07 2014
@@ -20,13 +20,12 @@
 package org.apache.jackrabbit.oak.plugins.observation.filter;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
  * TODO document
  */
-public class ConstantFilter implements Filter {
+public class ConstantFilter implements EventFilter {
     public static final ConstantFilter INCLUDE_ALL = new ConstantFilter(true);
     public static final ConstantFilter EXCLUDE_ALL = new ConstantFilter(false);
 
@@ -72,7 +71,7 @@ public class ConstantFilter implements F
     }
 
     @Override
-    public Filter create(String name, NodeState before, NodeState after) {
+    public EventFilter create(String name, NodeState before, NodeState after) {
         return include ? this : null;
     }
 }

Added: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventFilter.java?rev=1557006&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventFilter.java (added)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventFilter.java Fri Jan 10 01:13:07 2014
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.observation.filter;
+
+import javax.annotation.CheckForNull;
+
+import org.apache.jackrabbit.oak.api.PropertyState;
+import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Listener;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+
+/**
+ * Filter for determining what changes to report the the {@link Listener}.
+ */
+public interface EventFilter {
+
+    /**
+     * Include an added property
+     * @param after  added property
+     * @return  {@code true} if the property should be included
+     */
+    boolean includeAdd(PropertyState after);
+
+    /**
+     * Include a changed property
+     * @param before  property before the change
+     * @param after  property after the change
+     * @return  {@code true} if the property should be included
+     */
+    boolean includeChange(PropertyState before, PropertyState after);
+
+    /**
+     * Include a deleted property
+     * @param before  deleted property
+     * @return  {@code true} if the property should be included
+     */
+    boolean includeDelete(PropertyState before);
+
+    /**
+     * Include an added node
+     * @param name name of the node
+     * @param after  added node
+     * @return  {@code true} if the node should be included
+     */
+    boolean includeAdd(String name, NodeState after);
+
+    /**
+     * Include a changed node
+     * @param name name of the node
+     * @param before node before the change
+     * @param after  node after the change
+     * @return  {@code true} if the node should be included
+     */
+    boolean includeChange(String name, NodeState before, NodeState after);
+
+    /**
+     * Include a deleted node
+     * @param name name of the node
+     * @param before deleted node
+     * @return  {@code true} if the node should be included
+     */
+    boolean includeDelete(String name, NodeState before);
+
+    /**
+     * Include a moved node
+     * @param sourcePath  source path of the move operation
+     * @param name        name of the moved node
+     * @param moved       the moved node
+     * @return  {@code true} if the node should be included
+     */
+    boolean includeMove(String sourcePath, String name, NodeState moved);
+
+    /**
+     * Factory for creating a filter instance for the given child node
+     * @param name  name of the child node
+     * @param before  before state of the child node
+     * @param after  after state of the child node
+     * @return  filter instance for filtering the child node or {@code null} to
+     *          exclude the sub tree rooted at this child node.
+     */
+    @CheckForNull
+    EventFilter create(String name, NodeState before, NodeState after);
+}
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventGenerator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventGenerator.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventGenerator.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventGenerator.java Fri Jan 10 01:13:07 2014
@@ -16,13 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.jackrabbit.oak.plugins.observation.filter;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.MISSING_NODE;
 
-import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
@@ -31,86 +29,13 @@ import org.apache.jackrabbit.oak.spi.sta
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
- * {@link Filter filter} and report changes between node states to the {@link Listener}.
+ * {@link EventFilter filter} and report changes between node states to the {@link Listener}.
  */
 public class EventGenerator implements MoveValidator {
-    private final Filter filter;
+    private final EventFilter filter;
     private final Listener listener;
 
     /**
-     * Filter for determining what changes to report the the {@link Listener}.
-     */
-    public interface Filter {
-
-        /**
-         * Include an added property
-         * @param after  added property
-         * @return  {@code true} if the property should be included
-         */
-        boolean includeAdd(PropertyState after);
-
-        /**
-         * Include a changed property
-         * @param before  property before the change
-         * @param after  property after the change
-         * @return  {@code true} if the property should be included
-         */
-        boolean includeChange(PropertyState before, PropertyState after);
-
-        /**
-         * Include a deleted property
-         * @param before  deleted property
-         * @return  {@code true} if the property should be included
-         */
-        boolean includeDelete(PropertyState before);
-
-        /**
-         * Include an added node
-         * @param name name of the node
-         * @param after  added node
-         * @return  {@code true} if the node should be included
-         */
-        boolean includeAdd(String name, NodeState after);
-
-        /**
-         * Include a changed node
-         * @param name name of the node
-         * @param before node before the change
-         * @param after  node after the change
-         * @return  {@code true} if the node should be included
-         */
-        boolean includeChange(String name, NodeState before, NodeState after);
-
-        /**
-         * Include a deleted node
-         * @param name name of the node
-         * @param before deleted node
-         * @return  {@code true} if the node should be included
-         */
-        boolean includeDelete(String name, NodeState before);
-
-        /**
-         * Include a moved node
-         * @param sourcePath  source path of the move operation
-         * @param name        name of the moved node
-         * @param moved       the moved node
-         * @return  {@code true} if the node should be included
-         */
-        boolean includeMove(String sourcePath, String name, NodeState moved);
-
-        /**
-         * Factory for creating a filter instance for the given child node
-         * @param name  name of the child node
-         * @param before  before state of the child node
-         * @param after  after state of the child node
-         * @return  filter instance for filtering the child node or {@code null} to
-         *          exclude the sub tree rooted at this child node.
-         */
-        @CheckForNull
-        Filter create(String name, NodeState before, NodeState after);
-    }
-
-    /**
      * Listener for listening to changes.
      */
     public interface Listener {
@@ -181,7 +106,7 @@ public class EventGenerator implements M
      * @param filter  filter for filtering changes
      * @param listener  listener for listening to the filtered changes
      */
-    public EventGenerator(@Nonnull Filter filter, @Nonnull Listener listener) {
+    public EventGenerator(@Nonnull EventFilter filter, @Nonnull Listener listener) {
         this.filter = checkNotNull(filter);
         this.listener = checkNotNull(listener);
     }
@@ -254,7 +179,7 @@ public class EventGenerator implements M
      * @return {@code EventGenerator} for a child node
      */
     protected EventGenerator createChildGenerator(String name, NodeState before, NodeState after) {
-        Filter childFilter = filter.create(name, before, after);
+        EventFilter childFilter = filter.create(name, before, after);
         if (childFilter != null) {
             return new EventGenerator(
                     childFilter,

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventIterator.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventIterator.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventIterator.java Fri Jan 10 01:13:07 2014
@@ -48,7 +48,7 @@ public class EventIterator<T> extends Ev
     private final NodeState before;
     private final NodeState after;
 
-    private final Filter filter;
+    private final EventFilter filter;
     private final IterableListener<T> listener;
 
     private final List<Iterator<T>> childEvents = newArrayList();
@@ -91,7 +91,7 @@ public class EventIterator<T> extends Ev
      * @param listener  listener for listening to the filtered changes
      */
     public EventIterator(@Nonnull NodeState before, @Nonnull NodeState after,
-            @Nonnull Filter filter, @Nonnull IterableListener<T> listener) {
+            @Nonnull EventFilter filter, @Nonnull IterableListener<T> listener) {
         super(filter, listener);
         this.before = checkNotNull(before);
         this.after = checkNotNull(after);
@@ -103,7 +103,7 @@ public class EventIterator<T> extends Ev
 
     @Override
     protected EventGenerator createChildGenerator(String name, NodeState before, NodeState after) {
-        Filter childFilter = filter.create(name, before, after);
+        EventFilter childFilter = filter.create(name, before, after);
         if (childFilter != null) {
             childEvents.add(new EventIterator<T>(
                     before, after,

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventTypeFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventTypeFilter.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventTypeFilter.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/EventTypeFilter.java Fri Jan 10 01:13:07 2014
@@ -22,7 +22,6 @@ package org.apache.jackrabbit.oak.plugin
 import javax.jcr.observation.Event;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
@@ -31,7 +30,7 @@ import org.apache.jackrabbit.oak.spi.sta
         javax.jcr.observation.EventListener, int, String, boolean, String[], String[], boolean)
         ObservationManager.addEventListener()}.
  */
-public class EventTypeFilter implements Filter {
+public class EventTypeFilter implements EventFilter {
     private final int eventTypes;
 
     /**
@@ -83,7 +82,7 @@ public class EventTypeFilter implements 
     }
 
     @Override
-    public Filter create(String name, NodeState before, NodeState after) {
+    public EventFilter create(String name, NodeState before, NodeState after) {
         return this;
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java Fri Jan 10 01:13:07 2014
@@ -37,10 +37,10 @@ import javax.annotation.Nonnull;
 import com.google.common.base.Objects;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Lists;
+
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.plugins.observation.filter.UniversalFilter.Selector;
 import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
 import org.apache.jackrabbit.oak.spi.security.authorization.permission.PermissionProvider;
@@ -60,7 +60,7 @@ public final class FilterBuilder {
 
     public interface Condition {
         @Nonnull
-        Filter createFilter(@Nonnull NodeState before, @Nonnull NodeState after, String basePath);
+        EventFilter createFilter(@Nonnull NodeState before, @Nonnull NodeState after, String basePath);
     }
 
     /**
@@ -285,7 +285,7 @@ public final class FilterBuilder {
 
             @Nonnull
             @Override
-            public Filter getFilter(@Nonnull NodeState before, @Nonnull NodeState after) {
+            public EventFilter getFilter(@Nonnull NodeState before, @Nonnull NodeState after) {
                 return condition.createFilter(checkNotNull(before), checkNotNull(after), basePath);
             }
 
@@ -325,7 +325,7 @@ public final class FilterBuilder {
         }
 
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
             return value ? Filters.includeAll() : Filters.excludeAll();
         }
     }
@@ -338,7 +338,7 @@ public final class FilterBuilder {
         }
 
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
             return new ACFilter(before, after, permissionProvider, basePath);
         }
     }
@@ -351,7 +351,7 @@ public final class FilterBuilder {
         }
 
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
             return new GlobbingPathFilter(pathGlob);
         }
     }
@@ -364,7 +364,7 @@ public final class FilterBuilder {
         }
 
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
             return new EventTypeFilter(eventTypes);
         }
     }
@@ -379,7 +379,7 @@ public final class FilterBuilder {
         }
 
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
             TypePredicate predicate = new TypePredicate(
                     after.exists() ? after : before, ntNames);
             return new UniversalFilter(
@@ -400,7 +400,7 @@ public final class FilterBuilder {
 
         @Nonnull
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
             return new UniversalFilter(
                     getChildNode(before, basePath),
                     getChildNode(after, basePath),
@@ -416,8 +416,8 @@ public final class FilterBuilder {
         }
 
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
-            List<Filter> filters = Lists.newArrayList();
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
+            List<EventFilter> filters = Lists.newArrayList();
             for (Condition condition : conditions) {
                 if (condition == ConstantCondition.INCLUDE_ALL) {
                     return ConstantFilter.INCLUDE_ALL;
@@ -439,8 +439,8 @@ public final class FilterBuilder {
         }
 
         @Override
-        public Filter createFilter(NodeState before, NodeState after, String basePath) {
-            List<Filter> filters = Lists.newArrayList();
+        public EventFilter createFilter(NodeState before, NodeState after, String basePath) {
+            List<EventFilter> filters = Lists.newArrayList();
             for (Condition condition : conditions) {
                 if (condition == ConstantCondition.EXCLUDE_ALL) {
                     return ConstantFilter.EXCLUDE_ALL;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterProvider.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterProvider.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterProvider.java Fri Jan 10 01:13:07 2014
@@ -22,12 +22,11 @@ package org.apache.jackrabbit.oak.plugin
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
- * Instance of this class provide a {@link Filter} for observation
+ * Instance of this class provide a {@link EventFilter} for observation
  * events and a filter for commits.
  */
 public interface FilterProvider {
@@ -54,7 +53,7 @@ public interface FilterProvider {
      * @return new {@code Filter} instance
      */
     @Nonnull
-    Filter getFilter(@Nonnull NodeState before, @Nonnull NodeState after);
+    EventFilter getFilter(@Nonnull NodeState before, @Nonnull NodeState after);
 
     /**
      * Path of the subtree to which the the filter returned by

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Filters.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Filters.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Filters.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Filters.java Fri Jan 10 01:13:07 2014
@@ -28,12 +28,12 @@ import java.util.List;
 import javax.annotation.Nonnull;
 
 import com.google.common.collect.Lists;
+
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
- * This utility class provides common {@link Filter} instances
+ * This utility class provides common {@link EventFilter} instances
  */
 public final class Filters {
 
@@ -47,7 +47,7 @@ public final class Filters {
      * @return {@code true} if any of {@code filters} match.
      */
     @Nonnull
-    public static Filter any(@Nonnull final Filter... filters) {
+    public static EventFilter any(@Nonnull final EventFilter... filters) {
         return any(Lists.newArrayList(checkNotNull(filters)));
     }
 
@@ -58,7 +58,7 @@ public final class Filters {
      * @return {@code true} if all of {@code filters} match.
      */
     @Nonnull
-    public static Filter all(@Nonnull final Filter... filters) {
+    public static EventFilter all(@Nonnull final EventFilter... filters) {
         return all(Lists.newArrayList(checkNotNull(filters)));
     }
 
@@ -66,7 +66,7 @@ public final class Filters {
      * @return  Filter that includes everything
      */
     @Nonnull
-    public static Filter includeAll() {
+    public static EventFilter includeAll() {
         return INCLUDE_ALL;
     }
 
@@ -74,7 +74,7 @@ public final class Filters {
      * @return  Filter that excludes everything
      */
     @Nonnull
-    public static Filter excludeAll() {
+    public static EventFilter excludeAll() {
         return EXCLUDE_ALL;
     }
 
@@ -85,16 +85,16 @@ public final class Filters {
      * @return {@code true} if any of {@code filters} match.
      */
     @Nonnull
-    public static Filter any(@Nonnull final List<Filter> filters) {
+    public static EventFilter any(@Nonnull final List<EventFilter> filters) {
         if (checkNotNull(filters).isEmpty()) {
             return EXCLUDE_ALL;
         } else if (filters.size() == 1) {
             return filters.get(0);
         } else {
-            return new Filter() {
+            return new EventFilter() {
                 @Override
                 public boolean includeAdd(PropertyState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (filter.includeAdd(after)) {
                             return true;
                         }
@@ -104,7 +104,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeChange(PropertyState before, PropertyState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (filter.includeChange(before, after)) {
                             return true;
                         }
@@ -114,7 +114,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeDelete(PropertyState before) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (filter.includeDelete(before)) {
                             return true;
                         }
@@ -124,7 +124,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeAdd(String name, NodeState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (filter.includeAdd(name, after)) {
                             return true;
                         }
@@ -134,7 +134,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeChange(String name, NodeState before, NodeState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (filter.includeChange(name, before, after)) {
                             return true;
                         }
@@ -144,7 +144,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeDelete(String name, NodeState before) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (filter.includeDelete(name, before)) {
                             return true;
                         }
@@ -154,7 +154,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeMove(String sourcePath, String name, NodeState moved) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (filter.includeMove(sourcePath, name, moved)) {
                             return true;
                         }
@@ -163,10 +163,10 @@ public final class Filters {
                 }
 
                 @Override
-                public Filter create(String name, NodeState before, NodeState after) {
-                    List<Filter> childFilters = Lists.newArrayList();
-                    for (Filter filter : filters) {
-                        Filter childFilter = filter.create(name, before, after);
+                public EventFilter create(String name, NodeState before, NodeState after) {
+                    List<EventFilter> childFilters = Lists.newArrayList();
+                    for (EventFilter filter : filters) {
+                        EventFilter childFilter = filter.create(name, before, after);
                         if (childFilter != null) {
                             childFilters.add(childFilter);
                         }
@@ -184,16 +184,16 @@ public final class Filters {
      * @return {@code true} if all of {@code filters} match.
      */
     @Nonnull
-    public static Filter all(@Nonnull final List<Filter> filters) {
+    public static EventFilter all(@Nonnull final List<EventFilter> filters) {
         if (checkNotNull(filters).isEmpty()) {
             return INCLUDE_ALL;
         } else if (filters.size() == 1) {
             return filters.get(0);
         } else {
-            return new Filter() {
+            return new EventFilter() {
                 @Override
                 public boolean includeAdd(PropertyState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (!filter.includeAdd(after)) {
                             return false;
                         }
@@ -203,7 +203,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeChange(PropertyState before, PropertyState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (!filter.includeChange(before, after)) {
                             return false;
                         }
@@ -213,7 +213,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeDelete(PropertyState before) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (!filter.includeDelete(before)) {
                             return false;
                         }
@@ -223,7 +223,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeAdd(String name, NodeState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (!filter.includeAdd(name, after)) {
                             return false;
                         }
@@ -233,7 +233,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeChange(String name, NodeState before, NodeState after) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (!filter.includeChange(name, before, after)) {
                             return false;
                         }
@@ -243,7 +243,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeDelete(String name, NodeState before) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (!filter.includeDelete(name, before)) {
                             return false;
                         }
@@ -253,7 +253,7 @@ public final class Filters {
 
                 @Override
                 public boolean includeMove(String sourcePath, String name, NodeState moved) {
-                    for (Filter filter : filters) {
+                    for (EventFilter filter : filters) {
                         if (!filter.includeMove(sourcePath, name, moved)) {
                             return false;
                         }
@@ -262,10 +262,10 @@ public final class Filters {
                 }
 
                 @Override
-                public Filter create(String name, NodeState before, NodeState after) {
-                    List<Filter> childFilters = Lists.newArrayList();
-                    for (Filter filter : filters) {
-                        Filter childFilter = filter.create(name, before, after);
+                public EventFilter create(String name, NodeState before, NodeState after) {
+                    List<EventFilter> childFilters = Lists.newArrayList();
+                    for (EventFilter filter : filters) {
+                        EventFilter childFilter = filter.create(name, before, after);
                         if (childFilter == null) {
                             return null;
                         } else {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java Fri Jan 10 01:13:07 2014
@@ -27,8 +27,8 @@ import javax.annotation.Nonnull;
 
 import com.google.common.base.Joiner;
 import com.google.common.collect.ImmutableList;
+
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
@@ -57,7 +57,7 @@ import org.apache.jackrabbit.oak.spi.sta
  *    r/s/t&#47** matches r/s/t and all its descendants
  * </pre>
  */
-public class GlobbingPathFilter implements Filter {
+public class GlobbingPathFilter implements EventFilter {
     public static final String STAR = "*";
     public static final String STAR_STAR = "**";
 
@@ -107,7 +107,7 @@ public class GlobbingPathFilter implemen
     }
 
     @Override
-    public Filter create(String name, NodeState before, NodeState after) {
+    public EventFilter create(String name, NodeState before, NodeState after) {
         if (pattern.isEmpty()) {
             return null;
         }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Selectors.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Selectors.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Selectors.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/Selectors.java Fri Jan 10 01:13:07 2014
@@ -34,14 +34,14 @@ import org.apache.jackrabbit.oak.spi.sta
 public final class Selectors {
 
     /**
-     * A selector returning the node for which a call back on {@link EventGenerator.Filter} was
+     * A selector returning the node for which a call back on {@link EventFilter} was
      * called or a non existing node in the case of a property call back.
      */
     public static final Selector THIS = new ThisSelector();
 
     /**
      * A selector returning the parent node of the item for which a call back
-     * on {@link EventGenerator.Filter} was called.
+     * on {@link EventFilter} was called.
      */
     public static final Selector PARENT = new ParentSelector();
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/UniversalFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/UniversalFilter.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/UniversalFilter.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/UniversalFilter.java Fri Jan 10 01:13:07 2014
@@ -26,8 +26,8 @@ import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 
 import com.google.common.base.Predicate;
+
 import org.apache.jackrabbit.oak.api.PropertyState;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
@@ -37,7 +37,7 @@ import org.apache.jackrabbit.oak.spi.sta
  * to the predicate for determining whether to include or to exclude the
  * respective event.
  */
-public class UniversalFilter implements Filter {
+public class UniversalFilter implements EventFilter {
     private final NodeState beforeState;
     private final NodeState afterState;
     private final Selector selector;
@@ -70,9 +70,9 @@ public class UniversalFilter implements 
          * Map a property event.
          * @param filter  filter instance on which respective call back occurred.
          * @param before  before state or {@code null} for
-         *                {@link Filter#propertyAdded(PropertyState)}
+         *                {@link EventFilter#propertyAdded(PropertyState)}
          * @param after   after state or {@code null} for
-         *                {@link Filter#propertyDeleted(PropertyState)}
+         *                {@link EventFilter#propertyDeleted(PropertyState)}
          * @return a {@code NodeState} instance for basing the filtering criterion (predicate) upon
          */
         @Nonnull
@@ -84,9 +84,9 @@ public class UniversalFilter implements 
          * @param filter  filter instance on which respective call back occurred.
          * @param name    name of the child node state
          * @param before  before state or {@code null} for
-         *                {@link Filter#childNodeAdded(String, NodeState)}
+         *                {@link EventFilter#childNodeAdded(String, NodeState)}
          * @param after   after state or {@code null} for
-         *                {@link Filter#childNodeDeleted(String, NodeState)}
+         *                {@link EventFilter#childNodeDeleted(String, NodeState)}
          * @return a NodeState instance for basing the filtering criterion (predicate) upon
          */
         @Nonnull
@@ -146,7 +146,7 @@ public class UniversalFilter implements 
     }
 
     @Override
-    public Filter create(String name, NodeState before, NodeState after) {
+    public EventFilter create(String name, NodeState before, NodeState after) {
         return new UniversalFilter(
                 beforeState.getChildNode(name), afterState.getChildNode(name),
                 selector, predicate);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilterTest.java?rev=1557006&r1=1557005&r2=1557006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilterTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilterTest.java Fri Jan 10 01:13:07 2014
@@ -29,7 +29,6 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertTrue;
 
 import org.apache.jackrabbit.oak.core.ImmutableTree;
-import org.apache.jackrabbit.oak.plugins.observation.filter.EventGenerator.Filter;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.junit.Before;
@@ -61,7 +60,7 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void emptyMatchesNothing() {
-        Filter rootFilter = new GlobbingPathFilter("");
+        EventFilter rootFilter = new GlobbingPathFilter("");
         NodeState a = tree.getChild("a").getNodeState();
         assertFalse(rootFilter.includeAdd("a", a));
         assertNull(rootFilter.create("a", a, a));
@@ -72,7 +71,7 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void singleMatchesSingle() {
-        Filter filter = new GlobbingPathFilter("q");
+        EventFilter filter = new GlobbingPathFilter("q");
 
         assertTrue(filter.includeAdd("q", tree.getNodeState()));
     }
@@ -82,7 +81,7 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void starMatchesSingle() {
-        Filter filter = new GlobbingPathFilter(STAR);
+        EventFilter filter = new GlobbingPathFilter(STAR);
 
         assertTrue(filter.includeAdd("q", tree.getNodeState()));
     }
@@ -92,7 +91,7 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void all() {
-        Filter filter = new GlobbingPathFilter(STAR_STAR);
+        EventFilter filter = new GlobbingPathFilter(STAR_STAR);
         ImmutableTree t = tree;
 
         for(String name : elements("a/b/c/d")) {
@@ -108,16 +107,16 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void literal() {
-        Filter rootFilter = new GlobbingPathFilter("a/b/c");
+        EventFilter rootFilter = new GlobbingPathFilter("a/b/c");
         NodeState a = tree.getChild("a").getNodeState();
         assertFalse(rootFilter.includeAdd("a", a));
 
-        Filter aFilter = rootFilter.create("a", a, a);
+        EventFilter aFilter = rootFilter.create("a", a, a);
         assertNotNull(aFilter);
         NodeState b = a.getChildNode("b");
         assertFalse(aFilter.includeAdd("b", b));
 
-        Filter bFilter = aFilter.create("b", b, b);
+        EventFilter bFilter = aFilter.create("b", b, b);
         assertNotNull(bFilter);
         NodeState c = b.getChildNode("c");
         assertTrue(bFilter.includeAdd("c", b));
@@ -131,16 +130,16 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void starGlob() {
-        Filter rootFilter = new GlobbingPathFilter("a/*/c");
+        EventFilter rootFilter = new GlobbingPathFilter("a/*/c");
         NodeState a = tree.getChild("a").getNodeState();
         assertFalse(rootFilter.includeAdd("a", a));
 
-        Filter aFilter = rootFilter.create("a", a, a);
+        EventFilter aFilter = rootFilter.create("a", a, a);
         assertNotNull(aFilter);
         NodeState b = a.getChildNode("b");
         assertFalse(aFilter.includeAdd("b", b));
 
-        Filter bFilter = aFilter.create("b", b, b);
+        EventFilter bFilter = aFilter.create("b", b, b);
         assertNotNull(bFilter);
         NodeState c = b.getChildNode("c");
         assertTrue(bFilter.includeAdd("c", b));
@@ -154,31 +153,31 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void starStarGlob() {
-        Filter rootFilter = new GlobbingPathFilter("**/y/z");
+        EventFilter rootFilter = new GlobbingPathFilter("**/y/z");
         NodeState x1 = tree.getChild("x").getNodeState();
         assertFalse(rootFilter.includeAdd("x", x1));
 
-        Filter x1Filter = rootFilter.create("x", x1, x1);
+        EventFilter x1Filter = rootFilter.create("x", x1, x1);
         assertNotNull(x1Filter);
         NodeState y1 = x1.getChildNode("y");
         assertFalse(x1Filter.includeAdd("y", y1));
 
-        Filter y1Filter = x1Filter.create("y", y1, y1);
+        EventFilter y1Filter = x1Filter.create("y", y1, y1);
         assertNotNull(y1Filter);
         NodeState x2 = y1.getChildNode("x");
         assertFalse(y1Filter.includeAdd("x", x2));
 
-        Filter x2Filter = y1Filter.create("x", x2, x2);
+        EventFilter x2Filter = y1Filter.create("x", x2, x2);
         assertNotNull(x2Filter);
         NodeState y2 = x2.getChildNode("y");
         assertFalse(x2Filter.includeAdd("y", y2));
 
-        Filter y2Filter = x2Filter.create("y", y2, y2);
+        EventFilter y2Filter = x2Filter.create("y", y2, y2);
         assertNotNull(y2Filter);
         NodeState z = y2.getChildNode("z");
         assertTrue(y2Filter.includeAdd("z", z));
 
-        Filter zFilter = (y2Filter.create("z", z, z));
+        EventFilter zFilter = (y2Filter.create("z", z, z));
         assertFalse(zFilter.includeAdd("x", EMPTY_NODE));
     }
 
@@ -187,16 +186,16 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void matchAtStart() {
-        Filter rootFilter = new GlobbingPathFilter("**/a/b/c");
+        EventFilter rootFilter = new GlobbingPathFilter("**/a/b/c");
         NodeState a = tree.getChild("a").getNodeState();
         assertFalse(rootFilter.includeAdd("a", a));
 
-        Filter aFilter = rootFilter.create("a", a, a);
+        EventFilter aFilter = rootFilter.create("a", a, a);
         assertNotNull(aFilter);
         NodeState b = a.getChildNode("b");
         assertFalse(aFilter.includeAdd("b", b));
 
-        Filter bFilter = aFilter.create("b", b, b);
+        EventFilter bFilter = aFilter.create("b", b, b);
         assertNotNull(bFilter);
         NodeState c = b.getChildNode("c");
         assertTrue(bFilter.includeAdd("c", b));
@@ -208,7 +207,7 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void multipleMatches() {
-        Filter filter = new GlobbingPathFilter("**/r/s/t/u/v");
+        EventFilter filter = new GlobbingPathFilter("**/r/s/t/u/v");
         ImmutableTree t = tree;
 
         for(int c = 0; c < 2; c++) {
@@ -231,7 +230,7 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void matchAtEnd() {
-        Filter filter = new GlobbingPathFilter("**/r/s/t/u/v/w");
+        EventFilter filter = new GlobbingPathFilter("**/r/s/t/u/v/w");
         ImmutableTree t = tree;
 
         for(String name : elements("r/s/t/u/v/r/s/t/u/v/r/s/t/u/v")) {
@@ -252,7 +251,7 @@ public class GlobbingPathFilterTest {
      */
     @Test
     public void matchSuffix() {
-        Filter filter = new GlobbingPathFilter("r/s/t/**");
+        EventFilter filter = new GlobbingPathFilter("r/s/t/**");
         ImmutableTree t = tree;
 
         for(String name : elements("r/s")) {



Mime
View raw message