Class FilterByNodeName

  • All Implemented Interfaces:
    FilterBy

    public class FilterByNodeName
    extends Object
    implements FilterBy
    Filters resources by their node name. Only resources that have the exact node name are accepted.
    Author:
    Roxana Muresan
    • Constructor Detail

      • FilterByNodeName

        public FilterByNodeName​(@Nonnull
                                String name)
        Constructor
        Parameters:
        name - node name
    • 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