Class JobConfigMapping

java.lang.Object
org.jenkinsci.plugins.JiraTestResultReporter.JobConfigMapping

public class JobConfigMapping extends Object
Created by tuicu. Map from job name to configurations. A new publisher is created every time save/apply is clicked in the job config page, but the new configurations don't apply to previous build, so we need this map in order for all the publishers to be able to access the last configuration. Implemented as a singleton pattern. The map gets serialized every time a new configuration is added
  • Method Details

    • getInstance

      public static JobConfigMapping getInstance()
      Getter for the singleton instance
      Returns:
    • saveConfig

      public void saveConfig(Job project, String projectKey, Long issueType, List<AbstractFields> configs, boolean autoRaiseIssue, boolean autoResolveIssue, boolean autoUnlinkIssue, boolean overrideResolvedIssues, boolean additionalAttachments)
      Method for setting the last configuration made for a project
      Parameters:
      project -
      projectKey -
      issueType -
      configs -
    • saveConfig

      public void saveConfig(Job project, JobConfigMapping.JobConfigEntry entry)
      Method for setting the last configuration made for a project
    • getConfig

      public List<AbstractFields> getConfig(Job project)
      Getter for the last configured fields
      Parameters:
      project -
      Returns:
    • getIssueType

      public Long getIssueType(Job project)
      Getter for the last configured issue type
      Parameters:
      project -
      Returns:
    • getProjectKey

      public String getProjectKey(Job project)
      Getter for the last configured project key
      Parameters:
      project -
      Returns:
    • getAutoRaiseIssue

      public boolean getAutoRaiseIssue(Job project)
    • getOverrideResolvedIssues

      public boolean getOverrideResolvedIssues(Job project)
    • getAutoResolveIssue

      public boolean getAutoResolveIssue(Job project)
    • getAutoUnlinkIssue

      public boolean getAutoUnlinkIssue(Job project)
    • getAdditionalAttachments

      public boolean getAdditionalAttachments(Job project)
    • getIssueKeyPattern

      public Pattern getIssueKeyPattern(Job project)
      Getter for the issue key pattern, used to validate user input
      Parameters:
      project -
      Returns: