Class FilterByPathRegex

  • All Implemented Interfaces:
    FilterBy

    public class FilterByPathRegex
    extends Object
    implements FilterBy
    Filters resources by path. Resources who's path matches the given regex are accepted.
    Author:
    Roxana Muresan
    • Constructor Detail

      • FilterByPathRegex

        public FilterByPathRegex​(@Nonnull
                                 String regex)
        Constructor
        Parameters:
        regex - regular expression (standard Java pattern)
    • Method Detail

      • filter

        public boolean filter​(@Nonnull
                              org.apache.sling.api.resource.Resource resource,
                              @Nonnull
                              StringBuilder output)
        Description copied from interface: FilterBy
        Checks if the given resource matches the filter criteria.
        Specified by:
        filter in interface FilterBy
        Parameters:
        resource - resource
        output - output buffer
        Returns:
        matches