Class IsUserCondition
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.forms.workflow.IsUserCondition
- All Implemented Interfaces:
com.opensymphony.workflow.Condition
,EnhancedCondition
,LogEnabled
,Serviceable
Worklow condition for checking if current user is the same user as an user defined in a question
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected UserManager
The user managerstatic final String
The question name argument -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the list of accepted arguments for this conditiongetFullLabel
(Map<String, String> argumentsValues) Get the condition label depending on arguments valuesgetLabel()
Get the label for this conditionGet the condition's visibilities depending on rightsboolean
passesCondition
(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) void
service
(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
QUESTION_NAME
The question name argument- See Also:
-
_userManager
The user manager -
_currentUserProvider
The current user provider
-
-
Constructor Details
-
IsUserCondition
public IsUserCondition()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
passesCondition
public boolean passesCondition(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Specified by:
passesCondition
in interfacecom.opensymphony.workflow.Condition
- Throws:
com.opensymphony.workflow.WorkflowException
-
getArguments
Description copied from interface:EnhancedCondition
Get the list of accepted arguments for this condition- Specified by:
getArguments
in interfaceEnhancedCondition
- Returns:
- a List of argument names and associated description
-
getLabel
Description copied from interface:EnhancedCondition
Get the label for this condition- Specified by:
getLabel
in interfaceEnhancedCondition
- Returns:
- the label
-
getFullLabel
Description copied from interface:EnhancedCondition
Get the condition label depending on arguments values- Specified by:
getFullLabel
in interfaceEnhancedCondition
- Parameters:
argumentsValues
- a map of the arguments with their values in current workflow- Returns:
- a label to display in workflow editor vue
-
getVisibilities
Description copied from interface:EnhancedCondition
Get the condition's visibilities depending on rights- Specified by:
getVisibilities
in interfaceEnhancedCondition
- Returns:
- a list of all the allowed right profiles
-