Package org.apache.nifi.flow.registry
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
FieldsModifier and TypeFieldDescription(package private) static final org.apache.nifi.components.PropertyDescriptorprivate final com.fasterxml.jackson.databind.ObjectMapperprivate static final StringFields inherited from interface org.apache.nifi.registry.flow.FlowRegistryClient
DEFAULT_BRANCH_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.nifi.registry.flow.FlowRegistryPermissionsorg.apache.nifi.registry.flow.RegisteredFlowderegisterFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation) private org.apache.nifi.registry.flow.RegisteredFlowSnapshotfullyPopulate(org.apache.nifi.registry.flow.RegisteredFlowSnapshot requested, File flowDir) org.apache.nifi.registry.flow.FlowRegistryBucketgetBucket(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 FilegetChildLocation(File parentDir, Path childLocation) org.apache.nifi.registry.flow.RegisteredFlowgetFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowLocation flowLocation) org.apache.nifi.registry.flow.RegisteredFlowSnapshotgetFlowContents(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.FlowVersionLocation flowVersionLocation) private FilegetFlowDirectory(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId) private PathgetFlowPath(String flowId) 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 intgetLatestFlowVersionInt(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 FilegetRootDirectory(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context) private FilegetSnapshotFile(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String bucketId, String flowId, String version) protected List<org.apache.nifi.components.PropertyDescriptor> private PathbooleanisStorageLocationApplicable(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, String storageLocation) private voidpopulateBucket(org.apache.nifi.registry.flow.RegisteredFlowSnapshot snapshot, String bucketId) private voidpopulateFlow(org.apache.nifi.registry.flow.RegisteredFlowSnapshot snapshot, String bucketId, String flowId, int numVersions) org.apache.nifi.registry.flow.RegisteredFlowregisterFlow(org.apache.nifi.registry.flow.FlowRegistryClientConfigurationContext context, org.apache.nifi.registry.flow.RegisteredFlow flow) org.apache.nifi.registry.flow.RegisteredFlowSnapshotregisterFlowSnapshot(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.FlowRegistryBucketMethods inherited from class org.apache.nifi.registry.flow.AbstractFlowRegistryClient
getIdentifier, getLogger, getSystemSslContext, initializeMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.registry.flow.FlowRegistryClient
generateFlowId, getBranches, getDefaultBranch, isBranchingSupported
-
Field Details
-
TEST_FLOWS_BUCKET
- See Also:
-
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
- Overrides:
getSupportedPropertyDescriptorsin classorg.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
-
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
-
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
-
getFlowDirectory
-
getChildLocation
-
getFlowPath
-
getValidatedBucketPath
-