Copyright© 2008-2025 Sitevision AB, all rights reserved.
@Requireable(value="NodeFilterUtil") public interface NodeFilterUtil
A node filter is used to match a node against one or more criteria as specified by the filter.
null
check and an equals
check for a certain value
of a node (e.g. see getStringPropertyFilter(String, String)
).
getCompoundAndFilterBuilder()
).
A filter can be used "standalone" to simplify your code, but can also be used in utilities with methods that supports node filters.
Examples of such utilities are NodeIteratorUtil
and NodeTreeUtil
.
This example uses Velocity to demonstrate how to build a filter that matches image nodes that has a width of at least 700 or a height of at least 500.
#set ($nodeFilterUtil = $sitevisionUtils.NodeFilterUtil)
#set ($nodeTypeUtil = $sitevisionUtils.NodeTypeUtil)
## Set up individual filters needed
#set ($imageFilter = $nodeFilterUtil.getPrimaryNodeTypeFilter($nodeTypeUtil.IMAGE_TYPE))
#set ($minWidthFilter = $nodeFilterUtil.getMinIntPropertyFilter('width', 700))
#set ($minHeightFilter = $nodeFilterUtil.getMinIntPropertyFilter('height', 500))
## The width and the height filters should be logically combined with the OR operator
#set ($sizeFilterBuilder = $nodeFilterUtil.CompoundOrFilterBuilder)
#set ($sizeFilter = $sizeFilterBuilder.addFilter($minWidthFilter).addFilter($minHeightFilter).build())
## The type and the size filters should be logically combined with the AND operator
#set ($sizedImageFilterBuilder = $nodeFilterUtil.CompoundAndFilterBuilder)
#set ($sizedImageFilter = $sizedImageFilterBuilder.addFilter($imageFilter).addFilter($sizeFilter).build())
Now the $sizedImageFilter can be used to match individual nodes, for example:
#if ($sizedImageFilter.accept($myNode))
## Handle matching image
...
#end
The $sizedImageFilter can also be used to match multiple nodes via a filter-supporting utility.
NodeIteratorUtil
is an example of such utility.
It provides support to find the first, all or a given number of matches of the nodes provided by
a NodeIterator
, for example:
#set ($nodeIteratorUtil = $sitevisionUtils.NodeIteratorUtil)
#set ($matches = $nodeIteratorUtil.findNodes($aNodeIterator, $sizedImageFilter, 5)) ## Max 5 matches
#if (!$matches.isEmpty())
## Handle matching images
...
#end
Tip! See Builder
for how to work with builders.
Beware of nulls! Invoking the accept
method on a node filter with
null
should always be avoided! Filters returned from this class are forgiving and will typically handle null
but the result might be unexpected, depending on what the filter is actually used for.
For instance: Invoking a HasPropertyfilter
with null
will return
false
(i.e. "null is not accepted"). But consequently will the same filter wrapped in a
InvertedFilter
return true
(i.e. "null is accepted").
Disclaimer! The Property-based filters for the Java native int
type (i.e. get*IntPropertyValue
)
is not guaranteed to always deliver proper result for the native's "edge" values.
Such filter invoked with Integer.MIN_VALUE
or Integer.MAX_VALUE
can under very rare circumstances
return false when it actually should have returned true. This is a performance consideration and should under normal circumstances
never cause any trouble (the value of a int property for a Node is extremely seldom, if ever, an "edge" value).
An instance of the Sitevision class implementing this interface can be obtained via Utils.getNodeFilterUtil()
.
See Utils
for how to obtain an instance of the Utils
interface.
Modifier and Type | Method and Description |
---|---|
Filter<Node> |
getAfterCalendarPropertyFilter(String aPropertyName,
Calendar aAfterThresholdValue)
Gets a filter that matches by an after value for a specified Calendar property.
|
Filter<Node> |
getAfterNestedCalendarPropertyFilter(String aNodePropertyName,
String aPropertyName,
Calendar aAfterThresholdValue)
Gets a filter that matches by an after value of a nested node's specified Calendar property.
|
Filter<Node> |
getAlwaysAcceptFilter()
Gets a filter that always matches.
|
Filter<Node> |
getAnyOfPrimaryNodeTypesFilter(Collection<String> aPrimaryNodeTypeNames)
Gets a filter that matches all nodes that has a primary node type that is present in given collection.
|
Filter<Node> |
getBeforeCalendarPropertyFilter(String aPropertyName,
Calendar aBeforeThresholdValue)
Gets a filter that matches by a before value for a specified Calendar property.
|
Filter<Node> |
getBeforeNestedCalendarPropertyFilter(String aNodePropertyName,
String aPropertyName,
Calendar aBeforeThresholdValue)
Gets a filter that matches by a before value of a nested node's specified Calendar property.
|
Filter<Node> |
getBooleanPropertyFilter(String aPropertyName,
boolean aMatchValue)
Gets a filter that matches by a specified boolean property.
|
Filter<Node> |
getCalendarPropertyFilter(String aPropertyName,
Calendar aMatchValue)
Gets a filter that matches by a specified Calendar property.
|
CompoundAndFilterBuilder |
getCompoundAndFilterBuilder()
Gets a builder for creating a compound filter that requires that all of the containing filters matches.
|
CompoundOrFilterBuilder |
getCompoundOrFilterBuilder()
Gets a builder for creating a compound filter that requires that any of the containing filters matches.
|
Filter<Node> |
getContainsStringMultiPropertyFilter(String aPropertyName,
String aContainsValue)
Gets a filter that matches by the value-contains of a specified multi-valued string property.
|
Filter<Node> |
getContainsStringPropertyFilter(String aPropertyName,
String aContainsValue)
Gets a filter that matches by the value-contains of a specified string property.
|
Filter<Node> |
getDoublePropertyFilter(String aPropertyName,
double aMatchValue)
Gets a filter that matches by a specified double property.
|
Filter<Node> |
getEndsWithStringPropertyFilter(String aPropertyName,
String aEndsWithValue)
Gets a filter that matches by the value-ends-with of a specified string property.
|
Map<Node,?> |
getFilteredKeyMap(Map<Node,?> aNodeKeyMap,
Filter<Node> aNodeFilter)
Applies a node filter to a Map with Node keys and gets the result.
|
List<Node> |
getFilteredList(List<Node> aNodeList,
Filter<Node> aNodeFilter)
Applies a node filter to a list and gets the result.
|
Map<?,Node> |
getFilteredValueMap(Map<?,Node> aNodeValueMap,
Filter<Node> aNodeFilter)
Applies a node filter to a Map with Node values and gets the result.
|
Filter<Node> |
getHasPropertyFilter(String aPropertyName)
Gets a filter that matches by the existence of a specified property.
|
Filter<Node> |
getIdentifierFilter(String aIdentifier)
Gets a filter that matches by a specified node identifier.
|
Filter<Node> |
getIdentifierPrefixFilter(String aIdentifierPrefix)
Gets a filter that matches by a specified node identifier prefix.
|
Filter<Node> |
getIdentifierSuffixFilter(String aIdentifierSuffix)
Gets a filter that matches by a specified node identifier suffix.
|
Filter<Node> |
getIgnoreCaseStringPropertyFilter(String aPropertyName,
String aCaseInsensitiveValue)
Gets a filter that matches case-insensitive by a specified string property.
|
Filter<Node> |
getIntPropertyFilter(String aPropertyName,
int aMatchValue)
Gets a filter that matches by a specified int property.
|
Filter<Node> |
getInvertedFilter(Filter<Node> aFilter)
Gets a filter that inverts the result of another filter.
|
Filter<Node> |
getMaxDoublePropertyFilter(String aPropertyName,
double aMaxValue)
Gets a filter that matches by the max value of a specified double property.
|
Filter<Node> |
getMaxIntPropertyFilter(String aPropertyName,
int aMaxValue)
Gets a filter that matches by the max value of a specified int property.
|
Filter<Node> |
getMaxNestedIntPropertyFilter(String aNodePropertyName,
String aPropertyName,
int aMaxValue)
Gets a filter that matches by a nested node's max value of a specified int property.
|
Filter<Node> |
getMinDoublePropertyFilter(String aPropertyName,
double aMinValue)
Gets a filter that matches by the min value of a specified double property.
|
Filter<Node> |
getMinIntPropertyFilter(String aPropertyName,
int aMinValue)
Gets a filter that matches by the min value of a specified int property.
|
Filter<Node> |
getMinNestedIntPropertyFilter(String aNodePropertyName,
String aPropertyName,
int aMinValue)
Gets a filter that matches by a nested node's min value of a specified int property.
|
Filter<Node> |
getNestedBooleanPropertyFilter(String aNodePropertyName,
String aPropertyName,
boolean aMatchValue)
Gets a filter that matches by a nested node's specified boolean property.
|
Filter<Node> |
getNestedCalendarPropertyFilter(String aNodePropertyName,
String aPropertyName,
Calendar aMatchValue)
Gets a filter that matches by a nested node's specified Calendar property.
|
Filter<Node> |
getNestedDoublePropertyFilter(String aNodePropertyName,
String aPropertyName,
double aMatchValue)
Gets a filter that matches by a nested node's specified double property.
|
Filter<Node> |
getNestedIntPropertyFilter(String aNodePropertyName,
String aPropertyName,
int aMatchValue)
Gets a filter that matches by a nested node's specified int property.
|
Filter<Node> |
getNeverAcceptFilter()
Gets a filter that never matches.
|
Filter<Node> |
getNoneOfPrimaryNodeTypesFilter(Collection<String> aExcludedPrimaryNodeTypeNames)
Gets a filter that matches all nodes that does not have a primary node type present in given collection.
|
Filter<Node> |
getNonNullFilter()
Gets a filter that matches non-null nodes.
|
Filter<Node> |
getNullFilter()
Gets a filter that matches null nodes.
|
Filter<Node> |
getPatternStringMultiPropertyFilter(String aPropertyName,
String aRegularExpression)
Gets a filter that matches by a regular expression of a specified multi-valued string property.
|
Filter<Node> |
getPatternStringPropertyFilter(String aPropertyName,
String aRegularExpression)
Gets a filter that matches by a regular expression of a specified string property.
|
Filter<Node> |
getPrimaryNodeTypeFilter(String aPrimaryNodeTypeName)
Gets a filter that matches by a specified primary node type.
|
Filter<Node> |
getRangeCalendarPropertyFilter(String aPropertyName,
Calendar aAfterThresholdValue,
Calendar aBeforeThresholdValue)
Gets a filter that matches by the between range of a specified Calendar property.
|
Filter<Node> |
getRangeDoublePropertyFilter(String aPropertyName,
double aMinValue,
double aMaxValue)
Gets a filter that matches by the range of a specified double property.
|
Filter<Node> |
getRangeIntPropertyFilter(String aPropertyName,
int aMinValue,
int aMaxValue)
Gets a filter that matches by the range of a specified int property.
|
Filter<Node> |
getRangeNestedCalendarPropertyFilter(String aNodePropertyName,
String aPropertyName,
Calendar aAfterThresholdValue,
Calendar aBeforeThresholdValue)
Gets a filter that matches by the between range of a nested node's specified Calendar property.
|
Filter<Node> |
getRangeNestedIntPropertyFilter(String aNodePropertyName,
String aPropertyName,
int aMinValue,
int aMaxValue)
Gets a filter that matches by a nested node's range of a specified int property.
|
Filter<Node> |
getSkipFilter(int aSkip)
Gets a filter that skips a given number of nodes.
|
Filter<Node> |
getStartsWithStringPropertyFilter(String aPropertyName,
String aStartsWithValue)
Gets a filter that matches by the value-starts-with of a specified string property.
|
Filter<Node> |
getStringMultiPropertyFilter(String aPropertyName,
String aMatchValue)
Gets a filter that matches by a specified multi-valued string property.
|
Filter<Node> |
getStringPropertyFilter(String aPropertyName,
String aMatchValue)
Gets a filter that matches by a specified string property.
|
FilterSplit<Node> |
split(Collection<Node> aNodeCollection,
Filter<Node> aNodeFilter)
Gets the filtering result of a split operation for a collection of nodes with a node filter as divider.
|
List<Node> getFilteredList(List<Node> aNodeList, Filter<Node> aNodeFilter)
aNodeList
- the list of nodesaNodeFilter
- a node filteraNodeList
that is accepted by aNodeFilter
, never null
.
aNodeList
itself is returned if it's empty or if aNodeFilter
is null
Map<?,Node> getFilteredValueMap(Map<?,Node> aNodeValueMap, Filter<Node> aNodeFilter)
aNodeValueMap
- a map with node valuesaNodeFilter
- a node filteraNodeValueMap
entries with a value that is accepted by aNodeFilter
, never null
.
aNodeValueMap
itself is returned if it's empty or if aNodeFilter
is null
Map<Node,?> getFilteredKeyMap(Map<Node,?> aNodeKeyMap, Filter<Node> aNodeFilter)
aNodeKeyMap
- a map with node keysaNodeFilter
- a node filteraNodeKeyMap
entries with a key that is accepted by aNodeFilter
, never null
.
aNodeKeyMap
itself is returned if it's empty or if aNodeFilter
is null
FilterSplit<Node> split(Collection<Node> aNodeCollection, Filter<Node> aNodeFilter)
This method would typically be used instead of getFilteredList(java.util.List, senselogic.sitevision.api.base.Filter)
when you are also interested in the nodes that does NOT match the filter.
When nodes are available via a NodeIterator
, you would typically use the
NodeIteratorUtil.split(javax.jcr.NodeIterator, senselogic.sitevision.api.base.Filter)
instead!
aNodeCollection
- a node collectionaNodeFilter
- a node filterNodeIteratorUtil.split(javax.jcr.NodeIterator, senselogic.sitevision.api.base.Filter)
CompoundAndFilterBuilder getCompoundAndFilterBuilder()
The CompoundAndFilterBuilder builds a node filter of multiple filters that are combined using the logical AND operator.
CompoundOrFilterBuilder getCompoundOrFilterBuilder()
The CompoundOrFilterBuilder builds a node filter of multiple filters that are combined using the logical OR operator.
getAnyOfPrimaryNodeTypesFilter(Collection)
Filter<Node> getAlwaysAcceptFilter()
Filter<Node> getNeverAcceptFilter()
Filter<Node> getNullFilter()
Filter<Node> getNonNullFilter()
Filter<Node> getSkipFilter(int aSkip) throws IllegalArgumentException
Note! The skip filter is typically used in combination with a Compound AND Filter. Example:
filter = nodeFilterUtil.getSkipFilter(5);
filter = nodeFilterUtil.getCompoundAndFilterBuilder()
.addFilter(nodeFilterUtil.getPrimaryNodeTypeFilter("sv:page"))
.addFilter(nodeFilterUtil.getSkipFilter(5))
.build();
Also note that this filter is stateful, i.e. a created filter instance can't be used more than one time.
aSkip
- the number of nodes to skipIllegalArgumentException
- if aSkip is less than zeroFilter<Node> getInvertedFilter(Filter<Node> aFilter) throws IllegalArgumentException
aFilter
- the filter to invertIllegalArgumentException
- if aFilter
is null
Filter<Node> getIdentifierFilter(String aIdentifier) throws IllegalArgumentException
aIdentifier
- the node identifieraIdentifier
IllegalArgumentException
- if aIdentifier
is null
or whitespace onlyFilter<Node> getIdentifierPrefixFilter(String aIdentifierPrefix) throws IllegalArgumentException
aIdentifierPrefix
- the node identifier prefixaIdentifierPrefix
IllegalArgumentException
- if aIdentifierPrefix
is null
or whitespace onlyFilter<Node> getIdentifierSuffixFilter(String aIdentifierSuffix) throws IllegalArgumentException
aIdentifierSuffix
- the node identifier suffixaIdentifierSuffix
IllegalArgumentException
- if aIdentifierSuffix
is null
or whitespace onlyFilter<Node> getPrimaryNodeTypeFilter(String aPrimaryNodeTypeName) throws IllegalArgumentException
aPrimaryNodeTypeName
- the primary node type nameaPrimaryNodeTypeName
IllegalArgumentException
- if aPrimaryNodeTypeName
is null
or whitespace onlygetAnyOfPrimaryNodeTypesFilter(Collection)
,
getNoneOfPrimaryNodeTypesFilter(Collection)
,
NodeTypeUtil
Filter<Node> getAnyOfPrimaryNodeTypesFilter(Collection<String> aPrimaryNodeTypeNames)
This convenience method is conceptually equivalent - but also more efficient - than building a "match any of" filter via
CompoundOrFilter
with a number of PrimaryNodeTypeFilters
.
aPrimaryNodeTypeNames
- a collection of primary node type names, must not be null.
Null and blank collection items will be silently ignored (such value are not a valid node type name)NullPointerException
- if aPrimaryNodeTypeNames is nullgetNoneOfPrimaryNodeTypesFilter(Collection)
,
NodeTypeUtil
Filter<Node> getNoneOfPrimaryNodeTypesFilter(Collection<String> aExcludedPrimaryNodeTypeNames)
This convenience method is conceptually equivalent - but also more efficient - than building a "match none of" filter via
CompoundOrFilter
with a number of PrimaryNodeTypeFilters
and a InvertedFilter
aExcludedPrimaryNodeTypeNames
- a collection of primary node type names, must not be null.
Null and blank collection items will be silently ignored (such value are not a valid node type name)NullPointerException
- if aExcludedPrimaryNodeTypeNames is nullgetAnyOfPrimaryNodeTypesFilter(Collection)
,
NodeTypeUtil
Filter<Node> getHasPropertyFilter(String aPropertyName) throws IllegalArgumentException
aPropertyName
- the name of the propertyaPropertyName
IllegalArgumentException
- if aPropertyName
is null
or whitespace onlyNode.hasProperty(String)
Filter<Node> getStringPropertyFilter(String aPropertyName, String aMatchValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMatchValue
- the value of the propertyaPropertyName
with value aMatchValue
IllegalArgumentException
- if aPropertyName
or aMatchValue
is null
PropertyUtil.getString(javax.jcr.Node, String)
Filter<Node> getStringMultiPropertyFilter(String aPropertyName, String aMatchValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMatchValue
- the value of the propertyaPropertyName
with value aMatchValue
IllegalArgumentException
- if aPropertyName
or aMatchValue
is null
PropertyUtil.getStrings(javax.jcr.Node, String)
Filter<Node> getIgnoreCaseStringPropertyFilter(String aPropertyName, String aCaseInsensitiveValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaCaseInsensitiveValue
- the case-insensitive value of the propertyaPropertyName
with value
aCaseInsensitiveValue
IllegalArgumentException
- if aPropertyName
or aCaseInsensitiveValue
is null
Filter<Node> getStartsWithStringPropertyFilter(String aPropertyName, String aStartsWithValue) throws IllegalArgumentException
The starts-with check is performed using the String.startsWith(String)
method.
aPropertyName
- the name of the propertyaStartsWithValue
- the value the property should start withaPropertyName
that starts with value
aStartsWithValue
IllegalArgumentException
- if aPropertyName
or aStartsWithValue
is null
Filter<Node> getEndsWithStringPropertyFilter(String aPropertyName, String aEndsWithValue) throws IllegalArgumentException
The ends-with check is performed using the String.endsWith(String)
method.
aPropertyName
- the name of the propertyaEndsWithValue
- the value the property should end withaPropertyName
that ends with value
aEndsWithValue
IllegalArgumentException
- if aPropertyName
or aEndsWithValue
is null
Filter<Node> getContainsStringPropertyFilter(String aPropertyName, String aContainsValue) throws IllegalArgumentException
The contains check is performed using the String.contains(String)
method.
aPropertyName
- the name of the propertyaContainsValue
- the value the property should containaPropertyName
that contains value
aContainsValue
IllegalArgumentException
- if aPropertyName
or aContainsValue
is null
Filter<Node> getContainsStringMultiPropertyFilter(String aPropertyName, String aContainsValue) throws IllegalArgumentException
The contains check is performed using the String.contains(String)
method for each extracted property value.
aPropertyName
- the name of the propertyaContainsValue
- the value the property should containaPropertyName
that contains value
aContainsValue
IllegalArgumentException
- if aPropertyName
or aContainsValue
is null
Filter<Node> getPatternStringPropertyFilter(String aPropertyName, String aRegularExpression) throws IllegalArgumentException, PatternSyntaxException
The regular expression is compiled to a Pattern
and the check is performed using the
matches()
method of the Matcher
extracted from the compiled pattern via
Pattern.matcher(String)
.
aPropertyName
- the name of the propertyaRegularExpression
- the regular expressionaPropertyName
that matches aRegularExpression
IllegalArgumentException
- if aPropertyName
or aRegularExpression
is null
PatternSyntaxException
- if the compilation of aRegularExpression
failsFilter<Node> getPatternStringMultiPropertyFilter(String aPropertyName, String aRegularExpression) throws IllegalArgumentException, PatternSyntaxException
The regular expression is compiled to a Pattern
and the check for each extracted property value is performed using the
matches()
method of the Matcher
extracted from the compiled pattern via
Pattern.matcher(String)
.
aPropertyName
- the name of the propertyaRegularExpression
- the regular expressionaPropertyName
that matches aRegularExpression
IllegalArgumentException
- if aPropertyName
or aRegularExpression
is null
PatternSyntaxException
- if the compilation of aRegularExpression
failsFilter<Node> getBooleanPropertyFilter(String aPropertyName, boolean aMatchValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMatchValue
- the value of the propertyaPropertyName
with value aMatchValue
IllegalArgumentException
- if aPropertyName
is null
or whitespace onlyPropertyUtil.getBoolean(javax.jcr.Node, String)
Filter<Node> getNestedBooleanPropertyFilter(String aNodePropertyName, String aPropertyName, boolean aMatchValue) throws IllegalArgumentException
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aMatchValue
- the value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value aMatchValue
IllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace onlyPropertyUtil.getNestedBoolean(javax.jcr.Node, String, String)
Filter<Node> getIntPropertyFilter(String aPropertyName, int aMatchValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMatchValue
- the value of the propertyaPropertyName
with value aMatchValue
IllegalArgumentException
- if aPropertyName
is null
or whitespace onlyPropertyUtil.getInt(javax.jcr.Node, String)
Filter<Node> getMinIntPropertyFilter(String aPropertyName, int aMinValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMinValue
- the min value of the propertyaPropertyName
with value aMinValue
or higherIllegalArgumentException
- if aPropertyName
is null
or whitespace onlyFilter<Node> getMaxIntPropertyFilter(String aPropertyName, int aMaxValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMaxValue
- the max value of the propertyaPropertyName
with value aMaxValue
or lowerIllegalArgumentException
- if aPropertyName
is null
or whitespace onlyFilter<Node> getRangeIntPropertyFilter(String aPropertyName, int aMinValue, int aMaxValue) throws IllegalArgumentException
This is a convenience method that combines the min int filter (getMinIntPropertyFilter(String, int)
)
and the max int filter (getMinIntPropertyFilter(String, int)
) to check a range for an integer.
aPropertyName
- the name of the propertyaMinValue
- the min value of the propertyaMaxValue
- the max value of the propertyaPropertyName
with value within
inclusive range [aMinValue..aMaxValue]
IllegalArgumentException
- if aPropertyName
is null
or whitespace only,
or if aMinValue
is greater than aMaxValue
Filter<Node> getNestedIntPropertyFilter(String aNodePropertyName, String aPropertyName, int aMatchValue) throws IllegalArgumentException
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aMatchValue
- the value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value aMatchValue
IllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace onlyPropertyUtil.getNestedInt(javax.jcr.Node, String, String)
Filter<Node> getMinNestedIntPropertyFilter(String aNodePropertyName, String aPropertyName, int aMinValue) throws IllegalArgumentException
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aMinValue
- the min value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value aMatchValue
or higherIllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace onlyPropertyUtil.getNestedInt(javax.jcr.Node, String, String)
Filter<Node> getMaxNestedIntPropertyFilter(String aNodePropertyName, String aPropertyName, int aMaxValue) throws IllegalArgumentException
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aMaxValue
- the max value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value aMatchValue
or lowerIllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace onlyPropertyUtil.getNestedInt(javax.jcr.Node, String, String)
Filter<Node> getRangeNestedIntPropertyFilter(String aNodePropertyName, String aPropertyName, int aMinValue, int aMaxValue) throws IllegalArgumentException
This is a convenience method that combines the nested min int filter (getMinNestedIntPropertyFilter(String, String, int)
)
and the nested max int filter (getMaxNestedIntPropertyFilter(String, String, int)
) to check a range for an integer.
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aMinValue
- the min value of the propertyaMaxValue
- the max value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value within inclusive range [aMinValue..aMaxValue]
IllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace only,
or if aMinValue
is greater than aMaxValue
Filter<Node> getDoublePropertyFilter(String aPropertyName, double aMatchValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMatchValue
- the value of the propertyaPropertyName
with value aMatchValue
IllegalArgumentException
- if aPropertyName
is null
or whitespace onlyPropertyUtil.getDouble(javax.jcr.Node, String)
Filter<Node> getNestedDoublePropertyFilter(String aNodePropertyName, String aPropertyName, double aMatchValue) throws IllegalArgumentException
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aMatchValue
- the value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value aMatchValue
IllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace onlyPropertyUtil.getNestedDouble(javax.jcr.Node, String, String)
Filter<Node> getMinDoublePropertyFilter(String aPropertyName, double aMinValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMinValue
- the min value of the propertyaPropertyName
with value aMinValue
or higherIllegalArgumentException
- if aPropertyName
is null
or whitespace onlyFilter<Node> getMaxDoublePropertyFilter(String aPropertyName, double aMaxValue) throws IllegalArgumentException
aPropertyName
- the name of the propertyaMaxValue
- the max value of the propertyaPropertyName
with value aMaxValue
or lowerIllegalArgumentException
- if aPropertyName
is null
or whitespace onlyFilter<Node> getRangeDoublePropertyFilter(String aPropertyName, double aMinValue, double aMaxValue) throws IllegalArgumentException
This is a convenience method that combines the min double filter (getMinDoublePropertyFilter(String, double)
)
and the max double filter (getMaxDoublePropertyFilter(String, double)
) to check a range for a double.
aPropertyName
- the name of the propertyaMinValue
- the min value of the propertyaMaxValue
- the max value of the propertyaPropertyName
with value within
inclusive range [aMinValue..aMaxValue]
IllegalArgumentException
- if aPropertyName
is null
or whitespace only,
or if aMinValue
is greater than aMaxValue
Filter<Node> getCalendarPropertyFilter(String aPropertyName, Calendar aMatchValue)
aPropertyName
- the name of the propertyaMatchValue
- the value of the propertyaPropertyName
with value aMatchValue
IllegalArgumentException
- if aPropertyName
is null
or whitespace only, or aMatchValue
is
null
PropertyUtil.getCalendar(javax.jcr.Node, String)
Filter<Node> getNestedCalendarPropertyFilter(String aNodePropertyName, String aPropertyName, Calendar aMatchValue)
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aMatchValue
- the value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value aMatchValue
IllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace only,
or if aMatchValue
is null
PropertyUtil.getNestedCalendar(javax.jcr.Node, String, String)
Filter<Node> getBeforeCalendarPropertyFilter(String aPropertyName, Calendar aBeforeThresholdValue)
aPropertyName
- the name of the propertyaBeforeThresholdValue
- the before threshold value of the propertyaPropertyName
with value before
aBeforeThresholdValue
IllegalArgumentException
- if aPropertyName
is null
or whitespace only, or aBeforeThresholdValue
is null
Filter<Node> getBeforeNestedCalendarPropertyFilter(String aNodePropertyName, String aPropertyName, Calendar aBeforeThresholdValue)
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aBeforeThresholdValue
- the before threshold value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value before aBeforeThresholdValue
IllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace only,
or if aBeforeThresholdValue
is null
Filter<Node> getAfterCalendarPropertyFilter(String aPropertyName, Calendar aAfterThresholdValue)
aPropertyName
- the name of the propertyaAfterThresholdValue
- the after threshold value of the propertyaPropertyName
with value after
aAfterThresholdValue
IllegalArgumentException
- if aPropertyName
is null
or whitespace only, or aAfterThresholdValue
is null
Filter<Node> getAfterNestedCalendarPropertyFilter(String aNodePropertyName, String aPropertyName, Calendar aAfterThresholdValue)
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the property for the "inner/nested" Node specified by aNodePropertyName
aAfterThresholdValue
- the after threshold value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value after aAfterThresholdValue
IllegalArgumentException
- if aNodePropertyName
or aPropertyName
is null
or whitespace only,
or if aAfterThresholdValue
is null
Filter<Node> getRangeCalendarPropertyFilter(String aPropertyName, Calendar aAfterThresholdValue, Calendar aBeforeThresholdValue)
This is a convenience method that combines the after calendar filter
(getAfterCalendarPropertyFilter(String, java.util.Calendar)
)
and the before calendar filter (getBeforeCalendarPropertyFilter(String, java.util.Calendar)
) to check a range for a Calendar.
aPropertyName
- the name of the propertyaAfterThresholdValue
- the after threshold value of the propertyaBeforeThresholdValue
- the before threshold value of the propertyaPropertyName
with value between
exclusive range [aAfterThresholdValue..aBeforeThresholdValue]
IllegalArgumentException
- IllegalArgumentException if aPropertyName
is null
or whitespace only,
or if aAfterThresholdValue
or aBeforeThresholdValue
is null
,
or if aAfterThresholdValue
is after aBeforeThresholdValue
Filter<Node> getRangeNestedCalendarPropertyFilter(String aNodePropertyName, String aPropertyName, Calendar aAfterThresholdValue, Calendar aBeforeThresholdValue)
This is a convenience method that combines the nested after calendar filter
(getAfterNestedCalendarPropertyFilter(String, String, java.util.Calendar)
) and the nested before calendar filter
(getBeforeNestedCalendarPropertyFilter(String, String, java.util.Calendar)
) to check a range for a Calendar.
aNodePropertyName
- the name of the property for the NodeaPropertyName
- the name of the propertyaAfterThresholdValue
- the after threshold value of the propertyaBeforeThresholdValue
- the before threshold value of the propertyaNodePropertyName
that can be resolved as a node,
which in turn has a property named aNodePropertyName
with value between
exclusive range [aAfterThresholdValue..aBeforeThresholdValue]
IllegalArgumentException
- IllegalArgumentException if aNodePropertyName
or aPropertyName
is null
or whitespace only,
or if aAfterThresholdValue
or aBeforeThresholdValue
is null
,
or if aAfterThresholdValue
is after aBeforeThresholdValue
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-2025 Sitevision AB, all rights reserved.