Package com.google.jenkins.plugins.util
Class Resolve
- java.lang.Object
-
- com.google.jenkins.plugins.util.Resolve
-
public final class Resolve extends Object
Container class for static methods that resolve form entries with typical form data, for use in JenkinsdoCheckFoo
methods.- Author:
- Matt Moore
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
resolveBuiltin(String input)
Replaces Jenkins build variables (e.g.static String
resolveBuiltinWithCustom(String input, Map<String,String> customEnvironment)
Replaces Jenkins build variables (e.g.static String
resolveCustom(String input, Map<String,String> customEnvironment)
Replaces a user's custom Jenkins variables (e.g.
-
-
-
Method Detail
-
resolveBuiltin
public static String resolveBuiltin(String input)
Replaces Jenkins build variables (e.g.$BUILD_NUMBER
) with sample values, so the result can be form-validated.- Parameters:
input
- The unresolved form input string- Returns:
- the string with substitutions made for built-in variables.
-
resolveBuiltinWithCustom
public static String resolveBuiltinWithCustom(String input, Map<String,String> customEnvironment)
Replaces Jenkins build variables (e.g.$BUILD_NUMBER
) and custom user variables (e.g.$foo
) with sample values, so the result can be form-validated.- Parameters:
input
- The unresolved form input stringcustomEnvironment
- The sample variable values to resolve- Returns:
- the string with substitutions made for built-in variables.
-
resolveCustom
public static String resolveCustom(String input, Map<String,String> customEnvironment)
Replaces a user's custom Jenkins variables (e.g.$foo
) with provided sample values, so the result can be form-validated.- Parameters:
input
- The unresolved form input stringcustomEnvironment
- The sample variable values to resolve- Returns:
- the string with substitutions made for variables.
-
-