Copyright© 2008-2022 Sitevision AB, all rights reserved.
@Requireable(value="CompoundAndFilterBuilder") public interface CompoundAndFilterBuilder extends Builder<Filter<Node>>
How a compound AND filter works: If filter A and filter B is added to this builder, then the accept method of the built filter will return the boolean result of the logical boolean evaluation of: A.accept AND B.accept.
NodeFilterUtil for an example of how to use a CompoundAndFilterBuilder in Velocity.
Builder for a comprehensive example of how to work with builders.
An instance of the Sitevision class implementing this interface can be obtained via
NodeFilterUtil.getCompoundAndFilterBuilder().
See NodeFilterUtil for how to obtain an instance of the NodeFilterUtil interface.
| Modifier and Type | Method and Description |
|---|---|
CompoundAndFilterBuilder |
addFilter(Filter<Node> aFilter)
Adds a node filter to this builder.
|
Filter<Node> |
build()
Creates a node filter instance that will perform the AND operation for all currently specified filters.
|
CompoundAndFilterBuilder |
clearFilters()
Removes all previously added filters.
|
CompoundAndFilterBuilder addFilter(Filter<Node> aFilter)
Tip! For best performance, it's likely a good idea to add the "cheapest" filter first!
aFilter - the node filter to add, null will be ignoredCompoundAndFilterBuilder clearFilters()
Filter<Node> build() throws IllegalStateException
build in interface Builder<Filter<Node>>IllegalStateException - if this builder contains no filters.Sitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2022 Sitevision AB, all rights reserved.