public abstract class ViewJob<JobT extends ViewJob<JobT,RunT>,RunT extends Run<JobT,RunT>> extends Job<JobT,RunT>
Job that monitors activities that happen outside Hudson,
which requires occasional batch reload activity to obtain the up-to-date information.
This can be used as a base class to derive custom Job type.
Job.LastItemListenerExtensionPoint.LegacyInstancesAreScopedToHudsonModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem| Modifier and Type | Field and Description |
|---|---|
static boolean |
reloadPeriodically
In the very old version of Hudson, an external job submission was just creating files on the file system,
so we needed to periodically reload the jobs from a file system to pick up new records.
|
protected RunMap<RunT> |
runs
All
Runs. |
HISTORY_ADAPTER, nextBuildNumber, propertiesdescription, displayName, name, PRONOUN| Modifier | Constructor and Description |
|---|---|
protected |
ViewJob(ItemGroup parent,
String name) |
protected |
ViewJob(Jenkins parent,
String name)
Deprecated.
as of 1.390
|
| Modifier and Type | Method and Description |
|---|---|
protected SortedMap<Integer,RunT> |
_getRuns()
Gets all the runs.
|
boolean |
isBuildable()
Returns true if we should display "build now" icon
|
void |
onLoad(ItemGroup<? extends Item> parent,
String name)
Called right after when a
Item is loaded from disk. |
protected abstract void |
reload()
Reloads the list of
Runs. |
void |
removeRun(RunT run)
Called from
Run to remove it from this job. |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Derived class can override this to perform additional config submission
work.
|
addProperty, assignBuildNumber, createHistoryWidget, delete, doBuildStatus, doChildrenContextMenu, doConfigSubmit, doDescription, doDoRename, doRssAll, doRssFailed, getACL, getAllJobs, getAllProperties, getBuild, getBuildByNumber, getBuildDir, getBuildDiscarder, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusIconClassName, getBuildStatusUrl, getBuildTimeGraph, getCharacteristicEnvVars, getDynamic, getEnvironment, getEstimatedDuration, getEstimatedDurationCandidates, getFirstBuild, getIconColor, getLastBuild, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNearestBuild, getNearestOldBuild, getNewBuilds, getNextBuildNumber, getOverrides, getPermalinks, getPronoun, getProperties, getProperty, getProperty, getQueueItem, getTimeline, getWidgets, isBuilding, isHoldOffBuildUntilSave, isInQueue, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, makeSearchIndex, onCopiedFrom, performDelete, removeProperty, removeProperty, renameTo, save, saveNextBuildNumber, setBuildDiscarder, setLogRotator, supportsLogRotator, updateNextBuildNumbercheckPermission, delete, doConfigDotXml, doDoDelete, doReload, doSetName, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFrom, getRelativeNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getUrl, hasPermission, onCreatedFromScratch, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXmladdAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, replaceActiongetSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDisplayNamegetSearchgetSearchIndexprotected transient RunMap<RunT extends Run<JobT,RunT>> runs
Runs. Copy-on-write semantics.public static boolean reloadPeriodically
We then switched to submission via HTTP, so this reloading is no longer necessary, so only do this when explicitly requested.
public boolean isBuildable()
Jobpublic void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException
AbstractItemItem is loaded from disk.
This is an opportunity to do a post load processing.onLoad in interface ItemonLoad in class Job<JobT extends ViewJob<JobT,RunT>,RunT extends Run<JobT,RunT>>name - Name of the directory (not a path --- just the name portion) from
which the configuration was loaded. This usually becomes the
name of this item.IOExceptionprotected SortedMap<Integer,RunT> _getRuns()
Jobprotected abstract void reload()
protected void submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
Descriptor.FormException
JobCopyright © 2014. All rights reserved.