Class ExtensibleFunction
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.workflow.extensions.ExtensibleFunction
- All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider
,EnhancedFunction
,LogEnabled
,Serviceable
Workflow function that will call each function registered on the extension point given as an argument
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.workflow.EnhancedFunction
EnhancedFunction.FunctionType
-
Field Summary
Modifier and TypeFieldDescriptionprotected EnhancedFunctionExtensionPoint
The enhanced function extension pointprotected ServiceManager
The service managerprotected static final String
The rights key. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.opensymphony.workflow.FunctionProvider
_getFunctionProvider
(String functionId, String functionProviderRole) Get the function provider denotedprotected ExtensionPoint<String>
Get the function extension point given in argsvoid
Get the list of accepted arguments for this functiongetFullLabel
(Map<String, String> args) Get the function label depending on arguments valuesReturn the type for the functiongetLabel()
Get the label for this functionvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
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.EnhancedFunction
getVisibilities
-
Field Details
-
EXTENSION_POINT_ROLE_ARGS_KEY
The rights key.- See Also:
-
_manager
The service manager -
_enhancedFunctionEP
The enhanced function extension point
-
-
Constructor Details
-
ExtensibleFunction
public ExtensibleFunction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Specified by:
execute
in interfacecom.opensymphony.workflow.FunctionProvider
- Throws:
com.opensymphony.workflow.WorkflowException
-
_getFunctionProvider
protected com.opensymphony.workflow.FunctionProvider _getFunctionProvider(String functionId, String functionProviderRole) throws com.opensymphony.workflow.WorkflowException Get the function provider denoted- Parameters:
functionId
- The id of the extension that gave the rolefunctionProviderRole
- The role of the component to find- Returns:
- The workflow function
- Throws:
com.opensymphony.workflow.WorkflowException
- If the role cannot be found
-
_getFunctionsExtensionPoint
protected ExtensionPoint<String> _getFunctionsExtensionPoint(Map args) throws com.opensymphony.workflow.WorkflowException Get the function extension point given in args- Parameters:
args
- The workflow arguments- Returns:
- The extension point
- Throws:
com.opensymphony.workflow.WorkflowException
- If the extension point is not configured or does not exist
-
getFunctionExecType
Description copied from interface:EnhancedFunction
Return the type for the function- Specified by:
getFunctionExecType
in interfaceEnhancedFunction
- Returns:
- the type 's code
-
getArguments
Description copied from interface:EnhancedFunction
Get the list of accepted arguments for this function- Specified by:
getArguments
in interfaceEnhancedFunction
- Returns:
- a List of argument names and associated description
-
getLabel
Description copied from interface:EnhancedFunction
Get the label for this function- Specified by:
getLabel
in interfaceEnhancedFunction
- Returns:
- the label
-
getFullLabel
Description copied from interface:EnhancedFunction
Get the function label depending on arguments values- Specified by:
getFullLabel
in interfaceEnhancedFunction
- Parameters:
args
- a map of the arguments with their values in current workflow- Returns:
- a label to display in workflow editor vue
-