Class NiFiRegistryFlowMapper
java.lang.Object
org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate final ExtensionManagerprivate final FlowMappingOptions -
Constructor Summary
ConstructorsConstructorDescriptionNiFiRegistryFlowMapper(ExtensionManager extensionManager) NiFiRegistryFlowMapper(ExtensionManager extensionManager, FlowMappingOptions flowMappingOptions) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanapplyVersionControlInformation(ProcessGroup processGroup, VersionedProcessGroup versionedGroup, FlowManager flowManager, boolean mapDescendantVersionedFlows) private voidconfigureParameterProvider(ParameterContext parameterContext, VersionedParameterContext versionedParameterContext) private ParameterProviderReferencecreateParameterProviderReference(ParameterContext parameterContext) protected Stringstatic StringgenerateVersionedComponentId(String componentId) Generate a versioned component identifier based on the given component identifier.getGroupId(String groupId) private StringgetIdOrThrow(String componentId, Supplier<E> exceptionSupplier) private booleanisMappable(PropertyDescriptor propertyDescriptor, PropertyConfiguration propertyConfiguration) private BatchSizemapBatchSettings(RemoteGroupPort remotePort) private BundlemapBundle(BundleCoordinate coordinate) mapConnectable(Connectable connectable) mapConnection(Connection connection) mapControllerService(ControllerServiceNode controllerService, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) private List<ControllerServiceAPI> mapFlowAnalysisRule(FlowAnalysisRuleNode flowAnalysisRuleNode, ControllerServiceProvider serviceProvider) mapFlowRegistryClient(FlowRegistryClientNode clientNode, ControllerServiceProvider serviceProvider) mapGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, BiFunction<ProcessGroup, VersionedProcessGroup, Boolean> applyVersionControlInfo) mapGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, BiFunction<ProcessGroup, VersionedProcessGroup, Boolean> applyVersionControlInfo, boolean topLevel, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) mapNonVersionedProcessGroup(ProcessGroup group, ControllerServiceProvider serviceProvider) Map the given process group to a versioned process group without any use of an actual flow registry even if the group is currently versioned in a registry.private VersionedParametermapParameter(Parameter parameter) private VersionedParametermapParameter(ParameterContext parameterContext, ParameterDescriptor parameterDescriptor, Parameter parameter) private VersionedParametermapParameter(Parameter parameter, String value) mapParameterContext(ParameterContext parameterContext) private voidmapParameterContext(ParameterContext parameterContext, Map<String, VersionedParameterContext> parameterContexts, Map<String, ParameterProviderReference> parameterProviderReferences) mapParameterContexts(ProcessGroup processGroup, boolean mapDescendantVersionedFlows, Map<String, ParameterProviderReference> parameterProviderReferences) private voidmapParameterContexts(ProcessGroup processGroup, boolean mapDescendantVersionedFlows, Map<String, VersionedParameterContext> parameterContexts, Map<String, ParameterProviderReference> parameterProviderReferences) mapParameterProvider(ParameterProviderNode parameterProviderNode, ControllerServiceProvider serviceProvider) private Set<VersionedParameter> mapParameters(ParameterContext parameterContext) mapPosition(Position pos) mapProcessGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, FlowManager flowManager, boolean mapDescendantVersionedFlows) Map the given process group to a versioned process group using the provided registry client.mapProcessor(ProcessorNode procNode, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) mapProperties(ComponentNode component, ControllerServiceProvider serviceProvider) private Map<String, VersionedPropertyDescriptor> mapPropertyDescriptors(ComponentNode component, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) mapRemotePort(RemoteGroupPort remotePort, ComponentType componentType) mapRemoteProcessGroup(RemoteProcessGroup remoteGroup) mapReportingTask(ReportingTaskNode taskNode, ControllerServiceProvider serviceProvider) private VersionedResourceDefinitionmapResourceDefinition(ResourceDefinition resourceDefinition) private ScheduledStatemapScheduledState(ScheduledState scheduledState)
-
Field Details
-
ENCRYPTED_PREFIX
- See Also:
-
ENCRYPTED_SUFFIX
- See Also:
-
extensionManager
-
flowMappingOptions
-
versionedComponentIds
-
-
Constructor Details
-
NiFiRegistryFlowMapper
-
NiFiRegistryFlowMapper
public NiFiRegistryFlowMapper(ExtensionManager extensionManager, FlowMappingOptions flowMappingOptions)
-
-
Method Details
-
mapNonVersionedProcessGroup
public InstantiatedVersionedProcessGroup mapNonVersionedProcessGroup(ProcessGroup group, ControllerServiceProvider serviceProvider) Map the given process group to a versioned process group without any use of an actual flow registry even if the group is currently versioned in a registry.- Parameters:
group- the process group to mapserviceProvider- the controller service provider to use for mapping- Returns:
- a complete versioned process group without any registry related details
-
mapProcessGroup
public InstantiatedVersionedProcessGroup mapProcessGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, FlowManager flowManager, boolean mapDescendantVersionedFlows) Map the given process group to a versioned process group using the provided registry client.- Parameters:
group- the process group to mapserviceProvider- the controller service provider to use for mappingflowManager- the registry client to use when retrieving versioning detailsmapDescendantVersionedFlows- true in order to include descendant flows in the mapped result- Returns:
- a complete versioned process group with applicable registry related details
-
applyVersionControlInformation
private boolean applyVersionControlInformation(ProcessGroup processGroup, VersionedProcessGroup versionedGroup, FlowManager flowManager, boolean mapDescendantVersionedFlows) -
mapGroup
private InstantiatedVersionedProcessGroup mapGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, BiFunction<ProcessGroup, VersionedProcessGroup, Boolean> applyVersionControlInfo) -
mapGroup
private InstantiatedVersionedProcessGroup mapGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, BiFunction<ProcessGroup, VersionedProcessGroup, Boolean> applyVersionControlInfo, boolean topLevel, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) -
getId
-
generateVersionedComponentId
Generate a versioned component identifier based on the given component identifier. The result for a given component identifier is deterministic.- Parameters:
componentId- the component identifier to generate a versioned component identifier for- Returns:
- a deterministic versioned component identifier
-
getIdOrThrow
private <E extends Exception> String getIdOrThrow(String componentId, Supplier<E> exceptionSupplier) throws E - Throws:
E
-
getGroupId
-
mapConnection
-
mapConnectable
-
mapReportingTask
public VersionedReportingTask mapReportingTask(ReportingTaskNode taskNode, ControllerServiceProvider serviceProvider) -
mapFlowAnalysisRule
public VersionedFlowAnalysisRule mapFlowAnalysisRule(FlowAnalysisRuleNode flowAnalysisRuleNode, ControllerServiceProvider serviceProvider) -
mapParameterProvider
public VersionedParameterProvider mapParameterProvider(ParameterProviderNode parameterProviderNode, ControllerServiceProvider serviceProvider) -
mapFlowRegistryClient
public VersionedFlowRegistryClient mapFlowRegistryClient(FlowRegistryClientNode clientNode, ControllerServiceProvider serviceProvider) -
mapControllerService
public VersionedControllerService mapControllerService(ControllerServiceNode controllerService, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) -
mapProperties
private Map<String,String> mapProperties(ComponentNode component, ControllerServiceProvider serviceProvider) -
encrypt
-
isMappable
private boolean isMappable(PropertyDescriptor propertyDescriptor, PropertyConfiguration propertyConfiguration) -
mapPropertyDescriptors
private Map<String,VersionedPropertyDescriptor> mapPropertyDescriptors(ComponentNode component, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) -
mapResourceDefinition
-
mapBundle
-
mapControllerServiceApis
-
mapFunnel
-
mapLabel
-
mapPort
-
mapPosition
-
mapProcessor
public VersionedProcessor mapProcessor(ProcessorNode procNode, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String, ExternalControllerServiceReference> externalControllerServiceReferences) -
mapRemoteProcessGroup
-
mapRemotePort
public VersionedRemoteGroupPort mapRemotePort(RemoteGroupPort remotePort, ComponentType componentType) -
mapBatchSettings
-
mapParameterContext
-
configureParameterProvider
private void configureParameterProvider(ParameterContext parameterContext, VersionedParameterContext versionedParameterContext) -
mapParameterContexts
public Map<String,VersionedParameterContext> mapParameterContexts(ProcessGroup processGroup, boolean mapDescendantVersionedFlows, Map<String, ParameterProviderReference> parameterProviderReferences) -
mapParameterContexts
private void mapParameterContexts(ProcessGroup processGroup, boolean mapDescendantVersionedFlows, Map<String, VersionedParameterContext> parameterContexts, Map<String, ParameterProviderReference> parameterProviderReferences) -
mapParameterContext
private void mapParameterContext(ParameterContext parameterContext, Map<String, VersionedParameterContext> parameterContexts, Map<String, ParameterProviderReference> parameterProviderReferences) -
mapParameters
-
mapParameter
private VersionedParameter mapParameter(ParameterContext parameterContext, ParameterDescriptor parameterDescriptor, Parameter parameter) -
createParameterProviderReference
private ParameterProviderReference createParameterProviderReference(ParameterContext parameterContext) -
mapParameter
-
mapParameter
-
mapScheduledState
-