Class PropertiesFileReader
java.lang.Object
org.codice.ddf.platform.util.properties.PropertiesFileReader
Useful for scanning a directory for properties files and aggregating the data into maps and
lists.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadPropertiesFilesInDirectory(String directoryPath) Deserializes all on-disk properties files in the given directory into a list of maps.loadSinglePropertiesFile(String filePath) Deserializes an on-disk properties file into a map.
-
Constructor Details
-
PropertiesFileReader
public PropertiesFileReader()
-
-
Method Details
-
loadPropertiesFilesInDirectory
Deserializes all on-disk properties files in the given directory into a list of maps.- Parameters:
directoryPath- the path to the directory of properties files- Returns:
- a list of maps holding the values of the properties files in the directory the given path pointed at, which can be empty if no properties were found.
-
loadSinglePropertiesFile
Deserializes an on-disk properties file into a map.- Parameters:
filePath- the path to the file of properties- Returns:
- a map of the values in the properties file the provided path pointed at, which can be empty if no properties were found.
-