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.LastItemListener
ExtensionPoint.LegacyInstancesAreScopedToHudson
ModelObjectWithContextMenu.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
Run s. |
HISTORY_ADAPTER, nextBuildNumber, properties
description, 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
Run s. |
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, movedTo, onCopiedFrom, performDelete, removeProperty, removeProperty, renameTo, save, saveNextBuildNumber, setBuildDiscarder, setLogRotator, supportsLogRotator, updateNextBuildNumber
checkPermission, 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, updateByXml
addAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, replaceAction
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDisplayName
getSearch
getSearchIndex
protected transient RunMap<RunT extends Run<JobT,RunT>> runs
Run
s. 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()
Job
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException
AbstractItem
Item
is loaded from disk.
This is an opportunity to do a post load processing.onLoad
in interface Item
onLoad
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.IOException
protected SortedMap<Integer,RunT> _getRuns()
Job
protected abstract void reload()
protected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException
Job
Copyright © 2015. All rights reserved.