Class AbstractConversationPermissionCommand
java.lang.Object
com.flowable.platform.service.permission.AbstractDmnBasedPermissionHelper<Conversation>
com.flowable.engage.engine.impl.permission.cmd.AbstractConversationPermissionCommand
- Direct Known Subclasses:
- CheckArchiveConversationCommand,- CheckCreateConversationCommand,- CheckDropParticipantFromConversationCommand,- CheckEditMessageCommand,- CheckHasAccessToConversationCommand,- CheckJoinParticipantToExistingConversationCommand,- CheckPostDocumentCommand,- CheckPostImageCommand,- CheckPostMessageCommand,- CheckPostVideoCommand,- CheckPostVoiceCommand,- CheckReopenConversationCommand,- CheckUpdateConversationAvatarCommand,- CheckUpdateConversationDescriptionCommand,- CheckUpdateConversationNameCommand
public abstract class AbstractConversationPermissionCommand
extends AbstractDmnBasedPermissionHelper<Conversation>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final EngageEngineConfigurationprotected Collection<String>protected Stringprotected StringFields inherited from class com.flowable.platform.service.permission.AbstractDmnBasedPermissionHelperNONE_VALUE, OUTPUT_KEY_ERROR_MESSAGE, OUTPUT_KEY_ERROR_MESSAGE_CODE, OUTPUT_KEY_GROUP_NEEDED, OUTPUT_KEY_PERMISSION
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractConversationPermissionCommand(EngageEngineConfiguration engageEngineConfiguration, String userId, Collection<String> userGroupKeys, String userTenantId) 
- 
Method SummaryModifier and TypeMethodDescriptioncheckBasicConversationAccess(CommandContext commandContext, String userId, Conversation conversation, ParticipantType participantType) Basic conversation access check if the participant type has already been resolved.createRuleInputForDefaultModel(String userId, AuthorizedAction action, Conversation scopedObject, Map<String, Object> detailedRuleInput, CommandContext commandContext) IfAbstractDmnBasedPermissionHelper.getDecisionKeyDefaultPermissions()returns a non-null value, this method must be implemented in order to create the rule input data for evaluating the default permission model.evaluateMainParticipantType(ConversationEntity conversation) Evaluates the participant type of user within the specified conversation.evaluateMainParticipantType(String userId, Collection<String> userGroupKeys, ConversationEntity conversation) Evaluates the participant type of the given user within the specified conversation.evaluatePermissionsAndProcessResult(String tenantId, AuthorizedAction action, Conversation scopedObject, Map<String, Object> ruleInput, String decisionModelKey, String globalErrorMessageCode, CommandContext commandContext) protected StringIf the permission helper is based on a default and detail DMN permission rule mechanism, this method must return the DMN key of the default permission rule model to execute.protected StringgetTenantId(Conversation conversation) Methods inherited from class com.flowable.platform.service.permission.AbstractDmnBasedPermissionHelperevaluateDefaultPermissionOutput, evaluatePermissionRuleOutput, evaluatePermissionsAndProcessResult, executeAndLogPermissionModel, getEmptyListOnNullValue, getGroups, isGroupMember, isUserMemberOfGroup, isUserType, processErrorMessage, renderErrorMessage
- 
Field Details- 
engageEngineConfiguration
- 
userId
- 
userGroupKeys
- 
userTenantId
 
- 
- 
Constructor Details- 
AbstractConversationPermissionCommandpublic AbstractConversationPermissionCommand(EngageEngineConfiguration engageEngineConfiguration, String userId, Collection<String> userGroupKeys, String userTenantId) 
 
- 
- 
Method Details- 
checkBasicConversationAccessprotected Optional<String> checkBasicConversationAccess(CommandContext commandContext, String userId, Conversation conversation, ParticipantType participantType) Basic conversation access check if the participant type has already been resolved. It returns an optional error message, if the user represented through the participant type is not involved in the conversation.- Returns:
- an optional error message, if the user does not have access to the conversation
 
- 
getTenantId- Specified by:
- getTenantIdin class- AbstractDmnBasedPermissionHelper<Conversation>
 
- 
evaluateMainParticipantTypeEvaluates the participant type of user within the specified conversation. If the same user has different participant types (e.g. is both owner AND assignee), the main one is returned, which is according the following priorities: owner, assignee, assigned group, candidate user, candidate group- Parameters:
- conversation- the conversation for which the participant type is evaluated
- Returns:
- the participant type (e.g. owner, assignee, etc)
 
- 
evaluateMainParticipantTypepublic ParticipantType evaluateMainParticipantType(String userId, Collection<String> userGroupKeys, ConversationEntity conversation) Evaluates the participant type of the given user within the specified conversation. If the same user has different participant types (e.g. is both owner AND assignee), the main one is returned, which is according the following priorities: owner, assignee, assigned group, candidate user, candidate group- Parameters:
- userId- the id of the user to evaluate its participant type
- userGroupKeys- the group keys for the user to evaluate its participant type
- conversation- the conversation for which the participant type is evaluated
- Returns:
- the participant type (e.g. owner, assignee, etc)
 
- 
evaluatePermissionsAndProcessResultprotected Optional<String> evaluatePermissionsAndProcessResult(String tenantId, AuthorizedAction action, Conversation scopedObject, Map<String, Object> ruleInput, String decisionModelKey, String globalErrorMessageCode, CommandContext commandContext) 
- 
createRuleInputForDefaultModelprotected Map<String,Object> createRuleInputForDefaultModel(String userId, AuthorizedAction action, Conversation scopedObject, Map<String, Object> detailedRuleInput, CommandContext commandContext) Description copied from class:AbstractDmnBasedPermissionHelperIfAbstractDmnBasedPermissionHelper.getDecisionKeyDefaultPermissions()returns a non-null value, this method must be implemented in order to create the rule input data for evaluating the default permission model. The easiest way is by just returning the same rule input as being used for the detailed rule model, but in some cases, the rule input data is different for the default DMN model.- Specified by:
- createRuleInputForDefaultModelin class- AbstractDmnBasedPermissionHelper<Conversation>
- Parameters:
- userId- the id of the user to test for action permissions
- action- the action to test privileges
- scopedObject- the optional scoped object for which the action should be checked
- detailedRuleInput- the rule input as provided and used for the detailed rule model execution
- commandContext- the command context used for execution or access to further services
- Returns:
- the rule input data used for executing the default DMN permission model
 
- 
getDecisionKeyDefaultPermissionsDescription copied from class:AbstractDmnBasedPermissionHelperIf the permission helper is based on a default and detail DMN permission rule mechanism, this method must return the DMN key of the default permission rule model to execute.- Specified by:
- getDecisionKeyDefaultPermissionsin class- AbstractDmnBasedPermissionHelper<Conversation>
- Returns:
- the optional key of the default DMN permission model, null, if none needed
 
 
-