Package hudson.model
Class ViewJob<JobT extends ViewJob<JobT,RunT>,RunT extends Run<JobT,RunT>>
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.model.AbstractItem
hudson.model.Job<JobT,RunT>
hudson.model.ViewJob<JobT,RunT>
- All Implemented Interfaces:
ExtensionPoint
,DescriptorByNameOwner
,Item
,ModelObject
,PersistenceRoot
,Saveable
,SearchableModelObject
,SearchItem
,AccessControlled
,Loadable
,ModelObjectWithChildren
,ModelObjectWithContextMenu
,OnMaster
,HasWidgets
,org.kohsuke.stapler.HttpDeletable
,org.kohsuke.stapler.StaplerOverridable
,org.kohsuke.stapler.StaplerProxy
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.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Job
Job.BuildNumberAssigner, Job.DefaultBuildNumberAssigner, Job.LastItemListener, Job.SubItemBuildsLocationImpl
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface org.kohsuke.stapler.HttpDeletable
org.kohsuke.stapler.HttpDeletable.HttpDeletableDispatcher
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
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.AllRun
s.Fields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, properties, runIdMigrator
Fields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_getRuns()
Gets all the runs.boolean
Returns true if we should display "build now" iconvoid
Called right after when aItem
is loaded from disk.protected abstract void
reload()
Reloads the list ofRun
s.void
Called fromRun
to remove it from this job.protected void
submit
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Derived class can override this to perform additional config submission work.protected void
submit
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.Methods inherited from class hudson.model.Job
addProperty, assignBuildNumber, checkRename, createHistoryWidget, delete, doBuildStatus, doChildrenContextMenu, doChildrenContextMenu, doConfigSubmit, doDescription, doDoRename, doRssAll, doRssChangelog, doRssFailed, fastUpdateNextBuildNumber, getACL, getAllJobs, getAllProperties, getBuild, getBuildByNumber, getBuildDir, getBuildDiscarder, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusIconClassName, getBuildStatusUrl, getBuildTimeGraph, getCharacteristicEnvVars, getDynamic, 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, getSearchIcon, getTimeline, isBuilding, isHoldOffBuildUntilSave, isInQueue, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, makeSearchIndex, movedTo, onCopiedFrom, onCreatedFromScratch, removeProperty, removeProperty, renameTo, save, saveNextBuildNumber, setBuildDiscarder, setLogRotator, supportsLogRotator, updateNextBuildNumber
Methods inherited from class hudson.model.AbstractItem
delete, delete, doCheckNewName, doConfigDotXml, doConfigDotXml, doConfirmRename, doDoDelete, doDoDelete, doReload, doSetName, doSubmitDescription, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getTarget, getTaskNoun, getUrl, load, performDelete, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml, writeConfigDotXml, writeReplace
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
Methods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgets
Methods inherited from interface hudson.model.Item
getRelativeNameFrom, getRelativeNameFrom
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
Methods inherited from interface hudson.search.SearchItem
getSearchIndex
-
Field Details
-
runs
AllRun
s. Copy-on-write semantics. -
reloadPeriodically
public static boolean reloadPeriodicallyIn 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.We then switched to submission via HTTP, so this reloading is no longer necessary, so only do this when explicitly requested.
-
-
Constructor Details
-
ViewJob
Deprecated.as of 1.390 -
ViewJob
-
-
Method Details
-
isBuildable
public boolean isBuildable()Description copied from class:Job
Returns true if we should display "build now" icon -
onLoad
Description copied from class:AbstractItem
Called right after when aItem
is loaded from disk. This is an opportunity to do a post load processing.- Specified by:
onLoad
in interfaceItem
- Overrides:
onLoad
in classJob<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 thename
of this item.- Throws:
IOException
-
_getRuns
Description copied from class:Job
Gets all the runs. The resulting map must be treated immutable (by employing copy-on-write semantics.) The map is descending order, with newest builds at the top. -
removeRun
Description copied from class:Job
-
reload
protected abstract void reload() -
submit
protected void submit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException Description copied from class:Job
Derived class can override this to perform additional config submission work. -
submit
@Deprecated protected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException Deprecated.
-