diff --git a/src/main/java/haflow/entity/Edge.java b/src/main/java/haflow/entity/Edge.java index 6a13f08..a655ceb 100644 --- a/src/main/java/haflow/entity/Edge.java +++ b/src/main/java/haflow/entity/Edge.java @@ -15,7 +15,9 @@ public class Edge { private UUID id; private Flow flow; private Node sourceNode; + private String sourceEndpoint; private Node targetNode; + private String targetEndpoint; @Id @Column(name = "id", length = 16) @@ -47,6 +49,15 @@ public class Edge { this.sourceNode = sourceNode; } + @Column(name = "sourceEndpoint") + public String getSourceEndpoint() { + return sourceEndpoint; + } + + public void setSourceEndpoint(String sourceEndpoint) { + this.sourceEndpoint = sourceEndpoint; + } + @ManyToOne @JoinColumn(name = "targetNodeId") public Node getTargetNode() { @@ -57,4 +68,13 @@ public class Edge { this.targetNode = targetNode; } + @Column(name = "targetEndpoint") + public String getTargetEndpoint() { + return targetEndpoint; + } + + public void setTargetEndpoint(String targetEndpoint) { + this.targetEndpoint = targetEndpoint; + } + } diff --git a/src/main/java/haflow/ui/helper/FlowHelper.java b/src/main/java/haflow/ui/helper/FlowHelper.java index 4fdc0f6..d7bebd9 100644 --- a/src/main/java/haflow/ui/helper/FlowHelper.java +++ b/src/main/java/haflow/ui/helper/FlowHelper.java @@ -119,7 +119,9 @@ public class FlowHelper { edgeModel.setFlowId(edge.getFlow().getId()); edgeModel.setId(edge.getId()); edgeModel.setSourceNodeId(edge.getSourceNode().getId()); + edgeModel.setSourceEndpoint(edge.getSourceEndpoint()); edgeModel.setTargetNodeId(edge.getTargetNode().getId()); + edgeModel.setTargetEndpoint(edge.getTargetEndpoint()); flowModel.getEdges().add(edgeModel); } return flowModel; @@ -173,8 +175,10 @@ public class FlowHelper { edge.setId(edgeModel.getId()); edge.setSourceNode(new Node()); edge.getSourceNode().setId(edgeModel.getSourceNodeId()); + edge.setSourceEndpoint(edgeModel.getSourceEndpoint()); edge.setTargetNode(new Node()); edge.getTargetNode().setId(edgeModel.getTargetNodeId()); + edge.setTargetEndpoint(edgeModel.getTargetEndpoint()); edges.add(edge); } boolean result = true; diff --git a/src/main/java/haflow/ui/model/EdgeModel.java b/src/main/java/haflow/ui/model/EdgeModel.java index 7d5ae18..4235d2e 100644 --- a/src/main/java/haflow/ui/model/EdgeModel.java +++ b/src/main/java/haflow/ui/model/EdgeModel.java @@ -10,7 +10,9 @@ public class EdgeModel { private UUID id; private UUID flowId; private UUID sourceNodeId; + private String sourceEndpoint; private UUID targetNodeId; + private String targetEndpoint; @XmlElement public UUID getId() { @@ -39,6 +41,15 @@ public class EdgeModel { this.sourceNodeId = sourceNodeId; } + @XmlElement + public String getSourceEndpoint() { + return sourceEndpoint; + } + + public void setSourceEndpoint(String sourceEndpoint) { + this.sourceEndpoint = sourceEndpoint; + } + @XmlElement public UUID getTargetNodeId() { return targetNodeId; @@ -48,4 +59,13 @@ public class EdgeModel { this.targetNodeId = targetNodeId; } + @XmlElement + public String getTargetEndpoint() { + return targetEndpoint; + } + + public void setTargetEndpoint(String targetEndpoint) { + this.targetEndpoint = targetEndpoint; + } + }