Java Code Examples for org.apache.nifi.registry.flow.VersionedProcessGroup#setVersionedFlowCoordinates()
The following examples show how to use
org.apache.nifi.registry.flow.VersionedProcessGroup#setVersionedFlowCoordinates() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestFlowDifferenceFilters.java From nifi with Apache License 2.0 | 6 votes |
@Test public void testFilterIgnorableVersionedCoordinateDifferencesWithIgnorableDifference() { VersionedFlowCoordinates coordinatesA = new VersionedFlowCoordinates(); coordinatesA.setRegistryUrl("http://localhost:18080"); VersionedProcessGroup processGroupA = new VersionedProcessGroup(); processGroupA.setVersionedFlowCoordinates(coordinatesA); VersionedFlowCoordinates coordinatesB = new VersionedFlowCoordinates(); coordinatesB.setRegistryUrl("http://localhost:18080/"); VersionedProcessGroup processGroupB = new VersionedProcessGroup(); processGroupB.setVersionedFlowCoordinates(coordinatesB); StandardFlowDifference flowDifference = new StandardFlowDifference( DifferenceType.VERSIONED_FLOW_COORDINATES_CHANGED, processGroupA, processGroupB, coordinatesA.getRegistryUrl(), coordinatesB.getRegistryUrl(), ""); Assert.assertFalse(FlowDifferenceFilters.FILTER_IGNORABLE_VERSIONED_FLOW_COORDINATE_CHANGES.test(flowDifference)); }
Example 2
Source File: TestFlowDifferenceFilters.java From nifi with Apache License 2.0 | 6 votes |
@Test public void testFilterIgnorableVersionedCoordinateDifferencesWithNonIgnorableDifference() { VersionedFlowCoordinates coordinatesA = new VersionedFlowCoordinates(); coordinatesA.setRegistryUrl("http://localhost:18080"); VersionedProcessGroup processGroupA = new VersionedProcessGroup(); processGroupA.setVersionedFlowCoordinates(coordinatesA); VersionedFlowCoordinates coordinatesB = new VersionedFlowCoordinates(); coordinatesB.setRegistryUrl("http://localhost:18080"); VersionedProcessGroup processGroupB = new VersionedProcessGroup(); processGroupB.setVersionedFlowCoordinates(coordinatesB); StandardFlowDifference flowDifference = new StandardFlowDifference( DifferenceType.VERSIONED_FLOW_COORDINATES_CHANGED, processGroupA, processGroupB, coordinatesA.getRegistryUrl(), coordinatesB.getRegistryUrl(), ""); Assert.assertTrue(FlowDifferenceFilters.FILTER_IGNORABLE_VERSIONED_FLOW_COORDINATE_CHANGES.test(flowDifference)); }
Example 3
Source File: VersionsResource.java From nifi with Apache License 2.0 | 5 votes |
/** * Recursively clear the registry info in the given versioned process group and all nested versioned process groups * * @param versionedProcessGroup the process group to sanitize */ private void sanitizeRegistryInfo(final VersionedProcessGroup versionedProcessGroup) { versionedProcessGroup.setVersionedFlowCoordinates(null); for (final VersionedProcessGroup innerVersionedProcessGroup : versionedProcessGroup.getProcessGroups()) { sanitizeRegistryInfo(innerVersionedProcessGroup); } }