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
Nested ClassesModifier and TypeClassDescriptionstatic classFor Jelly display only Holds the information of the job to display.static classThe pair of the source job and the destination job.static classFor Jelly display only Holds information of a source job and destination jobs for that source job.static classData stored in the monitor Information about the build that would fail in Production mode.static classFor Jelly display only Holds information of the job and builds that would fail in Production mode. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLegacyJob(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 tablebooleanhasJobFullName(String jobFullName) Check a job is listed either as a source job or a destination job.booleanisEmpty()voidonJobRename(String previousFullName, String newFullName) Apply the rename to the job list.booleanremoveLegacyJob(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:
trueif 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:
trueif 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:
trueif removed (the pair was registered).
-