use of com.enonic.xp.security.UserQuery in project xp by enonic.
the class FindUsersHandler method execute.
public PrincipalsResultMapper execute() {
final ConstraintExpr constraintExpr = QueryParser.parseCostraintExpression(this.query == null ? "" : this.query);
final List<OrderExpr> orderExpressions = QueryParser.parseOrderExpressions(this.sort == null ? "" : this.sort);
final QueryExpr queryExpr = QueryExpr.from(constraintExpr, orderExpressions);
final UserQuery userQuery = UserQuery.create().from(this.start).size(this.count).queryExpr(queryExpr).build();
final UserQueryResult result = this.securityService.get().query(userQuery);
return new PrincipalsResultMapper(result.getUsers(), result.getTotalSize(), this.includeProfile);
}
Aggregations