Class LegacyMonitorData
java.lang.Object
hudson.plugins.copyartifact.monitor.LegacyMonitorData
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class LegacyMonitorData
extends Object
Responsible of the data for the monitor.
Holds the jobs to warn about the failure in Production mode,
and also holds runtime information like names of source jobs.
- Since:
- 1.44
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
For Jelly display only Holds the information of the job to display.static class
The pair of the source job and the destination job.static class
For Jelly display only Holds information of a source job and destination jobs for that source job.static class
Data stored in the monitor Information about the build that would fail in Production mode.static class
For Jelly display only Holds information of the job and builds that would fail in Production mode. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLegacyJob
(Job<?, ?> jobTryingToCopy, Job<?, ?> jobToBeCopiedFrom, Date lastBuildDate, String username) Add information that would fail in Production mode.Helper to ease the display of the information in a tableboolean
hasJobFullName
(String jobFullName) Check a job is listed either as a source job or a destination job.boolean
isEmpty()
void
onJobRename
(String previousFullName, String newFullName) Apply the rename to the job list.boolean
removeLegacyJob
(String jobFullNameFrom, String jobFullNameTo) Remove information that would fail in Production mode.
-
Constructor Details
-
LegacyMonitorData
public LegacyMonitorData()ctor
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Returns:
true
if there're no jobs to warn.
-
hasJobFullName
Check a job is listed either as a source job or a destination job.- Parameters:
jobFullName
- the job name to check- Returns:
true
if that job is already listed.
-
onJobRename
Apply the rename to the job list.- Parameters:
previousFullName
- the previous name of the job.newFullName
- the new name of the job.
-
buildDataForCurrentUser
Helper to ease the display of the information in a table- Returns:
- the list of pairs of source and destination jobs to show warnings for that user.
-
addLegacyJob
public void addLegacyJob(@NonNull Job<?, ?> jobTryingToCopy, @NonNull Job<?, ?> jobToBeCopiedFrom, @NonNull Date lastBuildDate, @NonNull String username) Add information that would fail in Production mode.- Parameters:
jobTryingToCopy
- the name of the destination job.jobToBeCopiedFrom
- the name of the source job.lastBuildDate
- the build timestamp.username
- the user name that the destination job ran as.
-
removeLegacyJob
Remove information that would fail in Production mode.- Parameters:
jobFullNameFrom
- the name of the source job.jobFullNameTo
- the name of the destination job.- Returns:
true
if removed (the pair was registered).
-