hudson.model
Class RadiatorView

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.View
          extended by hudson.model.ListView
              extended by hudson.model.RadiatorView
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.model.View>, hudson.model.ModelObject, hudson.model.Saveable, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled

public class RadiatorView
extends hudson.model.ListView

A configurable Radiator-Style job view suitable for use in extreme feedback systems - ideal for running on a spare PC in the office. Many thanks to Julien Renaut for the xfpanel plugin that inspired some of the updates to this view.

Author:
Mark Howard (mh@tildemh.com)

Nested Class Summary
static class RadiatorView.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.model.View
hudson.model.View.People, hudson.model.View.UserInfo
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.View
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, owner, PERMISSIONS, SORTER
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
RadiatorView(java.lang.String name, java.lang.Boolean showStable, java.lang.Boolean showStableDetail, java.lang.Boolean highVis)
           
 
Method Summary
 ViewEntryColors getColors()
           
 java.lang.Boolean getHighVis()
           
 java.util.List<hudson.model.TopLevelItem> getItems()
           
static hudson.model.Result getResult(hudson.model.Job job)
           
 java.lang.Boolean getShowStable()
           
 java.lang.Boolean getShowStableDetail()
           
 java.util.Collection<ViewEntry> sortFailing(java.util.Collection<hudson.model.Job> jobs)
           
 java.util.Collection<ViewEntry> sortPassing(java.util.Collection<hudson.model.Job> jobs)
          Filters the jobs for stable jobs and sorts them.
protected  void submit(org.kohsuke.stapler.StaplerRequest req)
          Gets from the request the configuration parameters
 java.util.Collection<java.util.Collection<ViewEntry>> toRows(java.util.Collection<ViewEntry> jobs, java.lang.Boolean failingJobs)
          Converts a list of jobs to a list of list of jobs, suitable for display as rows in a table.
 
Methods inherited from class hudson.model.ListView
contains, doCreateItem, getActions, getColumns, getDefaultColumns, getIncludeRegex, initColumns, onJobRenamed, save
 
Methods inherited from class hudson.model.View
all, checkPermission, create, doConfigSubmit, doDoDelete, doRssAll, doRssFailed, doRssLatest, doSubmitDescription, getAbsoluteUrl, getACL, getApi, getBuilds, getComputers, getDescription, getDescriptor, getDisplayName, getItem, getItemCreatePermission, getJob, getOwner, getPeople, getPostConstructLandingPage, getQueueItems, getSearchUrl, getUrl, getViewName, getViewUrl, getWidgets, hasPeople, hasPermission, isDefault, isEditable, isFilterExecutors, isFilterQueue, makeSearchIndex, rename
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadiatorView

@DataBoundConstructor
public RadiatorView(java.lang.String name,
                                         java.lang.Boolean showStable,
                                         java.lang.Boolean showStableDetail,
                                         java.lang.Boolean highVis)
Parameters:
name - view name.
showStable - if stable builds should be shown.
showStableDetail - if detail should be shown for stable builds.
highVis - high visibility mode.
Method Detail

getColors

public ViewEntryColors getColors()
Returns:
the colors to use

getItems

public java.util.List<hudson.model.TopLevelItem> getItems()
Overrides:
getItems in class hudson.model.ListView

sortPassing

public java.util.Collection<ViewEntry> sortPassing(java.util.Collection<hudson.model.Job> jobs)
Filters the jobs for stable jobs and sorts them.

Parameters:
jobs - all jobs
Returns:
sorted list of stable jobs.

submit

protected void submit(org.kohsuke.stapler.StaplerRequest req)
               throws javax.servlet.ServletException,
                      hudson.model.Descriptor.FormException
Gets from the request the configuration parameters

Overrides:
submit in class hudson.model.ListView
Parameters:
req - StaplerRequest
Throws:
javax.servlet.ServletException - if any
hudson.model.Descriptor.FormException - if any

getShowStable

public java.lang.Boolean getShowStable()

getShowStableDetail

public java.lang.Boolean getShowStableDetail()

getHighVis

public java.lang.Boolean getHighVis()

sortFailing

public java.util.Collection<ViewEntry> sortFailing(java.util.Collection<hudson.model.Job> jobs)

toRows

public java.util.Collection<java.util.Collection<ViewEntry>> toRows(java.util.Collection<ViewEntry> jobs,
                                                                    java.lang.Boolean failingJobs)
Converts a list of jobs to a list of list of jobs, suitable for display as rows in a table.

Parameters:
jobs - the jobs to include.
failingJobs - if this is a list of failing jobs, in which case fewer jobs should be used per row.
Returns:
a list of fixed size view entry lists.

getResult

public static hudson.model.Result getResult(hudson.model.Job job)


Copyright © 2010. All Rights Reserved.