Class FilterByNodeNameRegex

  • All Implemented Interfaces:
    FilterBy

    public class FilterByNodeNameRegex
    extends Object
    implements FilterBy
    Filters resources by node name regular expression. Only resources that have a matching node name are accepted.
    Author:
    Roxana Muresan
    • Constructor Detail

      • FilterByNodeNameRegex

        public FilterByNodeNameRegex​(@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,
                              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