public class FacetFilter extends Object implements Filter
Modifier and Type | Field and Description |
---|---|
static FacetFilter |
ALLOW |
Set<String> |
excluded
Set of excluded facets.
|
Set<String> |
required
Set of required facets.
|
Boolean |
shortcut |
Constructor and Description |
---|
FacetFilter(FacetFilter filter1,
FacetFilter filter2)
Constructor that ANDs two filters.
|
FacetFilter(List<String> required,
List<String> excluded)
Generic constructor.
|
FacetFilter(String facet,
boolean isRequired)
Simpler constructor to filter on a single facet.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DocumentModel docModel)
Filters data models objects.
|
protected Boolean |
findShortcut() |
public static final FacetFilter ALLOW
public FacetFilter(List<String> required, List<String> excluded)
required
- list of facets the models must have to pass the filterexcluded
- list of facets the models must not have to pass the filterpublic FacetFilter(String facet, boolean isRequired)
facet
- the facet to filter onisRequired
- if true, accepted models must have the facet; if false, accepted models must not have the facetpublic FacetFilter(FacetFilter filter1, FacetFilter filter2)
filter1
- the first filterfilter2
- the second filterprotected Boolean findShortcut()
public boolean accept(DocumentModel docModel)
Filter
Copyright © 2015 Nuxeo SA. All rights reserved.