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


The following commit(s) were added to refs/heads/master by this push:
     new 5e75c95  javadoc update
5e75c95 is described below

commit 5e75c95dfdd2838ce1ab1a7902032df2bafb9704
Author: JE Bailey <[email protected]>
AuthorDate: Tue Aug 7 09:57:58 2018 -0400

    javadoc update
---
 .../sling/resource/filter/ResourceFilter.java      | 11 ++++----
 .../resource/filter/ResourceFilterException.java   |  7 +++++-
 .../resource/filter/ResourceFilterProvider.java    |  5 ++++
 .../resource/filter/ResourceFilterStream.java      | 29 ++++++++++++----------
 4 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/src/main/java/org/apache/sling/resource/filter/ResourceFilter.java 
b/src/main/java/org/apache/sling/resource/filter/ResourceFilter.java
index 795f94f..f3f2802 100644
--- a/src/main/java/org/apache/sling/resource/filter/ResourceFilter.java
+++ b/src/main/java/org/apache/sling/resource/filter/ResourceFilter.java
@@ -26,7 +26,7 @@ import org.apache.sling.api.resource.Resource;
 public interface ResourceFilter {
 
     /**
-     * Creates a Predicate<Resource> based on the scripted matching
+     * Creates a Predicate<Resource> based on the script
      * 
      * @param filter
      * @return
@@ -35,7 +35,7 @@ public interface ResourceFilter {
     public Predicate<Resource> parse(String filter) throws 
ResourceFilterException;
 
     /**
-     * Creates a Predicate<Resource> based on the scripted matching
+     * Creates a Predicate<Resource> based on the script
      * 
      * @param filter
      * @param charEncoding
@@ -48,16 +48,17 @@ public interface ResourceFilter {
      * Add a series of key - value pairs that can then be evaluated as part of 
the
      * filter creation
      * 
-     * @param params
+     * @param params Map of Key - Value pairs
      * @return this
      */
     public abstract ResourceFilter addParams(Map<String, Object> params);
 
     /**
-     * Add a key - value pair that can then be evaluated as part of the filter
+     * Adds a key - value pair that can then be evaluated as part of the filter
      * creation
      * 
-     * @param params
+     * @param key
+     * @param value
      * @return this
      */
     public abstract ResourceFilter addParam(String key, Object value);
diff --git 
a/src/main/java/org/apache/sling/resource/filter/ResourceFilterException.java 
b/src/main/java/org/apache/sling/resource/filter/ResourceFilterException.java
index e06e2cd..5829f29 100644
--- 
a/src/main/java/org/apache/sling/resource/filter/ResourceFilterException.java
+++ 
b/src/main/java/org/apache/sling/resource/filter/ResourceFilterException.java
@@ -18,6 +18,12 @@
  */
 package org.apache.sling.resource.filter;
 
+/**
+ * Used to wrap internally generated Parser exceptions when a malformed scipt 
is
+ * provided
+ * 
+ *
+ */
 public class ResourceFilterException extends Exception {
 
     public ResourceFilterException(Throwable cause) {
@@ -26,5 +32,4 @@ public class ResourceFilterException extends Exception {
 
     private static final long serialVersionUID = 5893818236312416308L;
 
-
 }
diff --git 
a/src/main/java/org/apache/sling/resource/filter/ResourceFilterProvider.java 
b/src/main/java/org/apache/sling/resource/filter/ResourceFilterProvider.java
index bc80b3e..a8ae061 100644
--- a/src/main/java/org/apache/sling/resource/filter/ResourceFilterProvider.java
+++ b/src/main/java/org/apache/sling/resource/filter/ResourceFilterProvider.java
@@ -20,6 +20,11 @@ package org.apache.sling.resource.filter;
 
 public interface ResourceFilterProvider {
     
+    /**
+     * Generates a unique ResourceFilter per request
+     * 
+     * @return
+     */
     public ResourceFilter getResourceFilter();
 
 }
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 6bf389b..e2dd9d8 100644
--- a/src/main/java/org/apache/sling/resource/filter/ResourceFilterStream.java
+++ b/src/main/java/org/apache/sling/resource/filter/ResourceFilterStream.java
@@ -20,7 +20,6 @@ import java.util.stream.Stream;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.resource.filter.ResourceFilterStream;
 
-
 /**
  * Creates a {@link Predicate} of type {@link Resource} to identify matching
  * Resource objects
@@ -42,13 +41,13 @@ public class ResourceFilterStream {
     }
 
     /**
-     * Creates a Stream<Resource> using the branchSelector to create the 
traversal
-     * predicate to select the appropriate child resources
+     * Adds a branchSelector to define which child resource are acceptable to 
travel
+     * down as part of the Resource traversal
      * 
      * @param branchSelector
      *            resourceFilter script for traversal control
-     * @return ResourceStream
-     * @throws ParseException
+     * @return ResourceStreamFilter
+     * @throws ResourceFilterException
      */
     public ResourceFilterStream setBranchSelector(String branchSelector) 
throws ResourceFilterException {
         this.branchSelector = resourceFilter.parse(branchSelector);
@@ -56,15 +55,13 @@ public class ResourceFilterStream {
     }
 
     /**
-     * Creates a Stream<Resource> using the branchSelector to create the 
traversal
-     * predicate to select the appropriate child resources
+     * Adds a childSelector to define which child resources should be part of 
the
+     * stream
      * 
-     * @param branchSelector
-     *            resourceFilter script for traversal control
-     * @param charEncoding
-     *            char encoding of the branch selector String
-     * @return ResourceStream
-     * @throws ParseException
+     * @param childSelector
+     *            resourceFilter script to identify child resources to return
+     * @return ResourceStreamFilter
+     * @throws ResourceFilterException
      */
     public ResourceFilterStream setChildSelector(String childSelector) throws 
ResourceFilterException {
         this.childSelector = resourceFilter.parse(childSelector);
@@ -94,6 +91,12 @@ public class ResourceFilterStream {
         return this;
     }
 
+    /**
+     * Stream<Resource> which uses the branchSelector as the basis of the 
traversal
+     * and then filters the resources based on the childSelector that was 
provided
+     * 
+     * @return pre filterd Stream<Resource>
+     */
     public Stream<Resource> stream() {
         return resources.stream(branchSelector).filter(childSelector);
     }

Reply via email to