@Override public void verifyDeleteFlowRegistry(String registryId) { final ProcessGroup rootGroup = flowController.getFlowManager().getRootGroup(); final VersionControlInformation versionControlInformation = rootGroup.getVersionControlInformation(); if (versionControlInformation != null && versionControlInformation.getRegistryIdentifier().equals(registryId)) { throw new IllegalStateException("The Registry cannot be removed because a Process Group currently under version control is tracking to it."); } final Set<VersionControlInformation> trackedVersionControlInformation = rootGroup.findAllProcessGroups().stream() .map(group -> group.getVersionControlInformation()) .filter(Objects::nonNull) .filter(vci -> vci.getRegistryIdentifier().equals(registryId)) .collect(Collectors.toSet()); if (!trackedVersionControlInformation.isEmpty()) { throw new IllegalStateException("The Registry cannot be removed because a Process Group currently under version control is tracking to it."); } }
@Override public String getRegistryName() { final String registryId = versionControlInformation.getRegistryIdentifier(); final FlowRegistry registry = flowController.getFlowRegistryClient().getFlowRegistry(registryId); return registry == null ? registryId : registry.getName(); }
if (versionControlInfo != null) { final VersionedFlowCoordinates coordinates = new VersionedFlowCoordinates(); final String registryId = versionControlInfo.getRegistryIdentifier(); final FlowRegistry registry = registryClient.getFlowRegistry(registryId); if (registry == null) {
final FlowRegistry flowRegistry = flowRegistryClient.getFlowRegistry(versionControlInfo.getRegistryIdentifier()); if (flowRegistry == null) { throw new IllegalStateException("Process Group with ID " + processGroupId + " is tracking to a flow in Flow Registry with ID " + versionControlInfo.getRegistryIdentifier() + " but cannot find a Flow Registry with that identifier");
if (versionControlInfo != null) { final Element versionControlInfoElement = doc.createElement("versionControlInformation"); addTextElement(versionControlInfoElement, "registryId", versionControlInfo.getRegistryIdentifier()); addTextElement(versionControlInfoElement, "bucketId", versionControlInfo.getBucketIdentifier()); addTextElement(versionControlInfoElement, "bucketName", versionControlInfo.getBucketName());
@Override public void setVersionControlInformation(final VersionControlInformation versionControlInformation, final Map<String, String> versionedComponentIds) { final StandardVersionControlInformation svci = new StandardVersionControlInformation( versionControlInformation.getRegistryIdentifier(), versionControlInformation.getRegistryName(), versionControlInformation.getBucketIdentifier(),
public VersionControlInformationDTO createVersionControlInformationDto(final ProcessGroup group) { if (group == null) { return null; } final VersionControlInformation versionControlInfo = group.getVersionControlInformation(); if (versionControlInfo == null) { return null; } final VersionControlInformationDTO dto = new VersionControlInformationDTO(); dto.setGroupId(group.getIdentifier()); dto.setRegistryId(versionControlInfo.getRegistryIdentifier()); dto.setRegistryName(versionControlInfo.getRegistryName()); dto.setBucketId(versionControlInfo.getBucketIdentifier()); dto.setBucketName(versionControlInfo.getBucketName()); dto.setFlowId(versionControlInfo.getFlowIdentifier()); dto.setFlowName(versionControlInfo.getFlowName()); dto.setFlowDescription(versionControlInfo.getFlowDescription()); dto.setVersion(versionControlInfo.getVersion()); final VersionedFlowStatus status = versionControlInfo.getStatus(); final VersionedFlowState state = status.getState(); dto.setState(state == null ? null : state.name()); dto.setStateExplanation(status.getStateExplanation()); return dto; }