Updated javadoc and Readme
diff --git a/README.md b/README.md
index 6c235dc..c304bcd 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@
`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);
+ ResourceFilterStream rfs = resource.adaptTo(ResourceFilterStream.class);
rfs
.setBranchSelector("[jcr:primaryType] == 'cq:Page'")
diff --git a/src/main/java/org/apache/sling/resource/filter/ResourcePredicates.java b/src/main/java/org/apache/sling/resource/filter/ResourcePredicates.java
index 281d106..a72436a 100644
--- a/src/main/java/org/apache/sling/resource/filter/ResourcePredicates.java
+++ b/src/main/java/org/apache/sling/resource/filter/ResourcePredicates.java
@@ -24,7 +24,8 @@
import org.apache.sling.api.resource.Resource;
/**
- *
+ * Service which provides the ability to convert a String into a
+ * Predicate<Resource> to match against Resource Objects
*
*/
public interface ResourcePredicates {
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 798293f..e30d10c 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
@@ -44,14 +44,6 @@
*/
Context removeFunction(String name);
- /**
- * 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 addArgument(String name, Object object);
/**
* Retrieve the currently defined Logic Visitor
@@ -97,11 +89,24 @@
*/
Optional<Object> getParameter(String name);
+ /**
+ * 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 addParameter(String name, Object object);
+ /**
+ * Adds the provided Map to the underlying parameter map.
+ *
+ * @param params
+ */
void addParameters(Map<String, Object> params);
/**
- * Allows an object to be represented in the script for evaluation.
+ * Replaces the underlying parameter Map with the one provided
*
* @param name of the argument
* @param object value that is represented
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 8a63932..95158d9 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
@@ -45,7 +45,7 @@
}
@Override
- public Context addArgument(String name, Object object) {
+ public Context addParameter(String name, Object object) {
parameters.put(name, object);
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
index 060ec2e..304f38d 100644
--- a/src/main/java/org/apache/sling/resource/filter/impl/ResourcePredicateImpl.java
+++ b/src/main/java/org/apache/sling/resource/filter/impl/ResourcePredicateImpl.java
@@ -92,7 +92,7 @@
@Override
public ResourcePredicateBuilder withParameter(String key, Object value) {
- context.addArgument(key, value);
+ context.addParameter(key, value);
return this;
}
diff --git a/src/main/java/org/apache/sling/resource/filter/impl/Visitor.java b/src/main/java/org/apache/sling/resource/filter/impl/Visitor.java
index de9ec58..b9c234d 100644
--- a/src/main/java/org/apache/sling/resource/filter/impl/Visitor.java
+++ b/src/main/java/org/apache/sling/resource/filter/impl/Visitor.java
@@ -13,8 +13,6 @@
*/
package org.apache.sling.resource.filter.impl;
-import java.text.ParseException;
-
import org.apache.sling.resource.filter.impl.node.Node;
/**