Package com.day.cq.security.util
Class AuthorizableQueryManager
- java.lang.Object
-
- com.day.cq.security.util.AuthorizableQueryManager
-
public class AuthorizableQueryManager extends java.lang.Object
Deprecated.cq 5.5 UseAuthorizableQueryManager
instead.This class handles the translation of queries for users and groups from a JSON format to the query model of Jackrabbit's user groups search (seeUserManager#findAuthorizables(Query)
). The JSON query format is defined as follows:{ ( selector: "authorizable" | "user" | "group" )? // Defaults to "authorizable", see QueryBuilder#setSelector() ( scope: // See QueryBuilder#setScope() { groupName: /* group name (String) * / ( declaredOnly: true | false ) // Defaults to true } ) ? // Defaults to all ( condition: [ CONJUNCTION+ ] ) ? // Defaults to a 'true' condition, see QueryBuilder#setCondition() ( order | sort: // See QueryBuilder#setOrder() { property: /* relative path (String) * / ( direction: "asc" | "desc" ) // Defaults to "asc" } ) ? // Defaults to document order ( limit: // See QueryBuilder#setLimit() { offset: /* Positive Integer * / // Takes precedence over bound if both are given bound: /* String, Number, Boolean * / max: /* Positive Integer or -1 * / // Defaults to no limit (-1) } ) ? // Defaults to all } CONJUNCTION ::= COMPOUND | PRIMITIVE COMPOUND ::= [ PRIMITIVE+ ] PRIMITIVE ::= { ATOM | NEGATION } NEGATION ::= not: { ATOM } // See QueryBuilder#not() ATOM ::= named: /* pattern * / // Users, groups of that name. See QueryBuilder#nameMatches() | exists: /* relative path * / // See QueryBuilder#exists() | impersonates: /* authorizable name * / // See QueryBuilder#impersonates() | RELOP: { property: /* relative path * / value: /* String, Number, Boolean * / // According to the type of the property } | like: // See QueryBuilder#like() { property: /* relative path * / pattern: /* pattern * / } | contains: // See QueryBuilder#contains() { property: /* relative path * / expression: /* search expression * / } RELOP ::= neq | eq | lt | le | gt | ge // See QueryBuilder#neq(), QueryBuilder#eq(), ...
- A relative path refers to a property or a child node of an user or a group. Property names need to be prefixed with the at (@) character. Invalid JCR characters need proper escaping. The current path is denoted by a dot (.).
- In 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 Authorizable#getID() and Authorizable#getPrincipal().
- The syntax of 'expression' is [-]value { [OR] [-]value }.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_RESULT_COUNT
Deprecated.
-
Constructor Summary
Constructors Constructor Description AuthorizableQueryManager(UserManager userManager, ValueFactory valueFactory)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Iterator<Authorizable>
execute(java.lang.String query)
Deprecated.
-
-
-
Field Detail
-
MAX_RESULT_COUNT
public static final int MAX_RESULT_COUNT
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthorizableQueryManager
public AuthorizableQueryManager(UserManager userManager, ValueFactory valueFactory)
Deprecated.
-
-
Method Detail
-
execute
public java.util.Iterator<Authorizable> execute(java.lang.String query) throws RepositoryException, java.io.IOException
Deprecated.- Throws:
RepositoryException
java.io.IOException
-
-