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
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerprotected UserManagerThe user managerstatic final StringThe question name argument -
Constructor Summary
Constructors -
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 rightsbooleanpassesCondition(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) voidservice(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:
servicein interfaceServiceable- Throws:
ServiceException
-
passesCondition
public boolean passesCondition(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Specified by:
passesConditionin interfacecom.opensymphony.workflow.Condition- Throws:
com.opensymphony.workflow.WorkflowException
-
getArguments
Description copied from interface:EnhancedConditionGet the list of accepted arguments for this condition- Specified by:
getArgumentsin interfaceEnhancedCondition- Returns:
- a List of argument names and associated description
-
getLabel
Description copied from interface:EnhancedConditionGet the label for this condition- Specified by:
getLabelin interfaceEnhancedCondition- Returns:
- the label
-
getFullLabel
Description copied from interface:EnhancedConditionGet the condition label depending on arguments values- Specified by:
getFullLabelin 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:EnhancedConditionGet the condition's visibilities depending on rights- Specified by:
getVisibilitiesin interfaceEnhancedCondition- Returns:
- a list of all the allowed right profiles
-