Class PropertiesLoader
java.lang.Object
org.jenkinsci.plugins.envinject.service.PropertiesLoader
- All Implemented Interfaces:
Serializable
- Author:
- Gregory Boissinot
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetVarsFromPropertiesContent
(String content, Map<String, String> currentEnvVars) Get a map environment variables from the contentgetVarsFromPropertiesFile
(File propertiesFile, Map<String, String> currentEnvVars) Get environment variables from a properties file path
-
Constructor Details
-
PropertiesLoader
public PropertiesLoader()
-
-
Method Details
-
getVarsFromPropertiesFile
@NonNull public Map<String,String> getVarsFromPropertiesFile(@NonNull File propertiesFile, @NonNull Map<String, String> currentEnvVars) throws org.jenkinsci.lib.envinject.EnvInjectExceptionGet environment variables from a properties file path- Parameters:
propertiesFile
- the properties filecurrentEnvVars
- the current environment variables to resolve against- Returns:
- the environment variables
- Throws:
org.jenkinsci.lib.envinject.EnvInjectException
- Issue with content loading or processing
-
getVarsFromPropertiesContent
@NonNull public Map<String,String> getVarsFromPropertiesContent(@NonNull String content, @NonNull Map<String, String> currentEnvVars) throws org.jenkinsci.lib.envinject.EnvInjectExceptionGet a map environment variables from the content- Parameters:
content
- the properties content to parsecurrentEnvVars
- the current environment variables to resolve against- Returns:
- the environment variables
- Throws:
org.jenkinsci.lib.envinject.EnvInjectException
- Issue with content loading or processing
-