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,FullyNamed,FullyNamedModelObject,Loadable,ModelObjectWithChildren,ModelObjectWithContextMenu,Named,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.BasicJobDetailFactory, Job.BuildNumberAssigner, Job.DefaultBuildNumberAssigner, Job.LastItemListener, Job.SubItemBuildsLocationImplNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface org.kohsuke.stapler.HttpDeletable
org.kohsuke.stapler.HttpDeletable.HttpDeletableDispatcherNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanIn 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.AllRuns.Fields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, propertiesFields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_getRuns()Gets all the runs.booleanReturns true if we should display "build now" iconvoidCalled right after when aItemis loaded from disk.protected abstract voidreload()Reloads the list ofRuns.voidCalled fromRunto remove it from this job.protected voidsubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Derived class can override this to perform additional config submission work.protected voidsubmit(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, getEnvironment, getEstimatedDuration, getEstimatedDurationCandidates, getFirstBuild, getIconColor, getJobTabs, getLastBuild, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNearestBuild, getNearestOldBuild, getNewBuilds, getNextBuildNumber, getOverrides, getParametersDefinitionProperty, getPermalinks, getPronoun, getProperties, getProperty, getProperty, getQueueItem, getSearchIcon, getTimeline, isBuilding, isHoldOffBuildUntilSave, isInQueue, isKeepDependencies, isLogUpdated, isNameEditable, logRotate, makeSearchIndex, movedTo, onCopiedFrom, removeProperty, removeProperty, renameTo, save, saveNextBuildNumber, setBuildDiscarder, setLogRotator, supportsLogRotator, updateNextBuildNumberMethods 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, writeReplaceMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgetsMethods inherited from interface hudson.model.Item
getRelativeNameFrom, getRelativeNameFrom, getSearchGroup, onCreatedFromScratchMethods inherited from interface hudson.search.SearchableModelObject
getSearchMethods inherited from interface hudson.search.SearchItem
getSearchIndex
-
Field Details
-
runs
AllRuns. 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:JobReturns true if we should display "build now" icon -
onLoad
Description copied from class:AbstractItemCalled right after when aItemis loaded from disk. This is an opportunity to do a post load processing.- Specified by:
onLoadin interfaceItem- Overrides:
onLoadin classJob<JobT extends ViewJob<JobT,RunT>, RunT extends Run<JobT, RunT>> - Parameters:
name- Name of the directory (not a path --- just the name portion) from which the configuration was loaded. This usually becomes thenameof this item.- Throws:
IOException
-
_getRuns
Description copied from class:JobGets 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:JobDerived 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.
-