Class ConnectionFinder
- java.lang.Object
-
- com.hybris.backoffice.workflow.designer.services.ConnectionFinder
-
public class ConnectionFinder extends java.lang.ObjectUtility methods for operating on Workflow Designer connections.
-
-
Constructor Summary
Constructors Constructor Description ConnectionFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareNodesConnected(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node sourceNode, com.hybris.cockpitng.components.visjs.network.data.Node targetNode)Checks if given nodes are directly connectedjava.util.Optional<com.hybris.cockpitng.components.visjs.network.data.Edge>findActionToDecisionEdge(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, WorkflowActionTemplateModel actionModel, WorkflowDecisionTemplateModel decisionModel)Searches through the NetworkChart's edges, and finds the one coming from given action to given decision.java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge>findActionToDecisionEdges(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)Filters all NetworkChart edges and returns only those, that come from action node and end in decision node.java.util.Optional<com.hybris.cockpitng.components.visjs.network.data.Edge>findDecisionToActionEdge(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, WorkflowDecisionTemplateModel decisionModel, WorkflowActionTemplateModel actionModel)Searches through the NetworkChart's edges, and finds the one coming from given decision to given action.java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge>findDecisionToActionEdges(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)Filters all NetworkChart edges and returns only those, that come from decision node and end in action node.java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge>findEdgesFromNode(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)Finds edges outgoing from node.java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge>findEdgesOfNode(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)Finds all edges connected with the node (both incoming and outgoing).java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge>findEdgesToNode(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)Finds edges incoming to node.booleanisDecisionConnectedToActionThroughAnd(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, WorkflowDecisionTemplateModel decisionModel, WorkflowActionTemplateModel actionModel)Checks if given decision is connected to given action through and 'And' node.voidsetNetworkEntityFinder(NetworkEntityFinder networkEntityFinder)voidsetNodeTypeService(NodeTypeService nodeTypeService)
-
-
-
Method Detail
-
findActionToDecisionEdge
public java.util.Optional<com.hybris.cockpitng.components.visjs.network.data.Edge> findActionToDecisionEdge(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, WorkflowActionTemplateModel actionModel, WorkflowDecisionTemplateModel decisionModel)Searches through the NetworkChart's edges, and finds the one coming from given action to given decision.- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is storedactionModel- action where the edge startsdecisionModel- decision where edge ends- Returns:
- edge from given action to decision
-
findDecisionToActionEdge
public java.util.Optional<com.hybris.cockpitng.components.visjs.network.data.Edge> findDecisionToActionEdge(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, WorkflowDecisionTemplateModel decisionModel, WorkflowActionTemplateModel actionModel)Searches through the NetworkChart's edges, and finds the one coming from given decision to given action.- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is storeddecisionModel- decision where the edge startsactionModel- action where the edge ends- Returns:
- edge from given decision to action
-
isDecisionConnectedToActionThroughAnd
public boolean isDecisionConnectedToActionThroughAnd(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, WorkflowDecisionTemplateModel decisionModel, WorkflowActionTemplateModel actionModel)Checks if given decision is connected to given action through and 'And' node.- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is storeddecisionModel- starting decisionactionModel- ending action- Returns:
- true if decision is connected to action through an 'And' node
-
findActionToDecisionEdges
public java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge> findActionToDecisionEdges(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
Filters all NetworkChart edges and returns only those, that come from action node and end in decision node.- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is stored- Returns:
- edges from action to decision
-
findDecisionToActionEdges
public java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge> findDecisionToActionEdges(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
Filters all NetworkChart edges and returns only those, that come from decision node and end in action node.- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is stored- Returns:
- edges from decision to action
-
findEdgesToNode
public java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge> findEdgesToNode(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)Finds edges incoming to node.- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is storednode- node for which the edges should be found- Returns:
- edges incoming to node
-
findEdgesFromNode
public java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge> findEdgesFromNode(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)Finds edges outgoing from node.- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is storednode- node for which the edges should be found- Returns:
- edges outgoing from node
-
findEdgesOfNode
public java.util.Set<com.hybris.cockpitng.components.visjs.network.data.Edge> findEdgesOfNode(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)Finds all edges connected with the node (both incoming and outgoing).- Parameters:
context- contains Network Chart widget model, where the Workflow Designer data is storednode- node for which the edges should be found- Returns:
- edges connected with node
-
areNodesConnected
public boolean areNodesConnected(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node sourceNode, com.hybris.cockpitng.components.visjs.network.data.Node targetNode)Checks if given nodes are directly connected- Parameters:
context- contains theWidgetInstanceManagerof the Workflow DesignersourceNode-Edge.fromNodeof the edgetargetNode-Edge.toNodeof the edge- Returns:
- true if nodes are directly connected
-
setNodeTypeService
public void setNodeTypeService(NodeTypeService nodeTypeService)
-
setNetworkEntityFinder
public void setNetworkEntityFinder(NetworkEntityFinder networkEntityFinder)
-
-