Class OldDataConverter

java.lang.Object
hudson.model.listeners.ItemListener
com.sonyericsson.jenkins.plugins.bfa.utils.OldDataConverter
All Implemented Interfaces:
ExtensionPoint

@Extension public final class OldDataConverter extends ItemListener
Converts old FoundIndications with line number info to the new format using line matcher.
Author:
Robert Sandell <robert.sandell@sonymobile.com>
  • Field Details

  • Constructor Details

    • OldDataConverter

      public OldDataConverter()
      Default Constructor. Should only be instantiated by Jenkins
  • Method Details

    • getInstance

      public static OldDataConverter getInstance()
      Retrieves the singleton instance from ItemListener.all(). If it is not found there an IllegalStateException will be thrown.
      Returns:
      the converter.
    • convertFoundIndications

      public void convertFoundIndications(Run build)
      Adds the provided build to the queue of builds to convert FoundIndications in, unless the conversion for that build is already in progress.
      Parameters:
      build - the build to convert.
    • convertMatrixBuildAction

      public void convertMatrixBuildAction(String matrixProjectName, FailureCauseMatrixBuildAction action)
      Convert FailureCauseMatrixBuildActions to use FailureCauseMatrixBuildAction.runIds instead of run instances during serialization. Will schedule the conversion until all items in Jenkins has been loaded.
      Parameters:
      action - the action to fix.
      matrixProjectName - the name of the matrix project.
    • onLoaded

      public void onLoaded()
      Overrides:
      onLoaded in class ItemListener
    • waitForInitialCompletion

      public void waitForInitialCompletion() throws InterruptedException
      Waits until there are no more running conversion tasks. Since builds are lazy loaded the returning of this method does not mean that all needed builds are converted, only those loaded before or during this method was invoked.
      Throws:
      InterruptedException - if so while sleeping