Package org.camunda.bpm.engine.impl
Class AuthorizationQueryImpl
java.lang.Object
org.camunda.bpm.engine.impl.db.ListQueryParameterObject
org.camunda.bpm.engine.impl.AbstractQuery<AuthorizationQuery,Authorization>
org.camunda.bpm.engine.impl.AuthorizationQueryImpl
- All Implemented Interfaces:
Serializable,AuthorizationQuery,Command<Object>,Query<AuthorizationQuery,Authorization>
public class AuthorizationQueryImpl
extends AbstractQuery<AuthorizationQuery,Authorization>
implements AuthorizationQuery
- Author:
- Daniel Meyer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Integerprotected String[]protected Stringprotected intprotected booleanprotected booleanprotected Stringprotected intprotected String[]Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validatorsFields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononly selects authorizations for the given idauthorizationType(Integer type) only selects authorizations for the given type.longexecuteCount(CommandContext commandContext) executeList(CommandContext commandContext, Page page) Executes the actual query to retrieve the list of results.String[]getId()intintString[]only selects authorizations for the given group idsprotected booleanWhether or not the query has excluding conditions.only selects authorizations which grant the permissions represented by the parameter.booleanbooleanOrder by resource id (needs to be followed byQuery.asc()orQuery.desc()).Order by resource type (needs to be followed byQuery.asc()orQuery.desc()).resourceId(String resourceId) only selects authorizations for the given resource idresourceType(int resourceType) only selects authorizations for the given resource typeresourceType(Resource resource) only selects authorizations for the given resource typeonly selects authorizations for the given user idsMethods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
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, validateMethods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheckMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
Field Details
-
id
-
userIds
-
groupIds
-
resourceType
protected int resourceType -
resourceId
-
permission
protected int permission -
authorizationType
-
queryByPermission
protected boolean queryByPermission -
queryByResourceType
protected boolean queryByResourceType
-
-
Constructor Details
-
AuthorizationQueryImpl
public AuthorizationQueryImpl() -
AuthorizationQueryImpl
-
-
Method Details
-
authorizationId
Description copied from interface:AuthorizationQueryonly selects authorizations for the given id- Specified by:
authorizationIdin interfaceAuthorizationQuery
-
userIdIn
Description copied from interface:AuthorizationQueryonly selects authorizations for the given user ids- Specified by:
userIdInin interfaceAuthorizationQuery
-
groupIdIn
Description copied from interface:AuthorizationQueryonly selects authorizations for the given group ids- Specified by:
groupIdInin interfaceAuthorizationQuery
-
resourceType
Description copied from interface:AuthorizationQueryonly selects authorizations for the given resource type- Specified by:
resourceTypein interfaceAuthorizationQuery
-
resourceType
Description copied from interface:AuthorizationQueryonly selects authorizations for the given resource type- Specified by:
resourceTypein interfaceAuthorizationQuery
-
resourceId
Description copied from interface:AuthorizationQueryonly selects authorizations for the given resource id- Specified by:
resourceIdin interfaceAuthorizationQuery
-
hasPermission
Description copied from interface:AuthorizationQueryonly selects authorizations which grant the permissions represented by the parameter. If this method is called multiple times, all passed-in permissions will be checked with AND semantics. Example: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.- Specified by:
hasPermissionin interfaceAuthorizationQuery
-
authorizationType
Description copied from interface:AuthorizationQueryonly selects authorizations for the given type. Legal values:Authorization.AUTH_TYPE_GLOBAL,Authorization.AUTH_TYPE_GRANTAuthorization.AUTH_TYPE_REVOKE- Specified by:
authorizationTypein interfaceAuthorizationQuery
-
executeCount
- Specified by:
executeCountin classAbstractQuery<AuthorizationQuery,Authorization>
-
executeList
Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
executeListin classAbstractQuery<AuthorizationQuery,Authorization> page- used if the results must be paged. If null, no paging will be applied.
-
hasExcludingConditions
protected boolean hasExcludingConditions()Description copied from class:AbstractQueryWhether or not the query has excluding conditions. If the query has excluding conditions, (e.g. task due date before and after are excluding), the SQL query is avoided and a default result is returned. The returned result is the same as if the SQL was executed and there were no entries.- Overrides:
hasExcludingConditionsin classAbstractQuery<AuthorizationQuery,Authorization> - Returns:
trueif the query does have excluding conditions,falseotherwise
-
getId
-
isQueryByPermission
public boolean isQueryByPermission() -
getUserIds
-
getGroupIds
-
getResourceType
public int getResourceType() -
getResourceId
-
getPermission
public int getPermission() -
isQueryByResourceType
public boolean isQueryByResourceType() -
getResourcesIntersection
-
orderByResourceType
Description copied from interface:AuthorizationQueryOrder by resource type (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByResourceTypein interfaceAuthorizationQuery
-
orderByResourceId
Description copied from interface:AuthorizationQueryOrder by resource id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByResourceIdin interfaceAuthorizationQuery
-