public class AuthorizationQueryImpl extends AbstractQuery<AuthorizationQuery,Authorization> implements AuthorizationQuery
AbstractQuery.ResultType
Modifier and Type | Field and Description |
---|---|
protected Integer |
authorizationType |
protected String[] |
groupIds |
protected String |
id |
protected int |
permission |
protected boolean |
queryByPermission |
protected boolean |
queryByResourceType |
protected String |
resourceId |
protected int |
resourceType |
protected String[] |
userIds |
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
Constructor and Description |
---|
AuthorizationQueryImpl() |
AuthorizationQueryImpl(CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
AuthorizationQuery |
authorizationId(String id)
only selects authorizations for the given id
|
AuthorizationQuery |
authorizationType(Integer type)
only selects authorizations for the given type.
|
long |
executeCount(CommandContext commandContext) |
List<Authorization> |
executeList(CommandContext commandContext,
Page page)
Executes the actual query to retrieve the list of results.
|
String[] |
getGroupIds() |
String |
getId() |
int |
getPermission() |
String |
getResourceId() |
Set<Resource> |
getResourcesIntersection() |
int |
getResourceType() |
String[] |
getUserIds() |
AuthorizationQuery |
groupIdIn(String... groupIdIn)
only selects authorizations for the given group ids
|
protected boolean |
hasExcludingConditions()
Whether or not the query has excluding conditions.
|
AuthorizationQuery |
hasPermission(Permission p)
only selects authorizations which grant the permissions represented by the parameter.
|
boolean |
isQueryByPermission() |
boolean |
isQueryByResourceType() |
AuthorizationQuery |
orderByResourceId()
Order by resource id (needs to be followed by
Query.asc() or Query.desc() ). |
AuthorizationQuery |
orderByResourceType()
Order by resource type (needs to be followed by
Query.asc() or Query.desc() ). |
AuthorizationQuery |
resourceId(String resourceId)
only selects authorizations for the given resource id
|
AuthorizationQuery |
resourceType(int resourceType)
only selects authorizations for the given resource type
|
AuthorizationQuery |
resourceType(Resource resource)
only selects authorizations for the given resource type
|
AuthorizationQuery |
userIdIn(String... userIdIn)
only selects authorizations for the given user ids
|
addExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeIdsList, executeResult, executeSingleResult, extend, getExpressions, getMethod, list, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validate
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asc, count, desc, list, listPage, singleResult, unlimitedList
protected String id
protected String[] userIds
protected String[] groupIds
protected int resourceType
protected String resourceId
protected int permission
protected Integer authorizationType
protected boolean queryByPermission
protected boolean queryByResourceType
public AuthorizationQueryImpl()
public AuthorizationQueryImpl(CommandExecutor commandExecutor)
public AuthorizationQuery authorizationId(String id)
AuthorizationQuery
authorizationId
in interface AuthorizationQuery
public AuthorizationQuery userIdIn(String... userIdIn)
AuthorizationQuery
userIdIn
in interface AuthorizationQuery
public AuthorizationQuery groupIdIn(String... groupIdIn)
AuthorizationQuery
groupIdIn
in interface AuthorizationQuery
public AuthorizationQuery resourceType(Resource resource)
AuthorizationQuery
resourceType
in interface AuthorizationQuery
public AuthorizationQuery resourceType(int resourceType)
AuthorizationQuery
resourceType
in interface AuthorizationQuery
public AuthorizationQuery resourceId(String resourceId)
AuthorizationQuery
resourceId
in interface AuthorizationQuery
public AuthorizationQuery hasPermission(Permission p)
AuthorizationQuery
authorizationQuery.userId("user1") .resourceType("processDefinition") .resourceId("2313") .hasPermission(Permissions.READ) .hasPermission(Permissions.UPDATE) .hasPermission(Permissions.DELETE) .list();Selects all Authorization objects which provide READ,UPDATE,DELETE Permissions for the given user.
hasPermission
in interface AuthorizationQuery
public AuthorizationQuery authorizationType(Integer type)
AuthorizationQuery
Authorization.AUTH_TYPE_GLOBAL
, Authorization.AUTH_TYPE_GRANT
Authorization.AUTH_TYPE_REVOKE
authorizationType
in interface AuthorizationQuery
public long executeCount(CommandContext commandContext)
executeCount
in class AbstractQuery<AuthorizationQuery,Authorization>
public List<Authorization> executeList(CommandContext commandContext, Page page)
AbstractQuery
executeList
in class AbstractQuery<AuthorizationQuery,Authorization>
page
- used if the results must be paged. If null, no paging will be applied.protected boolean hasExcludingConditions()
AbstractQuery
hasExcludingConditions
in class AbstractQuery<AuthorizationQuery,Authorization>
true
if the query does have excluding conditions, false
otherwisepublic String getId()
public boolean isQueryByPermission()
public String[] getUserIds()
public String[] getGroupIds()
public int getResourceType()
public String getResourceId()
public int getPermission()
public boolean isQueryByResourceType()
public AuthorizationQuery orderByResourceType()
AuthorizationQuery
Query.asc()
or Query.desc()
).orderByResourceType
in interface AuthorizationQuery
public AuthorizationQuery orderByResourceId()
AuthorizationQuery
Query.asc()
or Query.desc()
).orderByResourceId
in interface AuthorizationQuery
Copyright © 2019. All rights reserved.