Class FilterByProperties

  • All Implemented Interfaces:
    FilterBy

    public class FilterByProperties
    extends Object
    implements FilterBy
    Filters resources by properties. You can define multiple properties that all need an exact match. This works for multi-value properties too with exact match.
    Author:
    Roxana Muresan
    • Constructor Detail

      • FilterByProperties

        public FilterByProperties​(@Nonnull
                                  Map<String,​Object> conditionProperties)
        Constructor
        Parameters:
        conditionProperties - list of properties to match (property name, property 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