Class QueryUtil
- java.lang.Object
-
- org.apache.jackrabbit.oak.security.user.query.QueryUtil
-
public final class QueryUtil extends Object
Common utilities used for user/group queries.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull String
escapeForQuery(@NotNull String value)
static @NotNull String
escapeForQuery(@NotNull String oakName, @NotNull NamePathMapper namePathMapper)
static @NotNull String
escapeNodeName(@NotNull String string)
Escapestring
for matching in jcr escaped node namesstatic @NotNull String
format(@NotNull Value value)
static @NotNull org.apache.jackrabbit.oak.security.user.query.RelationOp
getCollation(QueryBuilder.Direction direction)
static @Nullable String
getID(@Nullable Authorizable authorizable)
static @NotNull String
getNodeTypeName(@NotNull AuthorizableType type)
Retrieve the node type name for the specified authorizable type.static @NotNull String
getSearchRoot(AuthorizableType type, ConfigurationParameters config)
Determine the search root for the given authorizable type based on the configured root path.
-
-
-
Method Detail
-
getSearchRoot
@NotNull public static @NotNull String getSearchRoot(AuthorizableType type, ConfigurationParameters config)
Determine the search root for the given authorizable type based on the configured root path.- Parameters:
type
- The authorizable type.config
- The configuration parameters.- Returns:
- The path of search root for the specified authorizable type.
-
getNodeTypeName
@NotNull public static @NotNull String getNodeTypeName(@NotNull @NotNull AuthorizableType type)
Retrieve the node type name for the specified authorizable type.- Parameters:
type
- The authorizable type.- Returns:
- The corresponding node type name.
-
escapeNodeName
@NotNull public static @NotNull String escapeNodeName(@NotNull @NotNull String string)
Escapestring
for matching in jcr escaped node names- Parameters:
string
- string to escape- Returns:
- escaped string
-
format
@NotNull public static @NotNull String format(@NotNull @NotNull Value value) throws RepositoryException
- Throws:
RepositoryException
-
escapeForQuery
@NotNull public static @NotNull String escapeForQuery(@NotNull @NotNull String oakName, @NotNull @NotNull NamePathMapper namePathMapper)
-
escapeForQuery
@NotNull public static @NotNull String escapeForQuery(@NotNull @NotNull String value)
-
getCollation
@NotNull public static @NotNull org.apache.jackrabbit.oak.security.user.query.RelationOp getCollation(@NotNull QueryBuilder.Direction direction)
-
getID
@Nullable public static @Nullable String getID(@Nullable @Nullable Authorizable authorizable)
-
-