Package hudson.plugins.nested_view
Class NestedView
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.View
hudson.plugins.nested_view.NestedView
- All Implemented Interfaces:
ExtensionPoint,Describable<View>,DescriptorByNameOwner,ModelObject,Saveable,ViewGroup,SearchableModelObject,SearchItem,AccessControlled,ModelObjectWithChildren,ModelObjectWithContextMenu,HasWidgets,org.kohsuke.stapler.StaplerProxy
public class NestedView
extends View
implements ViewGroup, org.kohsuke.stapler.StaplerProxy, ModelObjectWithContextMenu
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 Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic final classstatic classContainer for HealthReport with two methods matching hudson.model.Job so we can pass this to f:healthReport jelly.classHandle owner attributeNested classes/interfaces inherited from class hudson.model.View
View.PropertyListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
Fields inherited from class hudson.model.View
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, NEW_PRONOUN, owner, PERMISSIONS, READ, SORTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancontains(TopLevelItem item) voiddeleteView(View view) doCheckViewName(String value) Checks if a nested view with the given name exists and make sure that the name is good as a view name.doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) org.kohsuke.stapler.HttpResponsedoConfigDotXml(org.kohsuke.stapler.StaplerRequest2 req) doContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) doCreateItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) voiddoCreateView(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) doViewExistsCheck(String value) Checks if a nested view with the given name exists.Returns the health of this nested view.ItemGroup<? extends TopLevelItem>getItems()getUrl()Returns the health of a view, wether it is a normal or a nested one.getViews()Returns the worst result for this nested view.static ResultReturns the worst result for a view, wether is a normal view or a nested one.booleanvoidonJobRenamed(Item item, String oldName, String newName) voidonViewRenamed(View view, String oldName, String newName) voidsave()protected voidsubmit(org.kohsuke.stapler.StaplerRequest2 req) voidupdateByXml(Source source) Updates View by its XML definition.Methods inherited from class hudson.model.View
all, allInstantiable, create, create, createViewFromXML, doCheckJobName, doConfigDotXml, doConfigSubmit, doCreateItem, doDoDelete, doItemCategories, doRssAll, doRssFailed, doRssLatest, doSubmitDescription, doSubmitDescription, getAbsoluteUrl, getACL, getActions, getAllItems, getAllProperties, getApi, getApplicablePropertyDescriptors, getApproximateQueueItemsQuickly, getBuilds, getColumns, getComputers, getDescription, getDescriptor, getDisplayName, getDynamic, getIndenter, getItem, getItemCreatePermission, getJob, getNewPronoun, getOwner, getOwnerItemGroup, getOwnerPrimaryView, getOwnerViewActions, getPostConstructLandingPage, getProperties, getQueueItems, getSearchUrl, getTimeline, getViewName, getViewUrl, getVisiblePropertyDescriptors, isAutomaticRefreshEnabled, isDefault, isEditable, isFilterExecutors, isFilterQueue, makeSearchIndex, makeSearchIndex, registerPermissions, rename, setDescription, setFilterExecutors, setFilterQueue, submit, toString, updateTransientActions, writeXmlMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, 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, getACL, hasAnyPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface jenkins.widgets.HasWidgets
getWidget, getWidgetsMethods inherited from interface hudson.model.ModelObject
getDisplayNameMethods inherited from interface jenkins.model.ModelObjectWithChildren
doChildrenContextMenuMethods inherited from interface jenkins.model.ModelObjectWithContextMenu
doContextMenuMethods inherited from interface hudson.model.ViewGroup
getAllViews
-
Constructor Details
-
NestedView
-
-
Method Details
-
getItems
-
hasPermission
- Specified by:
hasPermissionin interfaceAccessControlled
-
contains
-
doContextMenu
public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) throws IOException, org.apache.commons.jelly.JellyException - Specified by:
doContextMenuin interfaceModelObjectWithContextMenu- Throws:
IOExceptionorg.apache.commons.jelly.JellyException
-
doChildrenContextMenu
public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) throws Exception - Specified by:
doChildrenContextMenuin interfaceModelObjectWithChildren- Overrides:
doChildrenContextMenuin classView- Throws:
Exception
-
getUrl
-
getPrimaryView
- Specified by:
getPrimaryViewin interfaceViewGroup
-
getItemGroup
- Specified by:
getItemGroupin interfaceViewGroup
-
getViewActions
- Specified by:
getViewActionsin interfaceViewGroup
-
doCreateItem
public Item doCreateItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException - Overrides:
doCreateItemin classView- Throws:
IOExceptionjakarta.servlet.ServletException
-
doCheckViewName
Checks if a nested view with the given name exists and make sure that the name is good as a view name. -
doViewExistsCheck
Checks if a nested view with the given name exists. -
onJobRenamed
- Overrides:
onJobRenamedin classView
-
submit
protected void submit(org.kohsuke.stapler.StaplerRequest2 req) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException - Overrides:
submitin classView- Throws:
IOExceptionjakarta.servlet.ServletExceptionDescriptor.FormException
-
canDelete
-
deleteView
- Specified by:
deleteViewin interfaceViewGroup- Throws:
IOException
-
getViews
-
getView
-
getDefaultView
-
getColumnsToShow
-
onViewRenamed
- Specified by:
onViewRenamedin interfaceViewGroup
-
save
- Specified by:
savein interfaceSaveable- Overrides:
savein classView- Throws:
IOException
-
doCreateView
public void doCreateView(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException - Throws:
IOExceptionjakarta.servlet.ServletExceptionDescriptor.FormException
-
getImage
-
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_RESULTwill be found as quick as possible, as mentionned previously. -
getWorstResult
Returns the worst result for a view, wether is a normal view or a nested one.- See Also:
-
getWorstResult()getWorstResultForNormalView(hudson.model.View)
-
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.
-
doConfigDotXml
@WebMethod(name="config.xml") public org.kohsuke.stapler.HttpResponse doConfigDotXml(org.kohsuke.stapler.StaplerRequest2 req) throws IOException - Overrides:
doConfigDotXmlin classView- Throws:
IOException
-
updateByXml
Updates View by its XML definition.- Overrides:
updateByXmlin classView- Throws:
IOException
-
getViewHealth
Returns the health of a view, wether it is a normal or a nested one.- See Also:
-
getHealth()getHealthForNormalView(hudson.model.View)
-
getViewsTabBar
- Specified by:
getViewsTabBarin interfaceViewGroup
-
getTarget
- Specified by:
getTargetin interfaceorg.kohsuke.stapler.StaplerProxy
-