Class EnvScalarConstructor

    • Field Detail

      • ENV_TAG

        public static final Tag ENV_TAG
      • ENV_FORMAT

        public static final java.util.regex.Pattern ENV_FORMAT
    • Constructor Detail

      • EnvScalarConstructor

        public EnvScalarConstructor()
    • Method Detail

      • apply

        public java.lang.String apply​(java.lang.String name,
                                      java.lang.String separator,
                                      java.lang.String value,
                                      java.lang.String environment)
        Implement the logic for missing and unset variables
        Parameters:
        name - - variable name in the template
        separator - - separator in the template, can be :-, -, :?, ?
        value - - default value or the error in the template
        environment - - the value from environment for the provided variable
        Returns:
        the value to apply in the template
      • getEnv

        public java.lang.String getEnv​(java.lang.String key)
        Get value of the environment variable
        Parameters:
        key - - the name of the variable
        Returns:
        value or null if not set