use of org.apache.nifi.registry.flow.Bundle in project nifi by apache.
the class StandardProcessGroup method addControllerService.
private ControllerServiceNode addControllerService(final ProcessGroup destination, final VersionedControllerService proposed, final String componentIdSeed) {
final String type = proposed.getType();
final String id = generateUuid(proposed.getIdentifier(), destination.getIdentifier(), componentIdSeed);
final Bundle bundle = proposed.getBundle();
final BundleCoordinate coordinate = toCoordinate(bundle);
final boolean firstTimeAdded = true;
final Set<URL> additionalUrls = Collections.emptySet();
final ControllerServiceNode newService = flowController.createControllerService(type, id, coordinate, additionalUrls, firstTimeAdded);
newService.setVersionedComponentId(proposed.getIdentifier());
destination.addControllerService(newService);
updateControllerService(newService, proposed);
return newService;
}
use of org.apache.nifi.registry.flow.Bundle in project nifi by apache.
the class NiFiRegistryFlowMapper method mapBundle.
private Bundle mapBundle(final BundleCoordinate coordinate) {
final Bundle versionedBundle = new Bundle();
versionedBundle.setGroup(coordinate.getGroup());
versionedBundle.setArtifact(coordinate.getId());
versionedBundle.setVersion(coordinate.getVersion());
return versionedBundle;
}
Aggregations