Class FilterByMultiValuePropContains

  • All Implemented Interfaces:
    FilterBy

    public class FilterByMultiValuePropContains
    extends Object
    implements FilterBy
    Filters resources by multi-value properties. It checks if the given values are contained in the resource's multi-value field, no exact match.
    Author:
    Roxana Muresan
    • Constructor Detail

      • FilterByMultiValuePropContains

        public FilterByMultiValuePropContains​(@Nonnull
                                              String name,
                                              @Nonnull
                                              Object[] values)
        Constructor
        Parameters:
        name - name of the multi-value property
        values - values to be searched for
    • 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