|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.db.AuthorizationCheck
org.camunda.bpm.engine.impl.db.ListQueryParameterObject
org.camunda.bpm.engine.impl.AbstractQuery<AuthorizationQuery,Authorization>
org.camunda.bpm.engine.impl.AuthorizationQueryImpl
public class AuthorizationQueryImpl
| Field Summary | |
|---|---|
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
|
| Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery |
|---|
commandExecutor, expressions, orderingProperties, resultType, SORTORDER_ASC, SORTORDER_DESC, validators |
| Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject |
|---|
databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, parameter |
| Fields inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck |
|---|
authDefaultPerm, authGroupIds, authUserId, isAuthorizationCheckEnabled, permissionChecks |
| Constructor Summary | |
|---|---|
AuthorizationQueryImpl()
|
|
AuthorizationQueryImpl(CommandExecutor commandExecutor)
|
|
| Method Summary | |
|---|---|
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()
|
int |
getResourceType()
|
String[] |
getUserIds()
|
AuthorizationQuery |
groupIdIn(String... groupIdIn)
only selects authorizations for the given group ids |
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 |
| Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery |
|---|
addExpression, addValidator, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderingProperties, hasExcludingConditions, list, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, setOrderingProperties, singleResult, validate, validate |
| Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject |
|---|
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, setParameter |
| Methods inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck |
|---|
addAtomicPermissionCheck, getAuthDefaultPerm, getAuthGroupIds, getAuthUserId, getPermissionChecks, isAuthorizationCheckEnabled, setAtomicPermissionChecks, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthUserId, setPermissionChecks |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.camunda.bpm.engine.query.Query |
|---|
asc, count, desc, list, listPage, singleResult |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public AuthorizationQueryImpl()
public AuthorizationQueryImpl(CommandExecutor commandExecutor)
| Method Detail |
|---|
public AuthorizationQuery authorizationId(String id)
AuthorizationQuery
authorizationId in interface AuthorizationQuerypublic AuthorizationQuery userIdIn(String... userIdIn)
AuthorizationQuery
userIdIn in interface AuthorizationQuerypublic AuthorizationQuery groupIdIn(String... groupIdIn)
AuthorizationQuery
groupIdIn in interface AuthorizationQuerypublic AuthorizationQuery resourceType(Resource resource)
AuthorizationQuery
resourceType in interface AuthorizationQuerypublic AuthorizationQuery resourceType(int resourceType)
AuthorizationQuery
resourceType in interface AuthorizationQuerypublic AuthorizationQuery resourceId(String resourceId)
AuthorizationQuery
resourceId in interface AuthorizationQuerypublic AuthorizationQuery hasPermission(Permission p)
AuthorizationQuery
authorizationQuery.userId("user1")
.resourceType("processDefinition")
.resourceId("2313")
.hasPermission(Permissions.READ)
.hasPermission(Permissions.WRITE)
.hasPermission(Permissions.DELETE)
.list();
Selects all Authorization objects which provide READ,WRITE,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_REVOKE
authorizationType in interface AuthorizationQuerypublic 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.public 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 AuthorizationQuery
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||