public class DirConfigSource extends PayaraConfigSource implements org.eclipse.microprofile.config.spi.ConfigSource
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DIR |
configService, domainConfiguration, PROPERTY_PREFIX| Constructor and Description |
|---|
DirConfigSource() |
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
int |
getOrdinal() |
Map<String,String> |
getProperties() |
Set<String> |
getPropertyNames() |
String |
getValue(String property) |
static boolean |
isAptDir(Path path)
Check path to be a directory, readable by us, but ignore if starting with a "."
(as done for K8s secrets mounts).
|
static boolean |
isAptFile(Path path,
BasicFileAttributes atts)
Check if the file exists (follows symlinks), is a regular file (following symlinks), is readable (following symlinks),
the filename does not start with a "." (not following the symlink!) and the file is less than 512 KB.
|
static String |
parsePropertyNameFromPath(Path path,
Path rootDir)
Parsing the relative path into a configuration property name.
|
public static final String DEFAULT_DIR
public Map<String,String> getProperties()
getProperties in interface org.eclipse.microprofile.config.spi.ConfigSourcepublic Set<String> getPropertyNames()
getPropertyNames in interface org.eclipse.microprofile.config.spi.ConfigSourcegetPropertyNames in class PayaraConfigSourcepublic int getOrdinal()
getOrdinal in interface org.eclipse.microprofile.config.spi.ConfigSourcepublic String getValue(String property)
getValue in interface org.eclipse.microprofile.config.spi.ConfigSourcepublic String getName()
getName in interface org.eclipse.microprofile.config.spi.ConfigSourcepublic static final boolean isAptDir(Path path) throws IOException
path - IOException - when path cannot be resolved, maybe because of a broken symlink.public static final boolean isAptFile(Path path, BasicFileAttributes atts) throws IOException
path - IOException - when path cannot be accessed or resolved etc.public static final String parsePropertyNameFromPath(Path path, Path rootDir)
path - The path to the property fileCopyright © 2021. All rights reserved.