Package sonia.scm.web.cgi
Class EnvList
java.lang.Object
sonia.scm.web.cgi.EnvList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]
asArray()
Representation suitable for passing to exec.asMap()
Representation suitable for passing to process builder.Deprecated.boolean
containsKey
(String key) Returntrue
if the list contains an environment variable with the given key.String[]
Deprecated.useasArray()
insteadvoid
Set a name/value pair, null values will be treated as an empty StringtoString()
-
Constructor Details
-
EnvList
public EnvList() -
EnvList
-
-
Method Details
-
set
Set a name/value pair, null values will be treated as an empty String- Parameters:
name
- name of environment variablevalue
- value of environment variable
-
containsKey
Returntrue
if the list contains an environment variable with the given key.- Parameters:
key
- name of environment variable
-
asArray
Representation suitable for passing to exec.- Returns:
- array of environment variables
- Since:
- 2.12.0
-
asMap
Representation suitable for passing to process builder.- Returns:
- environment as immutable map
- Since:
- 2.12.0
-
toString
-
getEnvArray
Deprecated.useasArray()
insteadGet representation suitable for passing to exec.- Returns:
- array of environment variables
-
asMutableMap
Deprecated.the environment should only be modified byset(String, String)
. Of aMap
is required, a immutableMap
can be created withasMap()
.Returns environment as mutable map.- Returns:
- environment as mutable map
- Since:
- 1.31
-
set(String, String)
.