Class NiFiRegistryFlowMapper

java.lang.Object
org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper

public class NiFiRegistryFlowMapper extends Object
  • Field Details

  • Constructor Details

  • 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 map
      serviceProvider - 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 map
      serviceProvider - the controller service provider to use for mapping
      flowManager - the registry client to use when retrieving versioning details
      mapDescendantVersionedFlows - 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, org.apache.nifi.flow.VersionedProcessGroup versionedGroup, FlowManager flowManager, boolean mapDescendantVersionedFlows)
    • mapGroup

      private InstantiatedVersionedProcessGroup mapGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, BiFunction<ProcessGroup,org.apache.nifi.flow.VersionedProcessGroup,Boolean> applyVersionControlInfo)
    • mapGroup

      private InstantiatedVersionedProcessGroup mapGroup(ProcessGroup group, ControllerServiceProvider serviceProvider, BiFunction<ProcessGroup,org.apache.nifi.flow.VersionedProcessGroup,Boolean> applyVersionControlInfo, boolean topLevel, Set<String> includedGroupIds, Map<String,org.apache.nifi.flow.ExternalControllerServiceReference> externalControllerServiceReferences)
    • getId

      private String getId(Optional<String> currentVersionedId, String componentId)
    • generateVersionedComponentId

      public static String generateVersionedComponentId(String componentId)
      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

      public String getGroupId(String groupId)
    • mapConnection

      public org.apache.nifi.flow.VersionedConnection mapConnection(Connection connection)
    • mapConnectable

      public org.apache.nifi.flow.ConnectableComponent mapConnectable(Connectable connectable)
    • mapReportingTask

      public org.apache.nifi.flow.VersionedReportingTask mapReportingTask(ReportingTaskNode taskNode, ControllerServiceProvider serviceProvider)
    • mapFlowAnalysisRule

      public org.apache.nifi.flow.VersionedFlowAnalysisRule mapFlowAnalysisRule(FlowAnalysisRuleNode flowAnalysisRuleNode, ControllerServiceProvider serviceProvider)
    • mapParameterProvider

      public org.apache.nifi.flow.VersionedParameterProvider mapParameterProvider(ParameterProviderNode parameterProviderNode, ControllerServiceProvider serviceProvider)
    • mapFlowRegistryClient

      public org.apache.nifi.flow.VersionedFlowRegistryClient mapFlowRegistryClient(FlowRegistryClientNode clientNode, ControllerServiceProvider serviceProvider)
    • mapControllerService

      public org.apache.nifi.flow.VersionedControllerService mapControllerService(ControllerServiceNode controllerService, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String,org.apache.nifi.flow.ExternalControllerServiceReference> externalControllerServiceReferences)
    • mapProperties

      private Map<String,String> mapProperties(ComponentNode component, ControllerServiceProvider serviceProvider)
    • encrypt

      protected String encrypt(String value)
    • isMappable

      private boolean isMappable(PropertyDescriptor propertyDescriptor, PropertyConfiguration propertyConfiguration)
    • mapPropertyDescriptors

      private Map<String,org.apache.nifi.flow.VersionedPropertyDescriptor> mapPropertyDescriptors(ComponentNode component, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String,org.apache.nifi.flow.ExternalControllerServiceReference> externalControllerServiceReferences)
    • mapResourceDefinition

      private org.apache.nifi.flow.VersionedResourceDefinition mapResourceDefinition(org.apache.nifi.components.resource.ResourceDefinition resourceDefinition)
    • mapBundle

      private org.apache.nifi.flow.Bundle mapBundle(BundleCoordinate coordinate)
    • mapControllerServiceApis

      private List<org.apache.nifi.flow.ControllerServiceAPI> mapControllerServiceApis(ControllerServiceNode service)
    • mapFunnel

      public org.apache.nifi.flow.VersionedFunnel mapFunnel(Funnel funnel)
    • mapLabel

      public org.apache.nifi.flow.VersionedLabel mapLabel(Label label)
    • mapPort

      public org.apache.nifi.flow.VersionedPort mapPort(Port port)
    • mapPosition

      public org.apache.nifi.flow.Position mapPosition(Position pos)
    • mapProcessor

      public org.apache.nifi.flow.VersionedProcessor mapProcessor(ProcessorNode procNode, ControllerServiceProvider serviceProvider, Set<String> includedGroupIds, Map<String,org.apache.nifi.flow.ExternalControllerServiceReference> externalControllerServiceReferences)
    • mapRemoteProcessGroup

      public org.apache.nifi.flow.VersionedRemoteProcessGroup mapRemoteProcessGroup(RemoteProcessGroup remoteGroup)
    • mapRemotePort

      public org.apache.nifi.flow.VersionedRemoteGroupPort mapRemotePort(RemoteGroupPort remotePort, org.apache.nifi.flow.ComponentType componentType)
    • mapBatchSettings

      private org.apache.nifi.flow.BatchSize mapBatchSettings(RemoteGroupPort remotePort)
    • mapParameterContext

      public org.apache.nifi.flow.VersionedParameterContext mapParameterContext(ParameterContext parameterContext)
    • configureParameterProvider

      private void configureParameterProvider(ParameterContext parameterContext, org.apache.nifi.flow.VersionedParameterContext versionedParameterContext)
    • mapParameterContexts

      public Map<String,org.apache.nifi.flow.VersionedParameterContext> mapParameterContexts(ProcessGroup processGroup, boolean mapDescendantVersionedFlows, Map<String,org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences)
    • mapParameterContexts

      private void mapParameterContexts(ProcessGroup processGroup, boolean mapDescendantVersionedFlows, Map<String,org.apache.nifi.flow.VersionedParameterContext> parameterContexts, Map<String,org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences)
    • mapParameterContext

      private void mapParameterContext(ParameterContext parameterContext, Map<String,org.apache.nifi.flow.VersionedParameterContext> parameterContexts, Map<String,org.apache.nifi.flow.ParameterProviderReference> parameterProviderReferences)
    • mapParameters

      private Set<org.apache.nifi.flow.VersionedParameter> mapParameters(ParameterContext parameterContext)
    • mapParameter

      private org.apache.nifi.flow.VersionedParameter mapParameter(ParameterContext parameterContext, ParameterDescriptor parameterDescriptor, Parameter parameter)
    • createParameterProviderReference

      private org.apache.nifi.flow.ParameterProviderReference createParameterProviderReference(ParameterContext parameterContext)
    • mapParameter

      private org.apache.nifi.flow.VersionedParameter mapParameter(Parameter parameter)
    • mapParameter

      private org.apache.nifi.flow.VersionedParameter mapParameter(Parameter parameter, String value)
    • createVersionedAsset

      private org.apache.nifi.flow.VersionedAsset createVersionedAsset(Asset asset)
    • mapScheduledState

      private org.apache.nifi.flow.ScheduledState mapScheduledState(ScheduledState scheduledState)