Package org.ametys.plugins.forms.rights
Class FormEntryAccessConditionsWorkflowHelper
java.lang.Object
org.ametys.plugins.forms.rights.FormEntryAccessConditionsWorkflowHelper
- All Implemented Interfaces:
Component,Serviceable
public class FormEntryAccessConditionsWorkflowHelper
extends Object
implements Component, Serviceable
This helper provides methods to get the users passing the workflow conditions for form entries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EnhancedConditionExtensionPointExtension point for Conditionsprotected WorkflowHelperThe workflow helper componentprotected WorkflowProviderThe workflow providerstatic final StringThe component role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the list of action types to exclude for the access rights evaluationprotected Map<UserIdentity, RightManager.RightResult> Get the users passing the workflow conditions for the given form entry with their right resultgetWorkflowActors(FormEntry entry) Get the users having at least one available action on the entry with their right resultbooleantrueif the workflow conditions for the given form entry allow any workflow actor to have access to this entry,falseotherwisestatic RightManager.RightResultMerge two right results with an AND operationstatic RightManager.RightResultMerge two right results with an OR operationprotected booleanpassesConditions(FormEntry entry) Evaluate the workflow conditions for the given form entry and returning true if we pass all the conditions, false otherwisevoidservice(ServiceManager manager)
-
Field Details
-
ROLE
The component role -
_workflowProvider
The workflow provider -
_workflowHelper
The workflow helper component -
_enhancedConditionExtensionPoint
Extension point for Conditions
-
-
Constructor Details
-
FormEntryAccessConditionsWorkflowHelper
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
isAnyWorkflowActorsAllowed
trueif the workflow conditions for the given form entry allow any workflow actor to have access to this entry,falseotherwise- Parameters:
entry- the form entry- Returns:
trueif the workflow conditions for the given form entry allow any workflow actor to have access to this entry,falseotherwise
-
passesConditions
Evaluate the workflow conditions for the given form entry and returning true if we pass all the conditions, false otherwise- Parameters:
entry- the form entry- Returns:
trueif we pass all the conditions, false otherwise
-
getWorkflowActors
Get the users having at least one available action on the entry with their right result- Parameters:
entry- the form entry- Returns:
- the users having at least one available action on the entry with their right result
-
getUsersPassingConditions
Get the users passing the workflow conditions for the given form entry with their right result- Parameters:
entry- the form entry- Returns:
- the users passing the workflow conditions for the given form entry with their right result
-
getExcludedActionTypes
Get the list of action types to exclude for the access rights evaluation- Returns:
- the list of action types to exclude for the access rights evaluation
-
mergeOrRightResults
public static RightManager.RightResult mergeOrRightResults(RightManager.RightResult r1, RightManager.RightResult r2) Merge two right results with an OR operation- Parameters:
r1- the first right resultr2- the second right result- Returns:
- the merged right result
-
mergeAndRightResults
public static RightManager.RightResult mergeAndRightResults(RightManager.RightResult r1, RightManager.RightResult r2) Merge two right results with an AND operation- Parameters:
r1- the first right resultr2- the second right result- Returns:
- the merged right result
-