Package org.ametys.plugins.workflow.dao
Class WorkflowPropertyDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workflow.dao.WorkflowPropertyDAO
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
DAO for workflow element's meta attributes
-
Field Summary
Modifier and TypeFieldDescriptionprotected WorflowRightHelper
The workflow right helperprotected WorkflowSessionHelper
The workflow session helperprotected WorkflowStepDAO
The workflow step DAOprotected WorkflowTransitionDAO
The workflow transition DAO -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a property to a workflow elementdeleteProperty
(String workflowName, Integer stepId, Integer actionId, String name) Remove a property from a workflow elementeditProperty
(String workflowName, Integer stepId, Integer actionId, String oldName, String newName, String newValue) Edit property in a workflow elementgetActionProperties
(String workflowName, Integer actionId) Get properties of current actiongetPropertiesNames
(String workflowName, Integer stepId, Integer actionId) Get the used property names for current workflow elementgetStepProperties
(String workflowName, Integer stepId) Get properties of current stepvoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_workflowSessionHelper
The workflow session helper -
_workflowRightHelper
The workflow right helper -
_workflowStepDAO
The workflow step DAO -
_workflowTransitionDAO
The workflow transition DAO
-
-
Constructor Details
-
WorkflowPropertyDAO
public WorkflowPropertyDAO()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getStepProperties
Get properties of current step- Parameters:
workflowName
- the workflow unique namestepId
- id of the current step- Returns:
- a map of the properties
-
getActionProperties
Get properties of current action- Parameters:
workflowName
- the workflow unique nameactionId
- id of the current action- Returns:
- a map of the properties
-
getPropertiesNames
Get the used property names for current workflow element- Parameters:
workflowName
- unique name of current workflowstepId
- id of current stepactionId
- id of current action, can be null if only a step is selected- Returns:
- a set of the properties' names
-
addProperty
public Map<String,Object> addProperty(String workflowName, Integer stepId, Integer actionId, String name, String value) Add a property to a workflow element- Parameters:
workflowName
- unique name of current workflowstepId
- id of current stepactionId
- id of current action, can be null if only a step is selectedname
- the new name to savevalue
- the value to save- Returns:
- the property's infos or an error message
-
editProperty
public Map<String,Object> editProperty(String workflowName, Integer stepId, Integer actionId, String oldName, String newName, String newValue) Edit property in a workflow element- Parameters:
workflowName
- unique name of current workflowstepId
- id of current stepactionId
- id of current action, can be null if only a step is selectedoldName
- the old name for this propertynewName
- the new name to savenewValue
- the value to save- Returns:
- the property's infos or an error message
-
deleteProperty
public Map<String,Object> deleteProperty(String workflowName, Integer stepId, Integer actionId, String name) Remove a property from a workflow element- Parameters:
workflowName
- unique name of current workflowstepId
- id of current stepactionId
- id of current action, can be null if only a step is selectedname
- the new name to save- Returns:
- the property's parent infos or an error message
-