Class FileSystemFlowRegistryClient

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.registry.flow.AbstractFlowRegistryClient
org.apache.nifi.flow.registry.FileSystemFlowRegistryClient
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.registry.flow.FlowRegistryClient

public class FileSystemFlowRegistryClient extends org.apache.nifi.registry.flow.AbstractFlowRegistryClient
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final org.apache.nifi.components.PropertyDescriptor
     
    private static final Set<String>
     
    private final com.fasterxml.jackson.databind.ObjectMapper
     
    private static final String
     

    Fields inherited from interface org.apache.nifi.registry.flow.FlowRegistryClient

    DEFAULT_BRANCH_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private org.apache.nifi.registry.flow.FlowRegistryPermissions
     
    org.apache.nifi.registry.flow.RegisteredFlow
    deregisterFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation)
     
    private org.apache.nifi.registry.flow.RegisteredFlowSnapshot
    fullyPopulate(org.apache.nifi.registry.flow.RegisteredFlowSnapshot requested, File flowDir)
     
    org.apache.nifi.registry.flow.FlowRegistryBucket
    getBucket(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.BucketLocation bucketLocation)
     
    Set<org.apache.nifi.registry.flow.FlowRegistryBucket>
    getBuckets(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String branch)
     
    private File
    getChildLocation(File parentDir, Path childLocation)
     
    org.apache.nifi.registry.flow.RegisteredFlow
    getFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation)
     
    org.apache.nifi.registry.flow.RegisteredFlowSnapshot
    getFlowContents(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowVersionLocation flowVersionLocation)
     
    private File
    getFlowDirectory(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId)
     
    private Path
     
    Set<org.apache.nifi.registry.flow.RegisteredFlow>
    getFlows(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.BucketLocation bucketLocation)
     
    Set<org.apache.nifi.registry.flow.RegisteredFlowSnapshotMetadata>
    getFlowVersions(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation)
     
    private int
    getLatestFlowVersionInt(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId)
     
    getLatestVersion(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation)
     
    private File
    getRootDirectory(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context)
     
    private File
    getSnapshotFile(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId, String version)
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    private Path
     
    boolean
    isStorageLocationApplicable(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String storageLocation)
     
    private void
    populateBucket(org.apache.nifi.registry.flow.RegisteredFlowSnapshot snapshot, String bucketId)
     
    private void
    populateFlow(org.apache.nifi.registry.flow.RegisteredFlowSnapshot snapshot, String bucketId, String flowId, int numVersions)
     
    org.apache.nifi.registry.flow.RegisteredFlow
    registerFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.RegisteredFlow flow)
     
    org.apache.nifi.registry.flow.RegisteredFlowSnapshot
    registerFlowSnapshot(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.RegisteredFlowSnapshot flowSnapshot, org.apache.nifi.registry.flow.RegisterAction registerAction)
     
    private org.apache.nifi.registry.flow.FlowRegistryBucket
    toBucket(File file)
     

    Methods inherited from class org.apache.nifi.registry.flow.AbstractFlowRegistryClient

    getIdentifier, getLogger, getSystemSslContext, initialize

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.registry.flow.FlowRegistryClient

    generateFlowId, getBranches, getDefaultBranch, isBranchingSupported
  • Field Details

    • TEST_FLOWS_BUCKET

      private static final String TEST_FLOWS_BUCKET
      See Also:
    • FLOW_IDS

      private static final Set<String> FLOW_IDS
    • objectMapper

      private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • DIRECTORY

      static final org.apache.nifi.components.PropertyDescriptor DIRECTORY
  • Constructor Details

    • FileSystemFlowRegistryClient

      public FileSystemFlowRegistryClient()
  • Method Details

    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • isStorageLocationApplicable

      public boolean isStorageLocationApplicable(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String storageLocation)
    • getBuckets

      public Set<org.apache.nifi.registry.flow.FlowRegistryBucket> getBuckets(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String branch) throws IOException
      Throws:
      IOException
    • toBucket

      private org.apache.nifi.registry.flow.FlowRegistryBucket toBucket(File file)
    • getRootDirectory

      private File getRootDirectory(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context)
    • getBucket

      public org.apache.nifi.registry.flow.FlowRegistryBucket getBucket(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.BucketLocation bucketLocation)
    • registerFlow

      public org.apache.nifi.registry.flow.RegisteredFlow registerFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.RegisteredFlow flow) throws IOException
      Throws:
      IOException
    • deregisterFlow

      public org.apache.nifi.registry.flow.RegisteredFlow deregisterFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation) throws IOException
      Throws:
      IOException
    • getFlow

      public org.apache.nifi.registry.flow.RegisteredFlow getFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation)
    • getFlows

      public Set<org.apache.nifi.registry.flow.RegisteredFlow> getFlows(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.BucketLocation bucketLocation) throws IOException
      Throws:
      IOException
    • getFlowContents

      public org.apache.nifi.registry.flow.RegisteredFlowSnapshot getFlowContents(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowVersionLocation flowVersionLocation) throws IOException
      Throws:
      IOException
    • populateBucket

      private void populateBucket(org.apache.nifi.registry.flow.RegisteredFlowSnapshot snapshot, String bucketId)
    • populateFlow

      private void populateFlow(org.apache.nifi.registry.flow.RegisteredFlowSnapshot snapshot, String bucketId, String flowId, int numVersions)
    • registerFlowSnapshot

      public org.apache.nifi.registry.flow.RegisteredFlowSnapshot registerFlowSnapshot(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.RegisteredFlowSnapshot flowSnapshot, org.apache.nifi.registry.flow.RegisterAction registerAction) throws IOException
      Throws:
      IOException
    • fullyPopulate

      private org.apache.nifi.registry.flow.RegisteredFlowSnapshot fullyPopulate(org.apache.nifi.registry.flow.RegisteredFlowSnapshot requested, File flowDir)
    • createAllowAllPermissions

      private org.apache.nifi.registry.flow.FlowRegistryPermissions createAllowAllPermissions()
    • getFlowVersions

      public Set<org.apache.nifi.registry.flow.RegisteredFlowSnapshotMetadata> getFlowVersions(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation) throws IOException
      Throws:
      IOException
    • getLatestVersion

      public Optional<String> getLatestVersion(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation) throws IOException
      Throws:
      IOException
    • getLatestFlowVersionInt

      private int getLatestFlowVersionInt(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws IOException
      Throws:
      IOException
    • getSnapshotFile

      private File getSnapshotFile(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId, String version)
    • getFlowDirectory

      private File getFlowDirectory(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId)
    • getChildLocation

      private File getChildLocation(File parentDir, Path childLocation)
    • getFlowPath

      private Path getFlowPath(String flowId)
    • getValidatedBucketPath

      private Path getValidatedBucketPath(String id)