use of org.apache.nifi.web.ResourceNotFoundException in project nifi by apache.
the class StandardRemoteProcessGroupDAO method verifyUpdateInputPort.
@Override
public void verifyUpdateInputPort(String remoteProcessGroupId, RemoteProcessGroupPortDTO remoteProcessGroupPortDto) {
final RemoteProcessGroup remoteProcessGroup = locateRemoteProcessGroup(remoteProcessGroupId);
final RemoteGroupPort port = remoteProcessGroup.getInputPort(remoteProcessGroupPortDto.getId());
if (port == null) {
throw new ResourceNotFoundException(String.format("Unable to find remote process group input port with id '%s'.", remoteProcessGroupPortDto.getId()));
}
verifyUpdatePort(port, remoteProcessGroupPortDto);
}
use of org.apache.nifi.web.ResourceNotFoundException in project nifi by apache.
the class StandardRemoteProcessGroupDAO method updateRemoteProcessGroupOutputPort.
@Override
public RemoteGroupPort updateRemoteProcessGroupOutputPort(String remoteProcessGroupId, RemoteProcessGroupPortDTO remoteProcessGroupPortDto) {
final RemoteProcessGroup remoteProcessGroup = locateRemoteProcessGroup(remoteProcessGroupId);
final RemoteGroupPort port = remoteProcessGroup.getOutputPort(remoteProcessGroupPortDto.getId());
if (port == null) {
throw new ResourceNotFoundException(String.format("Unable to find remote process group output port with id '%s'.", remoteProcessGroupId));
}
// verify the update
verifyUpdatePort(port, remoteProcessGroupPortDto);
// perform the update
updatePort(port, remoteProcessGroupPortDto, remoteProcessGroup);
remoteProcessGroup.getProcessGroup().onComponentModified();
return port;
}
use of org.apache.nifi.web.ResourceNotFoundException in project nifi by apache.
the class StandardRemoteProcessGroupDAO method verifyUpdateOutputPort.
@Override
public void verifyUpdateOutputPort(String remoteProcessGroupId, RemoteProcessGroupPortDTO remoteProcessGroupPortDto) {
final RemoteProcessGroup remoteProcessGroup = locateRemoteProcessGroup(remoteProcessGroupId);
final RemoteGroupPort port = remoteProcessGroup.getOutputPort(remoteProcessGroupPortDto.getId());
if (port == null) {
throw new ResourceNotFoundException(String.format("Unable to find remote process group output port with id '%s'.", remoteProcessGroupPortDto.getId()));
}
verifyUpdatePort(port, remoteProcessGroupPortDto);
}
use of org.apache.nifi.web.ResourceNotFoundException in project nifi by apache.
the class StandardTemplateDAO method verifyCanAddTemplate.
@Override
public void verifyCanAddTemplate(String name, String groupId) {
final ProcessGroup processGroup = flowController.getGroup(groupId);
if (processGroup == null) {
throw new ResourceNotFoundException("Could not find Process Group with ID " + groupId);
}
verifyAdd(name, processGroup);
}
Aggregations