Search in sources :

Example 1 with Bundle

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;
}
Also used : ControllerServiceNode(org.apache.nifi.controller.service.ControllerServiceNode) Bundle(org.apache.nifi.registry.flow.Bundle) BundleCoordinate(org.apache.nifi.bundle.BundleCoordinate) URL(java.net.URL)

Example 2 with Bundle

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;
}
Also used : Bundle(org.apache.nifi.registry.flow.Bundle)

Aggregations

Bundle (org.apache.nifi.registry.flow.Bundle)2 URL (java.net.URL)1 BundleCoordinate (org.apache.nifi.bundle.BundleCoordinate)1 ControllerServiceNode (org.apache.nifi.controller.service.ControllerServiceNode)1