@Tags(value="file") @CapabilityDescription(value="Fetches parameters from files. Parameter groups are indicated by a set of directories, and files within the directories map to parameter names. The content of the file becomes the parameter value.") @Restricted(restrictions=@Restriction(requiredPermission=READ_FILESYSTEM,explanation="Provides operator the ability to read from any file that NiFi has access to.")) public class FileParameterProvider extends AbstractParameterProvider implements VerifiableParameterProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
FileParameterProvider.MultiDirectoryExistsValidator |
private static class |
FileParameterProvider.ParameterValueEncoding |
| Modifier and Type | Field and Description |
|---|---|
private static AllowableValue |
BASE64_ENCODING |
private static Charset |
DEFAULT_CHARSET |
private static int |
MAX_SIZE_LIMIT |
static PropertyDescriptor |
PARAMETER_GROUP_DIRECTORIES |
static PropertyDescriptor |
PARAMETER_VALUE_BYTE_LIMIT |
static PropertyDescriptor |
PARAMETER_VALUE_ENCODING |
private static AllowableValue |
PLAIN_TEXT |
private List<PropertyDescriptor> |
properties |
| Constructor and Description |
|---|
FileParameterProvider() |
| Modifier and Type | Method and Description |
|---|---|
List<ParameterGroup> |
fetchParameters(ConfigurationContext context) |
private Collection<File> |
getDirectories(ConfigurationContext context,
PropertyDescriptor descriptor) |
private ParameterGroup |
getParameterGroup(ConfigurationContext context,
File directory,
String groupName) |
private String |
getParameterValue(String rawValue,
FileParameterProvider.ParameterValueEncoding encoding) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ParameterProviderInitializationContext config) |
List<ConfigVerificationResult> |
verify(ConfigurationContext context,
ComponentLog verificationLogger) |
getIdentifier, getLogger, getName, getNodeTypeProvider, initializecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate static final int MAX_SIZE_LIMIT
private static final Charset DEFAULT_CHARSET
private static final AllowableValue BASE64_ENCODING
private static final AllowableValue PLAIN_TEXT
public static final PropertyDescriptor PARAMETER_GROUP_DIRECTORIES
public static final PropertyDescriptor PARAMETER_VALUE_BYTE_LIMIT
public static final PropertyDescriptor PARAMETER_VALUE_ENCODING
private List<PropertyDescriptor> properties
protected void init(ParameterProviderInitializationContext config)
init in class AbstractParameterProviderprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic List<ParameterGroup> fetchParameters(ConfigurationContext context)
fetchParameters in interface ParameterProviderpublic List<ConfigVerificationResult> verify(ConfigurationContext context, ComponentLog verificationLogger)
verify in interface VerifiableParameterProviderprivate String getParameterValue(String rawValue, FileParameterProvider.ParameterValueEncoding encoding)
private Collection<File> getDirectories(ConfigurationContext context, PropertyDescriptor descriptor)
private ParameterGroup getParameterGroup(ConfigurationContext context, File directory, String groupName)
Copyright © 2023 Apache NiFi Project. All rights reserved.