Class FilterByPropertyIsMultiple

  • All Implemented Interfaces:
    FilterBy

    public class FilterByPropertyIsMultiple
    extends Object
    implements FilterBy
    Filters resources by a given property. The filter only matches if the attribute exists and has the exact given value and the property is an array or a list.
    Author:
    Michiel Spiritus
    • Constructor Detail

      • FilterByPropertyIsMultiple

        public FilterByPropertyIsMultiple​(@Nonnull
                                          String name,
                                          Object value)
        Constructor
        Parameters:
        name - attribute name
        value - attribute value
    • 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