hudson.plugins.nested_view
Class NestedView
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.View
hudson.plugins.nested_view.NestedView
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.model.View>, hudson.model.ModelObject, hudson.model.Saveable, hudson.model.ViewGroup, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled, org.kohsuke.stapler.StaplerProxy
public class NestedView
- extends hudson.model.View
- implements hudson.model.ViewGroup, org.kohsuke.stapler.StaplerProxy
View type that contains only another set of views.
Allows grouping job views into multiple levels instead of one big list of tabs.
- Author:
- Alan Harder, Kohsuke Kawaguchi, Romain Seguy
| Nested classes/interfaces inherited from class hudson.model.View |
hudson.model.View.People, hudson.model.View.PropertyList, hudson.model.View.UserInfo |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Fields inherited from class hudson.model.View |
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, NEW_PRONOUN, owner, PERMISSIONS, SORTER, transientActions |
| Fields inherited from interface hudson.model.Saveable |
NOOP |
| Methods inherited from class hudson.model.View |
all, allInstantiable, checkPermission, create, doConfigSubmit, doDoDelete, doRssAll, doRssFailed, doRssLatest, doSubmitDescription, getAbsoluteUrl, getACL, getActions, getAllProperties, getApi, getApplicablePropertyDescriptors, getBuilds, getColumns, getComputers, getDescription, getDescriptor, getDisplayName, getDynamic, getIndenter, getItem, getItemCreatePermission, getJob, getNewPronoun, getOwner, getOwnerItemGroup, getOwnerPrimaryView, getOwnerViewActions, getPeople, getPostConstructLandingPage, getProperties, getQueueItems, getSearchUrl, getTimeline, 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 |
| Methods inherited from interface hudson.model.ViewGroup |
getUrl |
| Methods inherited from interface hudson.model.ModelObject |
getDisplayName |
| Methods inherited from interface hudson.security.AccessControlled |
checkPermission, getACL, hasPermission |
NestedView
@DataBoundConstructor
public NestedView(String name)
getItems
public List<hudson.model.TopLevelItem> getItems()
- Specified by:
getItems in class hudson.model.View
contains
public boolean contains(hudson.model.TopLevelItem item)
- Specified by:
contains in class hudson.model.View
getPrimaryView
public hudson.model.View getPrimaryView()
- Specified by:
getPrimaryView in interface hudson.model.ViewGroup
getItemGroup
public hudson.model.ItemGroup<? extends hudson.model.TopLevelItem> getItemGroup()
- Specified by:
getItemGroup in interface hudson.model.ViewGroup
getViewActions
public List<hudson.model.Action> getViewActions()
- Specified by:
getViewActions in interface hudson.model.ViewGroup
doCreateItem
public hudson.model.Item doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
- Specified by:
doCreateItem in class hudson.model.View
- Throws:
IOException
javax.servlet.ServletException
doViewExistsCheck
public hudson.util.FormValidation doViewExistsCheck(@QueryParameter
String value)
- Checks if a nested view with the given name exists.
onJobRenamed
public void onJobRenamed(hudson.model.Item item,
String oldName,
String newName)
- Specified by:
onJobRenamed in class hudson.model.View
submit
protected void submit(org.kohsuke.stapler.StaplerRequest req)
throws IOException,
javax.servlet.ServletException,
hudson.model.Descriptor.FormException
- Specified by:
submit in class hudson.model.View
- Throws:
IOException
javax.servlet.ServletException
hudson.model.Descriptor.FormException
canDelete
public boolean canDelete(hudson.model.View view)
- Specified by:
canDelete in interface hudson.model.ViewGroup
deleteView
public void deleteView(hudson.model.View view)
throws IOException
- Specified by:
deleteView in interface hudson.model.ViewGroup
- Throws:
IOException
getViews
@Exported
public Collection<hudson.model.View> getViews()
- Specified by:
getViews in interface hudson.model.ViewGroup
getView
public hudson.model.View getView(String name)
- Specified by:
getView in interface hudson.model.ViewGroup
getDefaultView
public hudson.model.View getDefaultView()
onViewRenamed
public void onViewRenamed(hudson.model.View view,
String oldName,
String newName)
- Specified by:
onViewRenamed in interface hudson.model.ViewGroup
save
public void save()
throws IOException
- Specified by:
save in interface hudson.model.Saveable- Overrides:
save in class hudson.model.View
- Throws:
IOException
doCreateView
public void doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
hudson.model.Descriptor.FormException
- Throws:
IOException
javax.servlet.ServletException
hudson.model.Descriptor.FormException
getWorstResult
public hudson.model.Result getWorstResult()
- Returns the worst result for this nested view.
To get the worst result, this method browses all the jobs this view
contains. Also, as soon as it finds the worst result possible (cf.
WORST_RESULT), the browsing stops.
The algorithm first analyzes normal views (that is, views which are
not nested ones); Then, in a second time, it processes nested views,
hoping that WORST_RESULT will be found as quick as possible, as
mentionned previously.
getWorstResult
public static hudson.model.Result getWorstResult(hudson.model.View v)
- Returns the worst result for a view, wether is a normal view or a nested
one.
- See Also:
getWorstResult(),
getWorstResultForNormalView(hudson.model.View)
getHealth
public NestedView.HealthReportContainer getHealth()
- Returns the health of this nested view.
Notice that, if a job is contained in several sub-views of the current
view, then it is taken into account only once to get accurate stats.
This algorithm has been derecursified, hence the stack stuff.
getViewHealth
public static NestedView.HealthReportContainer getViewHealth(hudson.model.View v)
- Returns the health of a view, wether it is a normal or a nested one.
- See Also:
getHealth(),
getHealthForNormalView(hudson.model.View)
getViewsTabBar
public hudson.views.ViewsTabBar getViewsTabBar()
- Specified by:
getViewsTabBar in interface hudson.model.ViewGroup
getTarget
public Object getTarget()
- Specified by:
getTarget in interface org.kohsuke.stapler.StaplerProxy
Copyright © 2004-2012. All Rights Reserved.