This is an automated email from the ASF dual-hosted git repository.

jeb pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-filter.git

commit 0bb301928b91a189c25993577b219b5df45842ff
Author: JE Bailey <[email protected]>
AuthorDate: Thu Aug 23 11:50:08 2018 -0400

    Updated to a Builder pattern for Predicate creation
---
 README.md                                          |  13 +--
 .../resource/filter/ResourceFilterStream.java      |  23 +++--
 ...ResourceFilter.java => ResourcePredicates.java} |  48 ++++++---
 .../resource/filter/impl/ComparisonVisitor.java    |   2 +-
 .../apache/sling/resource/filter/impl/Context.java |  13 ++-
 .../sling/resource/filter/impl/DefaultContext.java |  18 ++--
 .../filter/impl/ResourceFilterAdapter.java         |   6 +-
 .../resource/filter/impl/ResourceFilterImpl.java   |  95 ------------------
 .../filter/impl/ResourcePredicateImpl.java         | 107 +++++++++++++++++++++
 .../resource/filter/ResourceFilterArgTest.java     |  10 +-
 .../resource/filter/ResourceFilterDateTest.java    |   4 +-
 .../resource/filter/ResourceFilterLogicTest.java   |   4 +-
 .../sling/resource/filter/ResourceFilterTest.java  |   4 +-
 13 files changed, 200 insertions(+), 147 deletions(-)

