Klasse ResourceFilterStream

java.lang.Object
org.apache.sling.resource.filter.ResourceFilterStream

@ProviderType public class ResourceFilterStream extends Object
Creates a Predicate of type Resource to identify matching Resource objects
  • Konstruktordetails

    • ResourceFilterStream

      public ResourceFilterStream(org.apache.sling.api.resource.Resource resource, ResourcePredicates filter)
  • Methodendetails

    • setBranchSelector

      public ResourceFilterStream setBranchSelector(String branchSelector)
      Adds a branchSelector to define which child resource are acceptable to travel down as part of the Resource traversal
      Parameter:
      branchSelector - resourcePredicate script for traversal control
      Gibt zurück:
      ResourceStreamFilter
    • setChildSelector

      public ResourceFilterStream setChildSelector(String childSelector)
      Adds a childSelector to define which child resources should be part of the stream
      Parameter:
      childSelector - resourcePredicate script to identify child resources to return
      Gibt zurück:
      ResourceStreamFilter
    • addParam

      public ResourceFilterStream addParam(String key, Object value)
      Add a key - value pair that can then be evaluated as part of the Script
    • addParams

      public ResourceFilterStream addParams(Map<String,Object> params)
      Add a series of key - value pairs that can then be evaluated as part of the ScriptFilter
    • stream

      public Stream<org.apache.sling.api.resource.Resource> stream()
      Stream<Resource> which uses the branchSelector as the basis of the traversal and then filters the resources based on the childSelector that was provided
      Gibt zurück:
      pre filterd Stream<Resource>