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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classTo keep track of the job rename that occurs while the application is runningstatic final classUsed from jelly (stapler) to hold a selected item.static final classUsed from jelly (stapler) to hold selected items.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class hudson.model.AdministrativeMonitor
id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLegacyJob(Job<?, ?> jobTryingToCopy, Job<?, ?> jobToBeCopiedFrom, Date lastBuildDate, String username) Add information of the source job and destination job that would fail in Production mode.voiddoHelpDetailedSteps(org.kohsuke.stapler.StaplerResponse2 rsp) Called from jelly (stapler).org.kohsuke.stapler.HttpResponseCalled from jelly (stapler).org.kohsuke.stapler.HttpResponseCalled from jelly (stapler).get()Used by Jellystatic XmlFilebooleanvoidload()Load recorded warnings from serialized data.voidremoveLegacyJob(Job<?, ?> jobTryingToCopy, Job<?, ?> jobToBeCopiedFrom) Remove information of the source job and destination job that would fail in Production mode.voidsave()Save recorded warnings to the file.Methods inherited from class hudson.model.AdministrativeMonitor
all, checkRequiredPermission, disable, doDisable, getRequiredPermission, getSearchUrl, getTarget, getUrl, hasPermissionToDisplay, hasRequiredPermission, isEnabled, isSecurityMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendError
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
LegacyJobConfigMigrationMonitor
public LegacyJobConfigMigrationMonitor()ctor.
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classAdministrativeMonitor
-
isActivated
public boolean isActivated()- Specified by:
isActivatedin classAdministrativeMonitor
-
load
public void load()Load recorded warnings from serialized data. -
save
public void save()Save recorded warnings to the file. -
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
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. AddCopyArtifactPermissionPropertyto the source jobs.- Parameters:
content- selected items.- Returns:
- the response.
-
get
- Returns:
- the singleton instance.
-
doHelpDetailedSteps
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public void doHelpDetailedSteps(org.kohsuke.stapler.StaplerResponse2 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.
-