public interface AuthnrQdslUtil
| Modifier and Type | Method and Description |
|---|---|
com.mysema.query.types.expr.BooleanExpression |
authorizationPredicate(com.mysema.query.types.Expression<Long> targetResourceId,
String... actions)
Creates a predicate for a Querydsl based SQL query.
|
com.mysema.query.types.expr.BooleanExpression authorizationPredicate(com.mysema.query.types.Expression<Long> targetResourceId, String... actions)
QBook book = QBook.book;
BooleanExpression authrPredicate =
authnrQdslUtil.authorizationPredicate(book.resourceId, "read", "edit");
SQLQuery query = new SQLQuery(connection, configuration);
return query.from(book)...where(authrPredicate)...list(...);
targetResourceId - Expression that provides the resource that the permission is defined on. Thisactions - If the authorized resource has permission to do any of the actions on the target resource record
(directly or by inheritance), the result will provide true.NullPointerException - if the targetResourceId parameter is null, the actions parameter is null or the actions array
contains null value.IllegalArgumentException - if the actions parameter is a zero length array.Copyright © 2011–2015 Everit Kft.. All rights reserved.