Class Resolve


  • public final class Resolve
    extends Object
    Container class for static methods that resolve form entries with typical form data, for use in Jenkins doCheckFoo methods.
    Author:
    Matt Moore
    • 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 string
        customEnvironment - 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 string
        customEnvironment - The sample variable values to resolve
        Returns:
        the string with substitutions made for variables.