Package org.nuxeo.ecm.core.api.impl
Class FacetFilter
- java.lang.Object
-
- org.nuxeo.ecm.core.api.impl.FacetFilter
-
- All Implemented Interfaces:
Filter
public class FacetFilter extends Object implements Filter
A filter based on facets.- Author:
- Georges Racinet, Florent Guillaume
-
-
Constructor Summary
Constructors Constructor Description FacetFilter(String facet, boolean isRequired)
Simpler constructor to filter on a single facet.FacetFilter(List<String> required, List<String> excluded)
Generic constructor.FacetFilter(FacetFilter filter1, FacetFilter filter2)
Constructor that ANDs two filters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(DocumentModel docModel)
Filters data models objects.protected Boolean
findShortcut()
-
-
-
Constructor Detail
-
FacetFilter
public FacetFilter(List<String> required, List<String> excluded)
Generic constructor.- Parameters:
required
- list of facets the models must have to pass the filterexcluded
- list of facets the models must not have to pass the filter
-
FacetFilter
public FacetFilter(String facet, boolean isRequired)
Simpler constructor to filter on a single facet.- Parameters:
facet
- the facet to filter onisRequired
- if true, accepted models must have the facet; if false, accepted models must not have the facet
-
FacetFilter
public FacetFilter(FacetFilter filter1, FacetFilter filter2)
Constructor that ANDs two filters.- Parameters:
filter1
- the first filterfilter2
- the second filter
-
-
Method Detail
-
findShortcut
protected Boolean findShortcut()
-
accept
public boolean accept(DocumentModel docModel)
Description copied from interface:Filter
Filters data models objects.
-
-