public final class SecuredPropertiesUtils extends Object
SecuredProperties
.Modifier and Type | Method and Description |
---|---|
static Properties |
readProperties(File propertyFile)
Loads a
Properties object from a given Property File and transform checked
Exception into RuntimeExceptions. |
static void |
replaceSecretValue(File propertyFile,
org.apache.commons.lang3.tuple.Pair<String,String>... newProperties)
Replaces the value for one key in the given Properties file and leaves all other lines unchanged.
|
(package private) static String |
replaceValue(String line,
org.apache.commons.lang3.tuple.Pair<String,String>... newProperties) |
public static Properties readProperties(File propertyFile)
Properties
object from a given Property File
and transform checked
Exception into RuntimeExceptions.propertyFile
- the property FileProperties
object loaded by the propertyFile@SafeVarargs public static void replaceSecretValue(File propertyFile, org.apache.commons.lang3.tuple.Pair<String,String>... newProperties)
propertyFile
- The property File with the given KeynewProperties
- The new Property, where left is the key, and right is the new value.@SafeVarargs static String replaceValue(String line, org.apache.commons.lang3.tuple.Pair<String,String>... newProperties)
Copyright © 2016–2019 Brabenetz Harald, Austria. All rights reserved.