Class LegacyJobConfigMigrationMonitor

java.lang.Object
hudson.model.AbstractModelObject
hudson.model.AdministrativeMonitor
hudson.plugins.copyartifact.monitor.LegacyJobConfigMigrationMonitor
All Implemented Interfaces:
ExtensionPoint, ModelObject, Saveable, SearchableModelObject, SearchItem, org.kohsuke.stapler.StaplerProxy

@Extension @Symbol("copyArtifactLegacyJobConfigMigration") public class LegacyJobConfigMigrationMonitor extends AdministrativeMonitor implements Saveable
Monitor the list of legacy job configuration that require administrator attention
Since:
1.44
  • Field Details

  • Constructor Details

    • LegacyJobConfigMigrationMonitor

      public LegacyJobConfigMigrationMonitor()
      ctor.
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface ModelObject
      Overrides:
      getDisplayName in class AdministrativeMonitor
    • isActivated

      public boolean isActivated()
      Specified by:
      isActivated in class AdministrativeMonitor
    • load

      public void load()
      Load recorded warnings from serialized data.
    • save

      public void save()
      Save recorded warnings to the file.
      Specified by:
      save in interface Saveable
      See Also:
    • getConfigXml

      @NonNull public static XmlFile getConfigXml()
      Returns:
      the path of the xml file to save warnings.
    • getAllJobInformation

      @NonNull @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public List<LegacyMonitorData.LegacyBuildInfoModel> getAllJobInformation()
      Used by Jelly
      Returns:
      the list of the source and destination jobs to warn.
    • addLegacyJob

      public void addLegacyJob(@NonNull Job<?,?> jobTryingToCopy, @NonNull Job<?,?> jobToBeCopiedFrom, @NonNull Date lastBuildDate, @NonNull String username)
      Add information of the source job and destination job that would fail in Production mode.
      Parameters:
      jobTryingToCopy - the destination job.
      jobToBeCopiedFrom - the source job.
      lastBuildDate - the build timestamp.
      username - the user name the destination job ran as.
    • removeLegacyJob

      public void removeLegacyJob(@NonNull Job<?,?> jobTryingToCopy, @NonNull Job<?,?> jobToBeCopiedFrom)
      Remove information of the source job and destination job that would fail in Production mode.
      Parameters:
      jobTryingToCopy - the destination job.
      jobToBeCopiedFrom - the source job.
    • doIgnoreAllSelected

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public org.kohsuke.stapler.HttpResponse doIgnoreAllSelected(@JsonBody LegacyJobConfigMigrationMonitor.MigrateAllSelectedModel content)
      Called from jelly (stapler). Ignore selected items.
      Parameters:
      content - selected items.
      Returns:
      the response.
    • doMigrateAllSelected

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public org.kohsuke.stapler.HttpResponse doMigrateAllSelected(@JsonBody LegacyJobConfigMigrationMonitor.MigrateAllSelectedModel content)
      Called from jelly (stapler). Apply automatic migrations to selected items. Add CopyArtifactPermissionProperty to the source jobs.
      Parameters:
      content - selected items.
      Returns:
      the response.
    • get

      @NonNull public static LegacyJobConfigMigrationMonitor get()
      Returns:
      the singleton instance.
    • doHelpDetailedSteps

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public void doHelpDetailedSteps(org.kohsuke.stapler.StaplerResponse rsp) throws IOException
      Called from jelly (stapler). Returns the contents of help-detailedSteps.html
      Parameters:
      rsp - to write contents to.
      Throws:
      IOException - servlet communication errors.