public static BundleDTO createBundleDto(final Bundle bundle) { return new BundleDTO(bundle.getGroup(), bundle.getArtifact(), bundle.getVersion()); } }
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; }
public static BundleCoordinate createBundleCoordinate(final Bundle bundle) { return new BundleCoordinate(bundle.getGroup(), bundle.getArtifact(), bundle.getVersion()); }
final BundleCoordinate coordinate = BundleUtils.getCompatibleBundle(extensionManager, processor.getType(), createBundleDto(processor.getBundle())); final org.apache.nifi.registry.flow.Bundle bundle = new org.apache.nifi.registry.flow.Bundle(); bundle.setArtifact(coordinate.getId()); bundle.setGroup(coordinate.getGroup()); bundle.setVersion(coordinate.getVersion()); processor.setBundle(bundle); }); final BundleCoordinate coordinate = BundleUtils.getCompatibleBundle(extensionManager, controllerService.getType(), createBundleDto(controllerService.getBundle())); final org.apache.nifi.registry.flow.Bundle bundle = new org.apache.nifi.registry.flow.Bundle(); bundle.setArtifact(coordinate.getId()); bundle.setGroup(coordinate.getGroup()); bundle.setVersion(coordinate.getVersion()); controllerService.setBundle(bundle); });
private BundleCoordinate toCoordinate(final Bundle bundle) { return new BundleCoordinate(bundle.getGroup(), bundle.getArtifact(), bundle.getVersion()); }
private void verifyBundleInVersionedFlow(final org.apache.nifi.registry.flow.Bundle requiredBundle, final Set<BundleCoordinate> supportedBundles) { final BundleCoordinate requiredCoordinate = new BundleCoordinate(requiredBundle.getGroup(), requiredBundle.getArtifact(), requiredBundle.getVersion()); if (!supportedBundles.contains(requiredCoordinate)) { throw new IllegalStateException("Unsupported bundle: " + requiredCoordinate); } }
private boolean isEqual(final BundleCoordinate coordinate, final Bundle bundle) { if (!bundle.getGroup().equals(coordinate.getGroup())) { return false; } if (!bundle.getArtifact().equals(coordinate.getId())) { return false; } if (!bundle.getVersion().equals(coordinate.getVersion())) { return false; } return true; }
public static BundleDTO createBundleDto(final org.apache.nifi.registry.flow.Bundle bundle) { final BundleDTO dto = new BundleDTO(); dto.setArtifact(bundle.getArtifact()); dto.setGroup(bundle.getGroup()); dto.setVersion(bundle.getVersion()); return dto; } }