Java Code Examples for org.apache.nifi.web.api.dto.PortDTO#setParentGroupId()
The following examples show how to use
org.apache.nifi.web.api.dto.PortDTO#setParentGroupId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlowController.java From localization_nifi with Apache License 2.0 | 5 votes |
private PortDTO createDTO(final Port port) { if (port == null) { return null; } final PortDTO dto = new PortDTO(); dto.setId(port.getIdentifier()); dto.setPosition(new PositionDTO(port.getPosition().getX(), port.getPosition().getY())); dto.setName(port.getName()); dto.setParentGroupId(port.getProcessGroup().getIdentifier()); return dto; }
Example 2
Source File: JerseyOutputPortClient.java From nifi with Apache License 2.0 | 5 votes |
private PortEntity createStateEntity(final PortEntity entity, final String state) { final PortDTO component = new PortDTO(); component.setId(entity.getComponent().getId()); component.setParentGroupId(entity.getComponent().getParentGroupId()); component.setState(state); final PortEntity stateEntity = new PortEntity(); stateEntity.setId(entity.getId()); stateEntity.setRevision(entity.getRevision()); stateEntity.setComponent(component); return stateEntity; }
Example 3
Source File: JerseyInputPortClient.java From nifi with Apache License 2.0 | 5 votes |
private PortEntity createStateEntity(final PortEntity entity, final String state) { final PortDTO component = new PortDTO(); component.setId(entity.getComponent().getId()); component.setParentGroupId(entity.getComponent().getParentGroupId()); component.setState(state); final PortEntity stateEntity = new PortEntity(); stateEntity.setId(entity.getId()); stateEntity.setRevision(entity.getRevision()); stateEntity.setComponent(component); return stateEntity; }
Example 4
Source File: NiFiClientUtil.java From nifi with Apache License 2.0 | 5 votes |
public PortEntity createInputPort(final String name, final String groupId) throws NiFiClientException, IOException { final PortDTO component = new PortDTO(); component.setName(name); component.setParentGroupId(groupId); final PortEntity inputPortEntity = new PortEntity(); inputPortEntity.setRevision(createNewRevision()); inputPortEntity.setComponent(component); return nifiClient.getInputPortClient().createInputPort(groupId, inputPortEntity); }
Example 5
Source File: NiFiClientUtil.java From nifi with Apache License 2.0 | 5 votes |
public PortEntity createOutputPort(final String name, final String groupId) throws NiFiClientException, IOException { final PortDTO component = new PortDTO(); component.setName(name); component.setParentGroupId(groupId); final PortEntity outputPortEntity = new PortEntity(); outputPortEntity.setRevision(createNewRevision()); outputPortEntity.setComponent(component); return nifiClient.getOutputPortClient().createOutputPort(groupId, outputPortEntity); }