public class XPathQueryBuilder extends Object implements QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
QueryBuilder.Direction
Constructor and Description |
---|
XPathQueryBuilder() |
Modifier and Type | Method and Description |
---|---|
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
and(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition1,
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition2)
Return a condition which holds if both sub conditions hold.
|
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
contains(String relPath,
String searchExpr)
Create a full text search condition.
|
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
eq(String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is equal to value . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
exists(String relPath)
Create a condition which holds if the node of an
Authorizable has a
property at relPath . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
ge(String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is greater than or equal to value . |
String |
getGroupName() |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
gt(String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is greater than value . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
impersonates(String name)
Create a condition which holds for
Authorizable s which can impersonate as
name . |
boolean |
isDeclaredMembersOnly() |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
le(String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is smaller than or equal to value . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
like(String relPath,
String pattern)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which matches the pattern in pattern . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
lt(String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is smaller than value . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
nameMatches(String pattern)
Create a condition which holds if the name of the
Authorizable
matches a pattern . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
neq(String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is not equal to value . |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
not(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition)
Return a condition which holds if
condition does not hold. |
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
or(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition1,
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition2)
Return a condition which holds if any of the two sub conditions hold.
|
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition |
property(String relPath,
org.apache.jackrabbit.core.security.user.XPathQueryBuilder.RelationOp op,
Value value) |
void |
setCondition(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition)
Set the condition for the query.
|
void |
setLimit(long offset,
long maxCount)
Set limits for the query.
|
void |
setLimit(Value bound,
long maxCount)
Set limits for the query.
|
void |
setScope(String groupName,
boolean declaredOnly)
Set the scope for the query.
|
void |
setSelector(Class<? extends Authorizable> selector)
Set the selector for the query.
|
void |
setSortOrder(String propertyName,
QueryBuilder.Direction direction)
Set the sort order of the
Authorizable s returned by the query. |
void |
setSortOrder(String propertyName,
QueryBuilder.Direction direction,
boolean ignoreCase)
Set the sort order of the
Authorizable s returned by the query. |
public String getGroupName()
public boolean isDeclaredMembersOnly()
public void setSelector(Class<? extends Authorizable> selector)
QueryBuilder
Authorizable
s or just User
s respectively Group
s.setSelector
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
selector
- The selector for the querypublic void setScope(String groupName, boolean declaredOnly)
QueryBuilder
setScope
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
groupName
- Name of the group to restrict the query to.declaredOnly
- If true
only declared members of the groups are returned.
Otherwise indirect memberships are also considered.public void setCondition(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition)
QueryBuilder
Authorizable
s
for which this condition holds.setCondition
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
condition
- Condition upon which Authorizables
are included in the query resultpublic void setSortOrder(String propertyName, QueryBuilder.Direction direction, boolean ignoreCase)
QueryBuilder
Authorizable
s returned by the query.
The format of the propertyName
is the same as in XPath:
@propertyName
sorts on a property of the current node.
relative/path/@propertyName
sorts on a property of a
descendant node.setSortOrder
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
propertyName
- The name of the property to sort ondirection
- Direction to sort. Either QueryBuilder.Direction.ASCENDING
or QueryBuilder.Direction.DESCENDING
ignoreCase
- Ignore character case in sort if true
. Note: For false
sorting is done lexicographically even for non string properties.public void setSortOrder(String propertyName, QueryBuilder.Direction direction)
QueryBuilder
Authorizable
s returned by the query.
The format of the propertyName
is the same as in XPath:
@propertyName
sorts on a property of the current node.
relative/path/@propertyName
sorts on a property of a
descendant node. Character case is taken into account for the sort order.setSortOrder
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
propertyName
- The name of the property to sort ondirection
- Direction to sort. Either QueryBuilder.Direction.ASCENDING
or QueryBuilder.Direction.DESCENDING
public void setLimit(Value bound, long maxCount)
QueryBuilder
sort order
property. The
query returns at most maxCount
Authorizable
s whose
values of the sort order property follow bound
in the sort
direction. This method has no effect if the sort order is not specified.setLimit
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
bound
- Bound from where to start returning results. null
for no boundmaxCount
- Maximal number of results to return. -1 for no limit.public void setLimit(long offset, long maxCount)
QueryBuilder
offset
refers to the offset within the full
result set at which the returned result set should start expressed in terms
of the number of Authorizable
s to skip. maxCount
sets the
maximum size of the result set expressed in terms of the number of authorizables
to return.setLimit
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
offset
- Offset from where to start returning results. 0
for no offset.maxCount
- Maximal number of results to return. -1 for no limit.public org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition property(String relPath, org.apache.jackrabbit.core.security.user.XPathQueryBuilder.RelationOp op, Value value)
public org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition nameMatches(String pattern)
QueryBuilder
Authorizable
matches a pattern
.
The percent character "%" represents any string of zero or more characters and the
underscore character "_" represents any single character. Any literal use of these characters
and the backslash character "\" must be escaped with a backslash character.
The pattern is matched against the id
and the
principal
.nameMatches
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
pattern
- Pattern to match the name of an authorizable.public org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition neq(String relPath, Value value)
QueryBuilder
Authorizable
has a
property at relPath
which is not equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.neq
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
topublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition eq(String relPath, Value value)
QueryBuilder
Authorizable
has a
property at relPath
which is equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.eq
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
topublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition lt(String relPath, Value value)
QueryBuilder
Authorizable
has a
property at relPath
which is smaller than value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.lt
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
topublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition le(String relPath, Value value)
QueryBuilder
Authorizable
has a
property at relPath
which is smaller than or equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.le
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
topublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition gt(String relPath, Value value)
QueryBuilder
Authorizable
has a
property at relPath
which is greater than value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.gt
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
topublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition ge(String relPath, Value value)
QueryBuilder
Authorizable
has a
property at relPath
which is greater than or equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.ge
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
topublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition exists(String relPath)
QueryBuilder
Authorizable
has a
property at relPath
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.exists
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertypublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition like(String relPath, String pattern)
QueryBuilder
Authorizable
has a
property at relPath
which matches the pattern in pattern
.
The percent character "%" represents any string of zero or more characters and the
underscore character "_" represents any single character. Any literal use of these characters
and the backslash character "\" must be escaped with a backslash character.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.like
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertypattern
- Pattern to match the property at relPath
againstpublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition contains(String relPath, String searchExpr)
QueryBuilder
Authorizable
has a property at relPath
for which
searchExpr
yields results.
The format of the relPath
argument is the same as in XPath:
.
searches all properties of the current node, @attributeName
searches the attributeName property of the current node, relative/path/.
searches all properties of the descendant node at relative/path and
relative/path/@attributeName
searches the attributeName property
of the descendant node at relative/path.
The syntax of searchExpr
is [-]value { [OR] [-]value }.
contains
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
relPath
- Relative path from the authorizable's node to the propertysearchExpr
- A full text search expressionpublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition impersonates(String name)
QueryBuilder
Authorizable
s which can impersonate as
name
.impersonates
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
name
- Name of an authorizablepublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition not(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition)
QueryBuilder
condition
does not hold.not
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
condition
- Condition to negatepublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition and(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition1, org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition2)
QueryBuilder
and
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
condition1
- first sub conditioncondition2
- second sub conditionpublic org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition or(org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition1, org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition condition2)
QueryBuilder
or
in interface QueryBuilder<org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition>
condition1
- first sub conditioncondition2
- second sub conditionCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.