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 class
To keep track of the job rename that occurs while the application is runningstatic final class
Used from jelly (stapler) to hold a selected item.static final class
Used 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 TypeMethodDescriptionvoid
addLegacyJob
(Job<?, ?> jobTryingToCopy, Job<?, ?> jobToBeCopiedFrom, Date lastBuildDate, String username) Add information of the source job and destination job that would fail in Production mode.void
doHelpDetailedSteps
(org.kohsuke.stapler.StaplerResponse rsp) Called from jelly (stapler).org.kohsuke.stapler.HttpResponse
Called from jelly (stapler).org.kohsuke.stapler.HttpResponse
Called from jelly (stapler).get()
Used by Jellystatic XmlFile
boolean
void
load()
Load recorded warnings from serialized data.void
removeLegacyJob
(Job<?, ?> jobTryingToCopy, Job<?, ?> jobToBeCopiedFrom) Remove information of the source job and destination job that would fail in Production mode.void
save()
Save recorded warnings to the file.Methods inherited from class hudson.model.AdministrativeMonitor
all, disable, doDisable, getRequiredPermission, getSearchUrl, getTarget, getUrl, isEnabled, isSecurity
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
LegacyJobConfigMigrationMonitor
public LegacyJobConfigMigrationMonitor()ctor.
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
- Overrides:
getDisplayName
in classAdministrativeMonitor
-
isActivated
public boolean isActivated()- Specified by:
isActivated
in 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. AddCopyArtifactPermissionProperty
to 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.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.
-