Class ExplorerNodeCheckRightsCondition
java.lang.Object
org.ametys.plugins.workflow.AbstractWorkflowComponent
org.ametys.plugins.workflow.component.CheckRightsCondition
org.ametys.plugins.explorer.workflow.ExplorerNodeCheckRightsCondition
- All Implemented Interfaces:
com.opensymphony.workflow.Condition
,EnhancedCondition
,Disposable
,Initializable
,LogEnabled
,Serviceable
This workflow function check rights on explorer node
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
AbstractWorkflowComponent.ConditionFailure
-
Field Summary
Fields inherited from class org.ametys.plugins.workflow.component.CheckRightsCondition
__CONTEXT_KEY, __DEFAULT_CONTEXT, __RIGHT_KEY, _i18nUtils, _rightManager, _rightsExtensionPoint, FORCE
Fields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_VALIDATION_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
_computeContext
(Map transientVars, Map args, UserIdentity user, String right) Compute the context to use.
Default implementation uses standard context"/cms"
.protected I18nizableText
_getMultipleConditionsDescriptionKey
(List<String> parameters) Get condition description when there are multiple rights involvedprotected I18nizableText
_getSingleConditionDescriptionKey
(List<String> parameters) Get condition description when there is one rightprotected ExplorerNode
getExplorerNode
(Map transientVars) Retrieve the resource associated with the workflow.getLabel()
Get the label for this conditionMethods inherited from class org.ametys.plugins.workflow.component.CheckRightsCondition
_checkRights, _getRightsEnumerator, checkMultipleAndRights, checkMultipleOrRights, dispose, getArguments, getFullLabel, hasRight, initialize, passesCondition
Methods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser, service
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.workflow.EnhancedCondition
getVisibilities
-
Constructor Details
-
ExplorerNodeCheckRightsCondition
public ExplorerNodeCheckRightsCondition()
-
-
Method Details
-
_computeContext
protected Object _computeContext(Map transientVars, Map args, UserIdentity user, String right) throws com.opensymphony.workflow.WorkflowException Description copied from class:CheckRightsCondition
Compute the context to use.
Default implementation uses standard context"/cms"
.- Overrides:
_computeContext
in classCheckRightsCondition
- Parameters:
transientVars
- variables that will not be persisted.args
- the properties for this function invocation.user
- the current user.right
- the needed right.- Returns:
- the computed context.
- Throws:
com.opensymphony.workflow.WorkflowException
- if an error occurs.
-
getExplorerNode
protected ExplorerNode getExplorerNode(Map transientVars) throws com.opensymphony.workflow.WorkflowException Retrieve the resource associated with the workflow.- Parameters:
transientVars
- the parameters from the call.- Returns:
- the resource.
- Throws:
com.opensymphony.workflow.WorkflowException
- if the resource is not found.
-
getLabel
Description copied from interface:EnhancedCondition
Get the label for this condition- Specified by:
getLabel
in interfaceEnhancedCondition
- Overrides:
getLabel
in classCheckRightsCondition
- Returns:
- the label
-
_getMultipleConditionsDescriptionKey
Description copied from class:CheckRightsCondition
Get condition description when there are multiple rights involved- Overrides:
_getMultipleConditionsDescriptionKey
in classCheckRightsCondition
- Parameters:
parameters
- list of rights- Returns:
- the description
-
_getSingleConditionDescriptionKey
Description copied from class:CheckRightsCondition
Get condition description when there is one right- Overrides:
_getSingleConditionDescriptionKey
in classCheckRightsCondition
- Parameters:
parameters
- the right label as a List- Returns:
- the description
-