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:
ConfigurableComponent,FlowRegistryClient
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final PropertyDescriptorprivate final com.fasterxml.jackson.databind.ObjectMapperprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate FlowRegistryPermissionsderegisterFlow(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) private RegisteredFlowSnapshotfullyPopulate(RegisteredFlowSnapshot requested, File flowDir) getBucket(FlowRegistryClientConfigurationContext context, String bucketId) private FilegetChildLocation(File parentDir, Path childLocation) getFlow(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) getFlowContents(FlowRegistryClientConfigurationContext context, String bucketId, String flowId, int version) private FilegetFlowDirectory(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) private PathgetFlowPath(String flowId) getFlows(FlowRegistryClientConfigurationContext context, String bucketId) getFlowVersions(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) intgetLatestVersion(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) private Fileprivate FilegetSnapshotFile(FlowRegistryClientConfigurationContext context, String bucketId, String flowId, long version) protected List<PropertyDescriptor> private PathbooleanisStorageLocationApplicable(FlowRegistryClientConfigurationContext context, String storageLocation) private voidpopulateBucket(RegisteredFlowSnapshot snapshot, String bucketId) private voidpopulateFlow(RegisteredFlowSnapshot snapshot, String bucketId, String flowId, int version, int numVersions) registerFlow(FlowRegistryClientConfigurationContext context, RegisteredFlow flow) registerFlowSnapshot(FlowRegistryClientConfigurationContext context, RegisteredFlowSnapshot flowSnapshot) private 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, validate
-
Field Details
-
TEST_FLOWS_BUCKET
- See Also:
-
FLOW_IDS
-
objectMapper
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
DIRECTORY
-
-
Constructor Details
-
FileSystemFlowRegistryClient
public FileSystemFlowRegistryClient()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classAbstractConfigurableComponent
-
isStorageLocationApplicable
public boolean isStorageLocationApplicable(FlowRegistryClientConfigurationContext context, String storageLocation) -
getBuckets
public Set<FlowRegistryBucket> getBuckets(FlowRegistryClientConfigurationContext context) throws IOException - Throws:
IOException
-
toBucket
-
getRootDirectory
-
getBucket
public FlowRegistryBucket getBucket(FlowRegistryClientConfigurationContext context, String bucketId) -
registerFlow
public RegisteredFlow registerFlow(FlowRegistryClientConfigurationContext context, RegisteredFlow flow) throws IOException - Throws:
IOException
-
deregisterFlow
public RegisteredFlow deregisterFlow(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws IOException - Throws:
IOException
-
getFlow
public RegisteredFlow getFlow(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) -
getFlows
public Set<RegisteredFlow> getFlows(FlowRegistryClientConfigurationContext context, String bucketId) throws IOException - Throws:
IOException
-
getFlowContents
public RegisteredFlowSnapshot getFlowContents(FlowRegistryClientConfigurationContext context, String bucketId, String flowId, int version) throws IOException - Throws:
IOException
-
populateBucket
-
populateFlow
private void populateFlow(RegisteredFlowSnapshot snapshot, String bucketId, String flowId, int version, int numVersions) -
registerFlowSnapshot
public RegisteredFlowSnapshot registerFlowSnapshot(FlowRegistryClientConfigurationContext context, RegisteredFlowSnapshot flowSnapshot) throws IOException - Throws:
IOException
-
fullyPopulate
-
createAllowAllPermissions
-
getFlowVersions
public Set<RegisteredFlowSnapshotMetadata> getFlowVersions(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws IOException - Throws:
IOException
-
getLatestVersion
public int getLatestVersion(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws IOException - Throws:
IOException
-
getSnapshotFile
private File getSnapshotFile(FlowRegistryClientConfigurationContext context, String bucketId, String flowId, long version) -
getFlowDirectory
private File getFlowDirectory(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) -
getChildLocation
-
getFlowPath
-
getValidatedBucketPath
-