public AddDockedNodeCommand(final Node parent, final Node candidate) { this(parent.getUUID(), candidate); this.parent = parent; }
public UpdateElementPropertyValueCommand(final Node<?, Edge> node, final String propertyId, final Object value) { this(node.getUUID(), propertyId, value); this.node = node; }
@Override public Node add(final Node node) { return nodes.put(node.getUUID(), node); }
private void ifNotProcessed(final Node node, final Command action) { if (null != node && !processesNodes.contains(node.getUUID())) { action.execute(); } }
public DefinitionsContextHelper(Graph<DefinitionSet, NodeT> graph, Class<?> nodeType) { this.firstNode = GraphUtils.getFirstNode((Graph) graph, nodeType); this.nodes = StreamSupport .stream(graph.nodes().spliterator(), false) .filter(n -> !firstNode.getUUID().equals(n.getUUID())) .collect(Collectors.toMap(Node::getUUID, Function.identity())); }
@Override public String toString() { return "AddNodeCommand [candidate=" + getCandidate().getUUID() + "]"; } }
@Override public String toString() { final Node parent = getParent().orElse(null); return getClass().getName() + " [parent=" + (null != parent ? parent.getUUID() : "null") + "," + " candidate=" + getUUID(candidate) + "," + " shapeSet=" + shapeSetId + "]"; } }
@SuppressWarnings("unchecked") public SetConnectionSourceNodeCommand(final Node<? extends View<?>, Edge> sourceNode, final Edge<? extends View, Node> edge, final Connection connection) { this(null != sourceNode ? sourceNode.getUUID() : null, edge.getUUID(), connection); this.sourceNode = sourceNode; this.edge = edge; this.targetNode = edge.getTargetNode(); }
private Map<String, Node<View, ?>> asNodeMap(Iterable nodes) { Map<String, Node<View, ?>> oldNodes = new HashMap<>(); nodes.forEach(n -> { Node n1 = (Node) n; oldNodes.put(n1.getUUID(), n1); }); return oldNodes; }
@SuppressWarnings("unchecked") public SetConnectionTargetNodeCommand(final Node<? extends View<?>, Edge> targetNode, final Edge<? extends View, Node> edge, final Connection connection) { this(null != targetNode ? targetNode.getUUID() : null, edge.getUUID(), connection); this.edge = PortablePreconditions.checkNotNull("edge", edge); this.sourceNode = edge.getSourceNode(); this.targetNode = targetNode; }
private boolean doDeleteNode(final Node<?, Edge> node) { if (!options.getExclusions().contains(node.getUUID())) { getCommand().addCommand(createDeleteCanvasNodeCommand(node)); return true; } return false; }
@Before public void setup() throws Exception { super.init(); when(node.getUUID()).thenReturn(UUID); when(graph.getNode(eq(UUID))).thenReturn(node); when(graphIndex.getNode(eq(UUID))).thenReturn(node); this.tested = new AddNodeCommand(node); }
@Before public void setUp() { super.setUp(); candidate = graphInstance.containerNode; parent = graphInstance.parentNode; candidate.setContent(candidateContent); this.position = new Point2D(1, 1); this.cloneNodeCommand = new CloneNodeCommand(candidate, parent.getUUID(), position, null, childrenTraverseProcessorManagedInstance); }
private PropertyWriter noneEvent(Node<View<EndNoneEvent>, ?> n) { EndEvent event = bpmn2.createEndEvent(); event.setId(n.getUUID()); BaseEndEvent definition = n.getContent().getDefinition(); ThrowEventPropertyWriter p = propertyWriterFactory.of(event); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); p.setBounds(n.getContent().getBounds()); return p; }