private void updatePort(final Port port, final VersionedPort proposed) { port.setComments(proposed.getComments()); port.setName(proposed.getName()); port.setPosition(new Position(proposed.getPosition().getX(), proposed.getPosition().getY())); }
LOG.info("Updated {}", port); } else { port.setPosition(new Position(proposedPort.getPosition().getX(), proposedPort.getPosition().getY())); LOG.info("Updated {}", port); } else { port.setPosition(new Position(proposedPort.getPosition().getX(), proposedPort.getPosition().getY()));
@Override public Port createPort(String groupId, PortDTO portDTO) { if (isNotNull(portDTO.getParentGroupId()) && !flowController.getFlowManager().areGroupsSame(groupId, portDTO.getParentGroupId())) { throw new IllegalArgumentException("Cannot specify a different Parent Group ID than the Group to which the InputPort is being added."); } // ensure the name has been specified if (portDTO.getName() == null) { throw new IllegalArgumentException("Port name must be specified."); } // get the desired group ProcessGroup group = locateProcessGroup(flowController, groupId); // determine if this is the root group Port port; if (group.getParent() == null) { port = flowController.getFlowManager().createRemoteInputPort(portDTO.getId(), portDTO.getName()); } else { port = flowController.getFlowManager().createLocalInputPort(portDTO.getId(), portDTO.getName()); } // ensure we can perform the update before we add the processor to the flow verifyUpdate(port, portDTO); // configure if (portDTO.getPosition() != null) { port.setPosition(new Position(portDTO.getPosition().getX(), portDTO.getPosition().getY())); } port.setComments(portDTO.getComments()); // add the port group.addInputPort(port); return port; }
@Override public Port createPort(String groupId, PortDTO portDTO) { if (isNotNull(portDTO.getParentGroupId()) && !flowController.getFlowManager().areGroupsSame(groupId, portDTO.getParentGroupId())) { throw new IllegalArgumentException("Cannot specify a different Parent Group ID than the Group to which the OutputPort is being added."); } // ensure the name has been specified if (portDTO.getName() == null) { throw new IllegalArgumentException("Port name must be specified."); } // get the desired group ProcessGroup group = locateProcessGroup(flowController, groupId); // determine if this is the root group Port port; if (group.getParent() == null) { port = flowController.getFlowManager().createRemoteOutputPort(portDTO.getId(), portDTO.getName()); } else { port = flowController.getFlowManager().createLocalOutputPort(portDTO.getId(), portDTO.getName()); } // ensure we can perform the update before we add the processor to the flow verifyUpdate(port, portDTO); // configure if (portDTO.getPosition() != null) { port.setPosition(new Position(portDTO.getPosition().getX(), portDTO.getPosition().getY())); } port.setComments(portDTO.getComments()); // add the port group.addOutputPort(port); return port; }
port.setPosition(toPosition(portDTO.getPosition())); port.setComments(portDTO.getComments()); port.setProcessGroup(processGroup); port.setPosition(toPosition(portDTO.getPosition())); port.setComments(portDTO.getComments()); port.setProcessGroup(processGroup);
final Integer concurrentTasks = portDTO.getConcurrentlySchedulableTaskCount(); if (isNotNull(portDTO.getPosition())) { outputPort.setPosition(new Position(portDTO.getPosition().getX(), portDTO.getPosition().getY()));
final Integer concurrentTasks = portDTO.getConcurrentlySchedulableTaskCount(); if (isNotNull(portDTO.getPosition())) { inputPort.setPosition(new Position(portDTO.getPosition().getX(), portDTO.getPosition().getY()));
inputPort.setVersionedComponentId(portDTO.getVersionedComponentId()); inputPort.setPosition(toPosition(portDTO.getPosition())); inputPort.setProcessGroup(group); inputPort.setComments(portDTO.getComments()); outputPort.setVersionedComponentId(portDTO.getVersionedComponentId()); outputPort.setPosition(toPosition(portDTO.getPosition())); outputPort.setProcessGroup(group); outputPort.setComments(portDTO.getComments());