diff --git a/README.md b/README.md
index bf872ae..6c235dc 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,13 @@
 
  [![Build 
Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-resource-filter-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-resource-filter-1.8)
 [![Test 
Status](https://img.shields.io/jenkins/t/https/builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-resource-filter-1.8.svg)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-resource-filter-1.8/test_results_analyzer/)
 [![License](https://img.s [...]
 
-# Resource Filter
-`ResourceFilter` provides a simple matching language that allows you to define 
a `Predicate<Resource>` for use with the Collections and Streams api in Java as 
as the ability to add parameters to the underlying context that the Script will 
pick up. The ResourceFilter can be created by adapting a `Resource` object. 
+# Resource Predicate Service
+`ResourcePredicate` is a service takes a simple matching language script that 
allows you to define a `Predicate<Resource>` for use with the Collections and 
the Streams api in Java, it also provides  the ability to add parameters to the 
underlying context that the script will pick up.
 
 ```java
-ResourceFilter rf = resource.adaptTo(ResourceFilter.class);
-Predicate<Resource> predicate = rf.parse("[jcr:content/created] < 
2013-08-08T16:32");
+@Reference
+ResourcePredicates rp;
+Predicate<Resource> predicate = rp.parse("[jcr:content/created] < 
2013-08-08T16:32");
 resourceCollection.stream().filter(predicate).forEach(
     resource -> System.out.println(resource.getPath())
 );
@@ -18,8 +19,8 @@ resourceCollection.stream().filter(predicate).forEach(
 `ResourceStream` is a general utility to provide a `Stream<Resource>` which 
traverses a resource and it's subtree. The implementation takes a 
`Predicate<Resource>` object as part of the stream creation to define a branch 
selector that controls which children of a resource are followed
 
 
-## Resource Stream Filter
-`ResourceStreamFilter` combines the `ResourceStream` functionality with the 
`ResourceFilter` to provide an ability to define a `Stream<Resource>` that 
follows specific child pages and looks for specific Resources by using a 
ResourceFilter script. The ResourceStreamFilter is access by adaption.
+## Resource Filter Stream
+`ResourceFilterStream` combines the `ResourceStream` functionality with the 
`ResourcePredicates` service to provide an ability to define a 
`Stream<Resource>` that follows specific child pages and looks for specific 
Resources as defined by the resources filter script. The ResourceStreamFilter 
is access by adaption.
 
 ```java
      ResourceStreamFilter rfs = resource.adaptTo(ResourceStreamFilter.class);
diff --git 
a/src/main/java/org/apache/sling/resource/filter/ResourceFilterStream.java 
b/src/main/java/org/apache/sling/resource/filter/ResourceFilterStream.java
index 6e7e9c6..2310881 100644
--- a/src/main/java/org/apache/sling/resource/filter/ResourceFilterStream.java
+++ b/src/main/java/org/apache/sling/resource/filter/ResourceFilterStream.java
@@ -13,6 +13,7 @@
  */
 package org.apache.sling.resource.filter;
 
+import java.util.HashMap;
 import java.util.Map;
 import java.util.function.Predicate;
 import java.util.stream.Stream;
@@ -29,15 +30,17 @@ public class ResourceFilterStream {
 
     private ResourceStream resources;
 
-    private ResourceFilter resourceFilter;
+    private ResourcePredicates resourcePredicate;
 
     private Predicate<Resource> branchSelector = resource -> true;
 
     private Predicate<Resource> childSelector = resource -> true;
+    
+    private Map<String,Object> parameters = new HashMap<>();
 
-    public ResourceFilterStream(Resource resource, ResourceFilter filter) {
-        resources = new ResourceStream(resource);
-        this.resourceFilter = filter;
+    public ResourceFilterStream(Resource resource, ResourcePredicates filter) {
+        this.resources = new ResourceStream(resource);
+        this.resourcePredicate = filter;
     }
 
     /**
@@ -45,12 +48,12 @@ public class ResourceFilterStream {
      * down as part of the Resource traversal
      * 
      * @param branchSelector
-     *            resourceFilter script for traversal control
+     *            resourcePredicate script for traversal control
      * @return ResourceStreamFilter
      * @throws ResourceFilterException
      */
     public ResourceFilterStream setBranchSelector(String branchSelector) {
-        this.branchSelector = resourceFilter.parse(branchSelector);
+        this.branchSelector = 
resourcePredicate.usingParameterMap(parameters).parse(branchSelector);
         return this;
     }
 
@@ -59,12 +62,12 @@ public class ResourceFilterStream {
      * stream
      * 
      * @param childSelector
-     *            resourceFilter script to identify child resources to return
+     *            resourcePredicate script to identify child resources to 
return
      * @return ResourceStreamFilter
      * @throws ResourceFilterException
      */
     public ResourceFilterStream setChildSelector(String childSelector) {
-        this.childSelector = resourceFilter.parse(childSelector);
+        this.childSelector = 
resourcePredicate.usingParameterMap(parameters).parse(childSelector);
         return this;
     }
 
@@ -75,7 +78,7 @@ public class ResourceFilterStream {
      * @return
      */
     public ResourceFilterStream addParam(String key, Object value) {
-        resourceFilter.addParam(key, value);
+        parameters.put(key, value);
         return this;
     }
 
@@ -87,7 +90,7 @@ public class ResourceFilterStream {
      * @return
      */
     public ResourceFilterStream addParams(Map<String, Object> params) {
-        resourceFilter.addParams(params);
+        parameters.putAll(params);
         return this;
     }
 
diff --git a/src/main/java/org/apache/sling/resource/filter/ResourceFilter.java 
b/src/main/java/org/apache/sling/resource/filter/ResourcePredicates.java
similarity index 52%
rename from src/main/java/org/apache/sling/resource/filter/ResourceFilter.java
rename to src/main/java/org/apache/sling/resource/filter/ResourcePredicates.java
index dcc6aba..281d106 100644
--- a/src/main/java/org/apache/sling/resource/filter/ResourceFilter.java
+++ b/src/main/java/org/apache/sling/resource/filter/ResourcePredicates.java
@@ -23,43 +23,65 @@ import java.util.function.Predicate;
 
 import org.apache.sling.api.resource.Resource;
 
-public interface ResourceFilter {
+/**
+ * 
+ *
+ */
+public interface ResourcePredicates {
 
     /**
-     * Creates a Predicate<Resource> based on the script
+     * Creates a Predicate<Resource> based on the provided script
      * 
      * @param filter
      * @return
      * @throws ResourceFilterException
      */
-    public Predicate<Resource> parse(String filter);
+    Predicate<Resource> parse(String filter);
 
     /**
-     * Creates a Predicate<Resource> based on the script
+     * Creates a Predicate<Resource> based on the provided script
      * 
      * @param filter
      * @param charEncoding
      * @return
      * @throws ResourceFilterException
      */
-    public Predicate<Resource> parse(String filter, String charEncoding);
+    Predicate<Resource> parse(String filter, String charEncoding);
 
     /**
      * Add a series of key - value pairs that can then be evaluated as part of 
the
-     * filter creation
+     * Predicate<Resource> creation
      * 
-     * @param params Map of Key - Value pairs
-     * @return this
+     * @param params
+     *            Map of Key - Value pairs
+     * @return ResourcePredicateBuilder
      */
-    public abstract ResourceFilter addParams(Map<String, Object> params);
+    ResourcePredicateBuilder withParameters(Map<String, Object> params);
 
     /**
-     * Adds a key - value pair that can then be evaluated as part of the filter
-     * creation
+     * Adds a key - value pair that can then be evaluated as part of the
+     * Predicate<Resource> creation
      * 
      * @param key
      * @param value
-     * @return this
+     * @return ResourcePredicateBuilder
+     */
+    ResourcePredicateBuilder withParameter(String key, Object value);
+
+    /**
+     * Replaces the existing parameter map with the supplied Map<String,Object>
+     * object, all prior provided parameters will be replaced
+     * 
+     * @return ResourcePredicateBuilder
      */
-    public abstract ResourceFilter addParam(String key, Object value);
+    ResourcePredicateBuilder usingParameterMap(Map<String, Object> params);
+
+    /**
+     * Provides a transitional state where multiple parameters can be applied 
before
+     * creating the Predicate
+     * 
+     */
+    public static interface ResourcePredicateBuilder extends 
ResourcePredicates {
+
+    }
 }
diff --git 
a/src/main/java/org/apache/sling/resource/filter/impl/ComparisonVisitor.java 
b/src/main/java/org/apache/sling/resource/filter/impl/ComparisonVisitor.java
index ee71126..55a3533 100644
--- a/src/main/java/org/apache/sling/resource/filter/impl/ComparisonVisitor.java
+++ b/src/main/java/org/apache/sling/resource/filter/impl/ComparisonVisitor.java
@@ -74,7 +74,7 @@ public class ComparisonVisitor implements 
Visitor<Function<Resource, Object>> {
         case FilterParserConstants.DYNAMIC_ARG:
             return resource -> {
                 String argument = node.text;
-                Optional<Object> arg = context.getArgument(argument);
+                Optional<Object> arg = context.getParameter(argument);
                 if (!arg.isPresent()) {
                     throw new NoSuchElementException(String.format("No value 
present for '%s'",argument));
                 }
diff --git a/src/main/java/org/apache/sling/resource/filter/impl/Context.java 
b/src/main/java/org/apache/sling/resource/filter/impl/Context.java
index 0ef64f5..798293f 100644
--- a/src/main/java/org/apache/sling/resource/filter/impl/Context.java
+++ b/src/main/java/org/apache/sling/resource/filter/impl/Context.java
@@ -95,8 +95,17 @@ public interface Context {
      * @param name of the argument
      * @return Optional object represented by the name
      */
-    Optional<Object> getArgument(String name);
+    Optional<Object> getParameter(String name);
 
-    void addParams(Map<String, Object> params);
+    
+    void addParameters(Map<String, Object> params);
 
+    /**
+     * Allows an object to be represented in the script for evaluation.
+     * 
+     * @param name of the argument
+     * @param object value that is represented
+     * @return this Context
+     */
+    Context replaceParameterMap(Map<String, Object> params);
 }
diff --git 
a/src/main/java/org/apache/sling/resource/filter/impl/DefaultContext.java 
b/src/main/java/org/apache/sling/resource/filter/impl/DefaultContext.java
index 41dfdb8..8a63932 100644
--- a/src/main/java/org/apache/sling/resource/filter/impl/DefaultContext.java
+++ b/src/main/java/org/apache/sling/resource/filter/impl/DefaultContext.java
@@ -26,7 +26,7 @@ public class DefaultContext implements Context {
 
     private Map<String, BiFunction<Object[], Resource, Object>> functions = 
new HashMap<>();
 
-    private Map<String, Object> arguments = new HashMap<>();
+    private Map<String, Object> parameters = new HashMap<>();
 
     private Visitor<Predicate<Resource>> logicVisitor;
 
@@ -46,7 +46,7 @@ public class DefaultContext implements Context {
 
     @Override
     public Context addArgument(String name, Object object) {
-        arguments.put(name, object);
+        parameters.put(name, object);
         return this;
     }
 
@@ -78,13 +78,19 @@ public class DefaultContext implements Context {
     }
 
     @Override
-    public Optional<Object> getArgument(String text) {
-        return Optional.ofNullable(arguments.get(text));
+    public Optional<Object> getParameter(String text) {
+        return Optional.ofNullable(parameters.get(text));
     }
 
     @Override
-    public void addParams(Map<String, Object> params) {
-        arguments.putAll(params);
+    public void addParameters(Map<String, Object> params) {
+        parameters.putAll(params);
+    }
+
+    @Override
+    public Context replaceParameterMap(Map<String, Object> params) {
+        parameters = params;
+        return this;
     }
 
 }
diff --git 
a/src/main/java/org/apache/sling/resource/filter/impl/ResourceFilterAdapter.java
 
b/src/main/java/org/apache/sling/resource/filter/impl/ResourceFilterAdapter.java
index d1197fb..903447e 100644
--- 
a/src/main/java/org/apache/sling/resource/filter/impl/ResourceFilterAdapter.java
+++ 
b/src/main/java/org/apache/sling/resource/filter/impl/ResourceFilterAdapter.java
@@ -20,7 +20,7 @@ package org.apache.sling.resource.filter.impl;
 
 import org.apache.sling.api.adapter.AdapterFactory;
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.resource.filter.ResourceFilter;
+import org.apache.sling.resource.filter.ResourcePredicates;
 import org.apache.sling.resource.filter.ResourceFilterStream;
 import org.osgi.service.component.annotations.Component;
 
@@ -32,11 +32,11 @@ public class ResourceFilterAdapter implements 
AdapterFactory {
     @Override
     public <T> T getAdapter(Object adaptable, Class<T> type) {
         if (adaptable instanceof Resource) {
-            ResourceFilter filter = new ResourceFilterImpl();
+            ResourcePredicates filter = new ResourcePredicateImpl();
             if (type == ResourceFilterStream.class) {
                 return (T) new ResourceFilterStream((Resource)adaptable, 
filter);
             }
-            if (type == ResourceFilter.class) {
+            if (type == ResourcePredicates.class) {
                 return (T) filter;
             }
         }
diff --git 
a/src/main/java/org/apache/sling/resource/filter/impl/ResourceFilterImpl.java 
b/src/main/java/org/apache/sling/resource/filter/impl/ResourceFilterImpl.java
deleted file mode 100644
index 7aa51bf..0000000
--- 
a/src/main/java/org/apache/sling/resource/filter/impl/ResourceFilterImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed 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.sling.resource.filter.impl;
-
-import java.io.ByteArrayInputStream;
-import java.util.Map;
-import java.util.function.Predicate;
-
-import org.apache.sling.api.resource.Resource;
-import org.apache.sling.resource.filter.ResourceFilter;
-import org.apache.sling.resource.filter.impl.node.Node;
-import org.apache.sling.resource.filter.impl.script.FilterParser;
-import org.apache.sling.resource.filter.impl.script.ParseException;
-
-public class ResourceFilterImpl implements ResourceFilter {
-
-    
-    private Context context;
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.sling.resource.filter.ResourceFilterStream#getContext()
-     */
-    public Context getContext() {
-        if (context == null) {
-            context = new DefaultContext();
-            new LogicVisitor(context);
-            new ComparisonVisitor(context);
-        }
-        return context;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * 
org.apache.sling.resource.filter.ResourceFilterStream#setContext(org.apache.sling.
-     * resource.filter.impl.Context)
-     */
-
-    public ResourceFilter setContext(Context context) {
-        this.context = context;
-        return this;
-    }
-    
-    
-    @Override
-    public Predicate<Resource> parse(String filter) {
-        Node rootNode;
-        try {
-            rootNode = new FilterParser(new 
ByteArrayInputStream(filter.getBytes())).parse();
-            return rootNode.accept(getContext().getLogicVisitor());
-        } catch (ParseException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-
-
-    @Override
-    public Predicate<Resource> parse(String filter, String charEncoding) {
-        Node rootNode;
-        try {
-            rootNode = new FilterParser(new 
ByteArrayInputStream(filter.getBytes()),charEncoding).parse();
-            return rootNode.accept(getContext().getLogicVisitor());
-        } catch (ParseException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    @Override
-    public ResourceFilter addParams(Map<String, Object> params) {
-        getContext().addParams(params);
-        return this;
-    }
-
-    @Override
-    public ResourceFilter addParam(String key, Object value) {
-        getContext().addArgument(key, value);
-        return this;
-    }
-
-}
diff --git 
a/src/main/java/org/apache/sling/resource/filter/impl/ResourcePredicateImpl.java
 
b/src/main/java/org/apache/sling/resource/filter/impl/ResourcePredicateImpl.java
new file mode 100644
index 0000000..060ec2e
--- /dev/null
+++ 
b/src/main/java/org/apache/sling/resource/filter/impl/ResourcePredicateImpl.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed 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.sling.resource.filter.impl;
+
+import java.io.ByteArrayInputStream;
+import java.util.Map;
+import java.util.function.Predicate;
+
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.resource.filter.ResourcePredicates;
+import org.apache.sling.resource.filter.impl.node.Node;
+import org.apache.sling.resource.filter.impl.script.FilterParser;
+import org.apache.sling.resource.filter.impl.script.ParseException;
+import org.osgi.service.component.annotations.Component;
+
+@Component
+public class ResourcePredicateImpl implements ResourcePredicates {
+
+    @Override
+    public Predicate<Resource> parse(String filter) {
+        return new ResourcePredicateBuilderImpl().parse(filter);
+    }
+
+    @Override
+    public Predicate<Resource> parse(String filter, String charEncoding) {
+        return new ResourcePredicateBuilderImpl().parse(filter, charEncoding);
+    }
+
+    @Override
+    public ResourcePredicateBuilder withParameters(Map<String, Object> params) 
{
+        return new ResourcePredicateBuilderImpl().withParameters(params);
+    }
+
+    @Override
+    public ResourcePredicateBuilder withParameter(String key, Object value) {
+        return new ResourcePredicateBuilderImpl().withParameter(key, value);
+    }
+    
+    @Override
+    public ResourcePredicateBuilder usingParameterMap(Map<String, Object> 
params) {
+        return new ResourcePredicateBuilderImpl().usingParameterMap(params);
+    }
+
+    public static class ResourcePredicateBuilderImpl implements 
ResourcePredicateBuilder {
+
+        private Context context;
+
+        private ResourcePredicateBuilderImpl() {
+            context = new DefaultContext();
+            new LogicVisitor(context);
+            new ComparisonVisitor(context);
+        }
+
+        @Override
+        public Predicate<Resource> parse(String filter) {
+            Node rootNode;
+            try {
+                rootNode = new FilterParser(new 
ByteArrayInputStream(filter.getBytes())).parse();
+                return rootNode.accept(context.getLogicVisitor());
+            } catch (ParseException e) {
+                throw new IllegalArgumentException(e);
+            }
+        }
+
+        @Override
+        public Predicate<Resource> parse(String filter, String charEncoding) {
+            Node rootNode;
+            try {
+                rootNode = new FilterParser(new 
ByteArrayInputStream(filter.getBytes()), charEncoding).parse();
+                return rootNode.accept(context.getLogicVisitor());
+            } catch (ParseException e) {
+                throw new IllegalArgumentException(e);
+            }
+        }
+
+        @Override
+        public ResourcePredicateBuilder withParameters(Map<String, Object> 
params) {
+            context.addParameters(params);
+            return this;
+        }
+
+        @Override
+        public ResourcePredicateBuilder withParameter(String key, Object 
value) {
+            context.addArgument(key, value);
+            return this;
+        }
+
+        @Override
+        public ResourcePredicateBuilder usingParameterMap(Map<String, Object> 
params) {
+            context.replaceParameterMap(params);
+            return this;
+        }
+
+    }
+
+}
diff --git 
a/src/test/java/org/apache/sling/resource/filter/ResourceFilterArgTest.java 
b/src/test/java/org/apache/sling/resource/filter/ResourceFilterArgTest.java
index 11128e7..773d7e0 100644
--- a/src/test/java/org/apache/sling/resource/filter/ResourceFilterArgTest.java
+++ b/src/test/java/org/apache/sling/resource/filter/ResourceFilterArgTest.java
@@ -23,7 +23,7 @@ import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.resource.filter.impl.ResourceFilterImpl;
+import org.apache.sling.resource.filter.impl.ResourcePredicateImpl;
 import org.apache.sling.testing.mock.sling.junit.SlingContext;
 import org.junit.Before;
 import org.junit.Rule;
@@ -37,14 +37,14 @@ public class ResourceFilterArgTest {
 
     Resource resource;
     
-    ResourceFilter resourceFilter = new ResourceFilterImpl();
+    ResourcePredicates resourceFilter = new ResourcePredicateImpl();
     
     @Before
     public void setUp() throws ParseException {
         context.load().json("/data.json", "/content/sample/en");
         resource = context.resourceResolver().getResource(START_PATH);
-        context.registerAdapter(Resource.class, ResourceFilterStream.class, 
new ResourceFilterStream(resource,new ResourceFilterImpl()));
-        context.registerAdapter(Resource.class, ResourceFilter.class, new 
ResourceFilterImpl());
+        context.registerAdapter(Resource.class, ResourceFilterStream.class, 
new ResourceFilterStream(resource,new ResourcePredicateImpl()));
+        context.registerAdapter(Resource.class, ResourcePredicates.class, new 
ResourcePredicateImpl());
     }
 
     @Test
@@ -69,7 +69,7 @@ public class ResourceFilterArgTest {
 
     @Test
     public void testNameFunctionAgainstRegex() throws ParseException, 
Exception {
-        Predicate<Resource> filter = resourceFilter.addParam("regex", 
"testpage[1-2]").parse("name() like $regex");
+        Predicate<Resource> filter = resourceFilter.withParameter("regex", 
"testpage[1-2]").parse("name() like $regex");
         List<Resource> found = handle(new ResourceStream(resource), filter);
         assertEquals(2, found.size());
     }
diff --git 
a/src/test/java/org/apache/sling/resource/filter/ResourceFilterDateTest.java 
b/src/test/java/org/apache/sling/resource/filter/ResourceFilterDateTest.java
index bdc4a63..210b493 100644
--- a/src/test/java/org/apache/sling/resource/filter/ResourceFilterDateTest.java
+++ b/src/test/java/org/apache/sling/resource/filter/ResourceFilterDateTest.java
@@ -19,7 +19,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.resource.filter.impl.ResourceFilterImpl;
+import org.apache.sling.resource.filter.impl.ResourcePredicateImpl;
 import org.apache.sling.resource.filter.impl.script.ParseException;
 import org.apache.sling.testing.mock.sling.junit.SlingContext;
 import org.junit.Before;
@@ -33,7 +33,7 @@ public class ResourceFilterDateTest {
 
     private Resource resource;
     
-    ResourceFilter resourceFilter = new ResourceFilterImpl();
+    ResourcePredicates resourceFilter = new ResourcePredicateImpl();
 
     private static String START_PATH = "/content/sample/en";
 
diff --git 
a/src/test/java/org/apache/sling/resource/filter/ResourceFilterLogicTest.java 
b/src/test/java/org/apache/sling/resource/filter/ResourceFilterLogicTest.java
index aad9a37..7afeddf 100644
--- 
a/src/test/java/org/apache/sling/resource/filter/ResourceFilterLogicTest.java
+++ 
b/src/test/java/org/apache/sling/resource/filter/ResourceFilterLogicTest.java
@@ -19,7 +19,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.resource.filter.impl.ResourceFilterImpl;
+import org.apache.sling.resource.filter.impl.ResourcePredicateImpl;
 import org.apache.sling.resource.filter.impl.script.ParseException;
 import org.apache.sling.testing.mock.sling.junit.SlingContext;
 import org.junit.Before;
@@ -35,7 +35,7 @@ public class ResourceFilterLogicTest {
 
     private Resource resource;
     
-    ResourceFilter resourceFilter = new ResourceFilterImpl();
+    ResourcePredicates resourceFilter = new ResourcePredicateImpl();
 
     @Before
     public void setUp() throws ParseException, java.text.ParseException {
diff --git 
a/src/test/java/org/apache/sling/resource/filter/ResourceFilterTest.java 
b/src/test/java/org/apache/sling/resource/filter/ResourceFilterTest.java
index 781bdbd..cb6554b 100644
--- a/src/test/java/org/apache/sling/resource/filter/ResourceFilterTest.java
+++ b/src/test/java/org/apache/sling/resource/filter/ResourceFilterTest.java
@@ -19,7 +19,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.resource.filter.impl.ResourceFilterImpl;
+import org.apache.sling.resource.filter.impl.ResourcePredicateImpl;
 import org.apache.sling.testing.mock.sling.junit.SlingContext;
 import org.junit.Before;
 import org.junit.Rule;
@@ -34,7 +34,7 @@ public class ResourceFilterTest {
 
     private Resource resource;
     
-    ResourceFilter resourceFilter = new ResourceFilterImpl();
+    ResourcePredicates resourceFilter = new ResourcePredicateImpl();
 
     @Before
     public void setUp() {

Reply via email to