Copyright© 2008-2022 Sitevision AB, all rights reserved.
@Requireable(value="CompoundOrFilterBuilder") public interface CompoundOrFilterBuilder extends Builder<Filter<Node>>
How a compound OR filter works: If filter A and filter B is added to this builder, then the accept method of the built filter will return the result of the logical boolean evaluation of: A.accept OR B.accept.
NodeFilterUtil
for an example of how to use a CompoundOrFilterBuilder
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.getCompoundOrFilterBuilder()
.
See NodeFilterUtil
for how to obtain an instance of the NodeFilterUtil
interface.
Modifier and Type | Method and Description |
---|---|
CompoundOrFilterBuilder |
addFilter(Filter<Node> aFilter)
Adds a node filter to this builder.
|
Filter<Node> |
build()
Creates a node filter instance that will perform the OR operation for all currently specified filters.
|
CompoundOrFilterBuilder |
clearFilters()
Removes all previously added filters.
|
CompoundOrFilterBuilder 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 ignoredCompoundOrFilterBuilder 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.