public final class ConfigurationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static List<ConfigProperty> |
getConfiguration(Scope scope)
Gets all global configuration properties filtered by the specified scope.
|
static Properties |
loadProperties(InputStream stream) |
static Properties |
loadPropertiesFromFile(String filePath)
Loads properties from the given file.
|
static Properties |
loadPropertiesFromResource(URL resource)
Loads properties from a resource.
|
static boolean |
masterHostConfigured() |
static String |
searchPropertiesFile(String propertiesFile,
String[] confPathList)
Searches the given properties file from a list of paths.
|
static String |
valueAsString(String value) |
@Nullable public static Properties loadPropertiesFromResource(URL resource)
resource
- url of the properties file@Nullable public static Properties loadPropertiesFromFile(String filePath)
filePath
- the absolute path of the file to load properties@Nullable public static Properties loadProperties(InputStream stream)
stream
- the stream to read properties from@Nullable public static String searchPropertiesFile(String propertiesFile, String[] confPathList)
propertiesFile
- the file to load propertiesconfPathList
- a list of paths to search the propertiesFilepublic static boolean masterHostConfigured()
public static List<ConfigProperty> getConfiguration(Scope scope)
scope
- the scope to filter byCopyright © 2023. All Rights Reserved.