Class IsSubmitterCondition
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.forms.workflow.IsSubmitterCondition
- All Implemented Interfaces:
com.opensymphony.workflow.Condition,FormEntryCondition,EnhancedCondition,LogEnabled,Serviceable
public class IsSubmitterCondition
extends AbstractLogEnabled
implements EnhancedCondition, FormEntryCondition, Serviceable
Worklow condition for checking if current user is the same user as the entry submmiter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Get the label for this conditionGet the condition's visibilities depending on rightsgetWorkflowActorsPermissions(FormEntry entry, Map args) Returns all users with their corresponding permission result.booleanpassesCondition(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, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.workflow.EnhancedCondition
getArguments, getFullLabelMethods inherited from interface org.ametys.plugins.forms.workflow.FormEntryCondition
getAnyConnectedPermissions
-
Field Details
-
_currentUserProvider
The current user provider
-
-
Constructor Details
-
IsSubmitterCondition
public IsSubmitterCondition()
-
-
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
-
getLabel
Description copied from interface:EnhancedConditionGet the label for this condition- Specified by:
getLabelin interfaceEnhancedCondition- Returns:
- the label
-
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
-
getWorkflowActorsPermissions
public Map<UserIdentity,RightManager.RightResult> getWorkflowActorsPermissions(FormEntry entry, Map args) Description copied from interface:FormEntryConditionReturns all users with their corresponding permission result. The associatedRightManager.RightResultindicates whether the user passes the condition or not.- Specified by:
getWorkflowActorsPermissionsin interfaceFormEntryCondition- Parameters:
entry- the form entryargs- the condition arguments- Returns:
- a map containing each evaluated user and their corresponding
RightManager.RightResult
-