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> Jobthat 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 Jobtype.- Author:
- Kohsuke Kawaguchi
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class hudson.model.JobJob.LastItemListener, Job.SubItemBuildsLocationImpl
 - 
Nested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
 - 
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenuModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static booleanreloadPeriodicallyIn 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>runsAllRuns.- 
Fields inherited from class hudson.model.JobHISTORY_ADAPTER, nextBuildNumber, properties, runIdMigrator
 - 
Fields inherited from class hudson.model.AbstractItemdescription, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected SortedMap<Integer,RunT>_getRuns()Gets all the runs.booleanisBuildable()Returns true if we should display "build now" iconvoidonLoad(ItemGroup<? extends Item> parent, String name)Called right after when aItemis loaded from disk.protected abstract voidreload()Reloads the list ofRuns.voidremoveRun(RunT run)Called fromRunto remove it from this job.protected voidsubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Derived class can override this to perform additional config submission work.- 
Methods inherited from class hudson.model.JobaddProperty, assignBuildNumber, checkRename, createHistoryWidget, delete, doBuildStatus, 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, getLastBuild, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNearestBuild, getNearestOldBuild, getNewBuilds, getNextBuildNumber, getOverrides, getPermalinks, getPronoun, getProperties, getProperty, getProperty, getQueueItem, 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.AbstractItemdelete, doCheckNewName, doConfigDotXml, doConfirmRename, doDoDelete, doReload, doSetName, 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.ActionableaddAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActions
 - 
Methods inherited from class hudson.model.AbstractModelObjectgetSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface hudson.security.AccessControlledcheckAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
 - 
Methods inherited from interface hudson.model.DescriptorByNameOwnergetDescriptorByName
 - 
Methods inherited from interface jenkins.widgets.HasWidgetsgetWidget, getWidgets
 - 
Methods inherited from interface hudson.model.ItemgetRelativeNameFrom, getRelativeNameFrom
 - 
Methods inherited from interface hudson.search.SearchableModelObjectgetSearch
 - 
Methods inherited from interface hudson.search.SearchItemgetSearchIndex
 
- 
 
- 
- 
- 
Field Detail- 
runsprotected transient volatile RunMap<RunT extends Run<JobT,RunT>> runs AllRuns. Copy-on-write semantics.
 - 
reloadPeriodicallypublic 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.We then switched to submission via HTTP, so this reloading is no longer necessary, so only do this when explicitly requested. 
 
- 
 - 
Constructor Detail- 
ViewJob@Deprecated protected ViewJob(Jenkins parent, String name) Deprecated.as of 1.390
 
- 
 - 
Method Detail- 
isBuildablepublic boolean isBuildable() Description copied from class:JobReturns true if we should display "build now" icon
 - 
onLoadpublic void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException 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 interface- Item
- Overrides:
- onLoadin 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- nameof this item.
- Throws:
- IOException
 
 - 
_getRunsprotected SortedMap<Integer,RunT> _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.
 - 
reloadprotected abstract void reload() 
 - 
submitprotected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormExceptionDescription copied from class:JobDerived class can override this to perform additional config submission work.
 
- 
 
-