public class BootstrapProperties extends StandardReadableProperties
| Modifier and Type | Class and Description |
|---|---|
static class |
BootstrapProperties.BootstrapPropertyKey |
| Modifier and Type | Field and Description |
|---|---|
private Path |
configFilePath |
static BootstrapProperties |
EMPTY
An empty instance of BootstrapProperties.
|
private static String |
PROPERTY_KEY_FORMAT |
private String |
propertyPrefix |
| Constructor and Description |
|---|
BootstrapProperties(String propertyPrefix,
Properties properties,
Path configFilePath) |
| Modifier and Type | Method and Description |
|---|---|
private void |
filterProperties(Properties properties)
Includes only the properties starting with the propertyPrefix.
|
Path |
getConfigFilePath()
Returns the path to the bootstrap config file.
|
Optional<String> |
getProperty(BootstrapProperties.BootstrapPropertyKey key)
Returns the optional property value with the given BootstrapPropertyKey.
|
String |
getProperty(String key)
Ensures that blank or empty properties are returned as null.
|
String |
getProperty(String key,
String defaultValue)
Ensures that blank or empty properties are returned as null.
|
private String |
getPropertyKey(String subKey) |
private static boolean |
isBlank(String string) |
String |
toString() |
getPropertyKeys, getRawProperties, sizeprivate static final String PROPERTY_KEY_FORMAT
private final String propertyPrefix
private final Path configFilePath
public static final BootstrapProperties EMPTY
public BootstrapProperties(String propertyPrefix, Properties properties, Path configFilePath)
public String getProperty(String key, String defaultValue)
getProperty in interface ReadablePropertiesgetProperty in class StandardReadablePropertieskey - The property keydefaultValue - The default value to use if the value is null or emptypublic String getProperty(String key)
getProperty in interface ReadablePropertiesgetProperty in class StandardReadablePropertieskey - The property keypublic Path getConfigFilePath()
private void filterProperties(Properties properties)
properties - Unfiltered propertiespublic Optional<String> getProperty(BootstrapProperties.BootstrapPropertyKey key)
key - A BootstrapPropertyKey, representing properties in bootstrap.confprivate static boolean isBlank(String string)
Copyright © 2023 Apache NiFi Project. All rights reserved.