T
- The type of the scoped objectpublic abstract class BaseScopedObjectActionFilter<T> extends Object implements ScopedObjectActionFilter
ScopedObjectActionFilter
which performs checks based on the
ActionDefinitionModel.getMappedStates()
, ActionDefinitionModel.getMappedSubStates()
,
ActionDefinitionModel.getMappedTypes()
and ActionDefinitionModel.getMappedSubTypes()
.Constructor and Description |
---|
BaseScopedObjectActionFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsActionDefinition(Object scopedObject,
String accessibleByUser,
Set<String> userGroupKeys,
ActionDefinition actionDefinition,
ActionDefinitionModel actionDefinitionModel,
ActionInstance actionInstance)
Check if the scoped object accepts the provided
actionDefinition with the provided actionDefinitionModel . |
protected boolean |
currentUserHasAccess(T scopedObject,
ActionDefinitionModel actionDefinitionModel,
String currentUserId,
Collection<String> currentGroupKeys) |
protected abstract String |
getScopedObjectState(T scopedObject)
The state of the scoped object (if the object has one),
null otherwise |
protected abstract String |
getScopedObjectSubState(T scopedObject)
The subState of the scoped object (if the object has one),
null otherwise |
protected abstract String |
getScopedObjectSubType(T scopedObject)
The subType of the scoped object (if the object has one),
null otherwise |
protected abstract String |
getScopedObjectType(T scopedObject)
The type of the scoped object (if the object has one),
null otherwise |
protected Set<String> |
getUserIdentityLinkTypesForScopedObject(T scopedObject,
String userId)
The types of the user identity links for the scoped object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getScopeType
public boolean acceptsActionDefinition(Object scopedObject, String accessibleByUser, Set<String> userGroupKeys, ActionDefinition actionDefinition, ActionDefinitionModel actionDefinitionModel, ActionInstance actionInstance)
ScopedObjectActionFilter
actionDefinition
with the provided actionDefinitionModel
.acceptsActionDefinition
in interface ScopedObjectActionFilter
scopedObject
- the scoped object (e.g. conversation, user, process, etc) that can be filteredaccessibleByUser
- The current user iduserGroupKeys
- The groups of the current useractionDefinition
- the action definition that would be returnedactionDefinitionModel
- the action definition model for the provided actionDefinition
actionInstance
- Optional ActionInstance
, if there are action instances related to the scoped objecttrue
if the actionDefinition
is accepted by the scoped object, false
otherwiseprotected boolean currentUserHasAccess(T scopedObject, ActionDefinitionModel actionDefinitionModel, String currentUserId, Collection<String> currentGroupKeys)
protected Set<String> getUserIdentityLinkTypesForScopedObject(T scopedObject, String userId)
scopedObject
- the scoped object for which the identity links should be fetcheduserId
- the if of the user for which the identity link types are neededuserId
identity linksprotected abstract String getScopedObjectState(T scopedObject)
null
otherwisenull
if the object does not have oneprotected abstract String getScopedObjectSubState(T scopedObject)
null
otherwisenull
if the object does not have oneprotected abstract String getScopedObjectType(T scopedObject)
null
otherwisenull
if the object does not have oneCopyright © 2019. All rights reserved.