Package org.ametys.plugins.workflow.dao
Class WorkflowConditionDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workflow.dao.WorkflowConditionDAO
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
DAO for workflow conditions
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
The "and" type of conditionprotected static final String
Key for "and" label in treeprotected static final String
The "or" type of conditionprotected static final String
Key for "or" label in treeprotected ServiceManager
The service managerprotected WorkflowHelper
The workflow helperstatic final String
The component role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
_getConditionLabel
(com.opensymphony.workflow.loader.ConditionDescriptor condition) Get condition's description or roleprotected List<com.opensymphony.workflow.loader.AbstractDescriptor>
_getConditions
(String currentNode, com.opensymphony.workflow.loader.ActionDescriptor action) Get conditions below current nodeconditionToJSON
(com.opensymphony.workflow.loader.AbstractDescriptor condition, String currentNodeId, int index) Get condition or condition types propertiesgetConditionNodes
(String currentNode, String workflowName, String actionId) Get the tree's condition nodesvoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role -
__AND
The "and" type of condition- See Also:
-
__OR
The "or" type of condition- See Also:
-
__ANDI18N
Key for "and" label in tree- See Also:
-
__ORI18N
Key for "or" label in tree- See Also:
-
_workflowHelper
The workflow helper -
_manager
The service manager
-
-
Constructor Details
-
WorkflowConditionDAO
public WorkflowConditionDAO()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getConditionNodes
public Map<String,Object> getConditionNodes(String currentNode, String workflowName, String actionId) Get the tree's condition nodes- Parameters:
currentNode
- id of the current nodeworkflowName
- unique name of current workflowactionId
- id of current action- Returns:
- a map of current node's children
-
_getConditions
protected List<com.opensymphony.workflow.loader.AbstractDescriptor> _getConditions(String currentNode, com.opensymphony.workflow.loader.ActionDescriptor action) Get conditions below current node- Parameters:
currentNode
- id of the current nodeaction
- current action- Returns:
- a list of childnodes condition
-
conditionToJSON
public Map<String,Object> conditionToJSON(com.opensymphony.workflow.loader.AbstractDescriptor condition, String currentNodeId, int index) Get condition or condition types properties- Parameters:
condition
- current condition, can be ConditionsDescriptor or ConditionDescriptorcurrentNodeId
- the id of the current node in the ConditionTreePanelindex
- index of current condition in node's condition list- Returns:
- a map of the condition infos
-
_getConditionLabel
Get condition's description or role- Parameters:
condition
- the current condition- Returns:
- the condition description as I18nizableText if exist, or its role as String if not
-