Class ExecutionContextPopulator


  • public class ExecutionContextPopulator
    extends Object
    Service for automatically updating missing details in Job, Project and CustomField instances from environment variables
    • Constructor Detail

      • ExecutionContextPopulator

        public ExecutionContextPopulator()
    • Method Detail

      • populateMissingJobPropertiesFromEnvVariables

        public static Job populateMissingJobPropertiesFromEnvVariables​(Job src)
        Returns a new Job with the same properties as the given source. If the source is missing some properties then this method will try to get values for them based on well-defined environment variable names.
        Parameters:
        src - job source
        Returns:
        New job based on the given source. Properties that are missing in the source job are read from system variables and populated in the returned value. Returns null if the interpolated job name is empty
      • populateMissingProjectPropertiesFromEnvVariables

        public static Project populateMissingProjectPropertiesFromEnvVariables​(Project src)
        Returns a new Project with the same properties as the given source. If the source is missing some properties then this method will try to get values for them based on well-defined environment variable names.
        Parameters:
        src - project source
        Returns:
        New project based on the given source. Properties that are missing in the source project are read from system variables and populated in the returned value. Returns null if the interpolated project name is empty
      • populateMissingCustomFieldsPropertiesFromEnvVariables

        public static Set<CustomField> populateMissingCustomFieldsPropertiesFromEnvVariables​(Set<CustomField> src)
        Returns a new Set<CustomField> with both properties as the given source and processed values from a set of predefined environment variables. If the source is missing some properties then this method will try to get values for them based on well-defined environment variable names. In case of name duplication the src will be preferred.
        Parameters:
        src - Set<CustomField>
        Returns:
        new Set<CustomField> based on both give src and env variables