public class AuthorizationEntity extends Object implements Authorization, DbEntity, HasDbRevision, HasDbReferences, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int |
authorizationType |
protected String |
groupId |
protected String |
id |
protected static EnginePersistenceLogger |
LOG |
protected int |
permissions |
protected Date |
removalTime |
protected String |
resourceId |
protected Integer |
resourceType |
protected int |
revision |
protected String |
rootProcessInstanceId |
protected String |
userId |
ANY, AUTH_TYPE_GLOBAL, AUTH_TYPE_GRANT, AUTH_TYPE_REVOKE| Constructor and Description |
|---|
AuthorizationEntity() |
AuthorizationEntity(int type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPermission(Permission p)
allows granting a permission.
|
int |
getAuthorizationType()
The type og the authorization.
|
Set<Permission> |
getCachedPermissions() |
String |
getGroupId() |
String |
getId() |
int |
getPermissions() |
Permission[] |
getPermissions(Permission[] permissions)
Allows checking whether this authorization grants / revokes a set of permissions.
|
Object |
getPersistentState()
Returns a representation of the object,
as would be stored in the database.
|
Map<String,Class> |
getReferencedEntitiesIdAndClass()
Scope: IN-MEMORY references
|
Set<String> |
getReferencedEntityIds()
Scope: IN-MEMORY references
|
Date |
getRemovalTime()
The removal time indicates the date a historic instance authorization is cleaned up
A removal time can only be assigned to a historic instance authorization.
|
Integer |
getResource() |
String |
getResourceId() |
int |
getResourceType() |
int |
getRevision() |
int |
getRevisionNext() |
String |
getRootProcessInstanceId()
The process instance id of the top-level (root) process instance the historic instance
authorization is related to
A root process instance id is only assigned to a historic instance authorization.
|
String |
getUserId() |
boolean |
isEveryPermissionGranted()
Allows checking whether this authorization grants every single permission.
|
boolean |
isEveryPermissionRevoked()
Allows checking whether this authorization revokes every single permission.
|
boolean |
isPermissionGranted(Permission p)
Allows checking whether this authorization grants a specific permission.
|
boolean |
isPermissionRevoked(Permission p)
Allows checking whether this authorization revokes a specific permission.
|
void |
removePermission(Permission p)
allows removing a permission.
|
protected void |
resetPermissions() |
void |
setAuthorizationType(int authorizationType) |
void |
setGroupId(String groupId)
set the id of the group this authorization is created for
|
void |
setId(String id) |
void |
setPermissions(int permissions) |
void |
setPermissions(Permission[] permissions)
Sets the permissions to the provided value.
|
void |
setRemovalTime(Date removalTime) |
void |
setResource(Resource resource)
sets the type of the resource
|
void |
setResourceId(String resourceId)
set the id of the resource
|
void |
setResourceType(int type)
sets the type of the resource
|
void |
setRevision(int revision) |
void |
setRootProcessInstanceId(String rootProcessInstanceId) |
void |
setUserId(String userId)
set the id of the user this authorization is created for
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDependentEntitiesprotected static final EnginePersistenceLogger LOG
protected String id
protected int revision
protected int authorizationType
protected int permissions
protected String userId
protected String groupId
protected Integer resourceType
protected String resourceId
protected Date removalTime
protected String rootProcessInstanceId
public AuthorizationEntity()
public AuthorizationEntity(int type)
protected void resetPermissions()
public void addPermission(Permission p)
AuthorizationPermissions.addPermission in interface Authorizationpublic void removePermission(Permission p)
AuthorizationPermissions.removePermission in interface Authorizationpublic boolean isPermissionGranted(Permission p)
AuthorizationisPermissionGranted in interface Authorizationpublic boolean isPermissionRevoked(Permission p)
AuthorizationisPermissionRevoked in interface Authorizationpublic boolean isEveryPermissionGranted()
AuthorizationisEveryPermissionGranted in interface Authorizationpublic boolean isEveryPermissionRevoked()
AuthorizationisEveryPermissionRevoked in interface Authorizationpublic Permission[] getPermissions(Permission[] permissions)
AuthorizationPermissions.values()
The return value of this method depends on the type of the authorization:
Authorization.AUTH_TYPE_GLOBAL: all permissions in the parameter list granted by this authorization are returned. Authorization.AUTH_TYPE_GRANT: all permissions in the parameter list granted by this authorization are returned. Authorization.AUTH_TYPE_REVOKE: all permissions in the parameter list revoked by this authorization are returned. getPermissions in interface AuthorizationPermissions provided by this Authorization.public void setPermissions(Permission[] permissions)
AuthorizationAuthorization.AUTH_TYPE_GLOBAL: all provided permissions are granted.Authorization.AUTH_TYPE_GRANT: all provided permissions are granted.Authorization.AUTH_TYPE_REVOKE: all provided permissions are revoked.setPermissions in interface Authorizationpublic int getAuthorizationType()
AuthorizationgetAuthorizationType in interface Authorizationpublic void setAuthorizationType(int authorizationType)
public String getGroupId()
getGroupId in interface Authorizationpublic void setGroupId(String groupId)
AuthorizationsetGroupId in interface Authorizationpublic String getUserId()
getUserId in interface Authorizationpublic void setUserId(String userId)
AuthorizationsetUserId in interface Authorizationpublic int getResourceType()
getResourceType in interface Authorizationpublic void setResourceType(int type)
AuthorizationsetResourceType in interface Authorizationpublic Integer getResource()
public void setResource(Resource resource)
AuthorizationsetResource in interface Authorizationpublic String getResourceId()
getResourceId in interface Authorizationpublic void setResourceId(String resourceId)
AuthorizationsetResourceId in interface Authorizationpublic String getId()
getId in interface AuthorizationgetId in interface DbEntityAuthorization objectpublic int getRevision()
getRevision in interface HasDbRevisionpublic void setRevision(int revision)
setRevision in interface HasDbRevisionpublic void setPermissions(int permissions)
public int getPermissions()
public Set<Permission> getCachedPermissions()
public int getRevisionNext()
getRevisionNext in interface HasDbRevisionpublic Object getPersistentState()
DbEntitygetPersistentState in interface DbEntitypublic Date getRemovalTime()
AuthorizationResources.HISTORIC_TASK.getRemovalTime in interface Authorizationnull if not related to a historic instance resource
null if removal time strategy is end and the top-level instance is not finishedpublic void setRemovalTime(Date removalTime)
public String getRootProcessInstanceId()
AuthorizationResources.HISTORIC_TASK.getRootProcessInstanceId in interface Authorizationnull if not related to a historic instance resourcepublic void setRootProcessInstanceId(String rootProcessInstanceId)
public Set<String> getReferencedEntityIds()
HasDbReferencesScope: IN-MEMORY references
getReferencedEntityIds in interface HasDbReferencespublic Map<String,Class> getReferencedEntitiesIdAndClass()
HasDbReferencesScope: IN-MEMORY references
getReferencedEntitiesIdAndClass in interface HasDbReferencesCopyright © 2021. All rights reserved.