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, validatorsauthCheck, 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, evaluateExpressionsAndExecuteDeploymentIdMappingsList, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeDeploymentIdMappingsList, executeIdsList, executeResult, executeSingleResult, extend, getExpressions, getMethod, list, listDeploymentIdMappings, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validategetAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheckclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasc, count, desc, list, listPage, singleResult, unlimitedListprotected 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)
AuthorizationQueryauthorizationId in interface AuthorizationQuerypublic AuthorizationQuery userIdIn(String... userIdIn)
AuthorizationQueryuserIdIn in interface AuthorizationQuerypublic AuthorizationQuery groupIdIn(String... groupIdIn)
AuthorizationQuerygroupIdIn in interface AuthorizationQuerypublic AuthorizationQuery resourceType(Resource resource)
AuthorizationQueryresourceType in interface AuthorizationQuerypublic AuthorizationQuery resourceType(int resourceType)
AuthorizationQueryresourceType in interface AuthorizationQuerypublic AuthorizationQuery resourceId(String resourceId)
AuthorizationQueryresourceId in interface AuthorizationQuerypublic 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 AuthorizationQuerypublic AuthorizationQuery authorizationType(Integer type)
AuthorizationQueryAuthorization.AUTH_TYPE_GLOBAL, Authorization.AUTH_TYPE_GRANT
Authorization.AUTH_TYPE_REVOKEauthorizationType in interface AuthorizationQuerypublic long executeCount(CommandContext commandContext)
executeCount in class AbstractQuery<AuthorizationQuery,Authorization>public List<Authorization> executeList(CommandContext commandContext, Page page)
AbstractQueryexecuteList in class AbstractQuery<AuthorizationQuery,Authorization>page - used if the results must be paged. If null, no paging will be applied.protected boolean hasExcludingConditions()
AbstractQueryhasExcludingConditions 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()
AuthorizationQueryQuery.asc() or Query.desc()).orderByResourceType in interface AuthorizationQuerypublic AuthorizationQuery orderByResourceId()
AuthorizationQueryQuery.asc() or Query.desc()).orderByResourceId in interface AuthorizationQueryCopyright © 2021. All rights reserved.