Class ConnectionFinder
java.lang.Object
com.hybris.backoffice.workflow.designer.services.ConnectionFinder
Utility methods for operating on Workflow Designer connections.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanareNodesConnected(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 connectedOptional<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.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.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.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.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.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).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)
-
Constructor Details
-
ConnectionFinder
public ConnectionFinder()
-
-
Method Details
-
findActionToDecisionEdge
public 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 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 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 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 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 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 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
-
setNetworkEntityFinder
-