Package hudson.model
Interface ViewGroup
- All Superinterfaces:
AccessControlled
,ModelObject
,Saveable
- All Known Subinterfaces:
ModifiableViewGroup
- All Known Implementing Classes:
AbstractCIBase
,Hudson
,Jenkins
,MyViewsProperty
Container of
View
s.- Since:
- 1.269
- Author:
- Kohsuke Kawaguchi
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine whether a view may be deleted.void
deleteView
(View view) Deletes a view in this group.default Collection<View>
Gets all the views in this group including nested views.default ItemGroup<? extends TopLevelItem>
Returns theItemGroup
from which the views in this group should render items.default View
If the view group renders one view in its own URL (like Jenkins top page does), then that view is called the primary view.getUrl()
Returns the path of this group, relative to the context root, like "foo/bar/zot/".Gets a view of the given name.Returns actions that should be displayed in views.getViews()
Gets all the views in this group.Gets the TabBar for the views.void
onViewRenamed
(View view, String oldName, String newName) View
calls this method when it's renamed.Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, getACL, hasAnyPermission, hasPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.ModelObject
getDisplayName
-
Method Details
-
canDelete
Determine whether a view may be deleted.- Since:
- 1.365
-
deleteView
Deletes a view in this group.- Throws:
IOException
-
getViews
Collection<View> getViews()Gets all the views in this group.- Returns:
- can be empty but never null.
-
getAllViews
Gets all the views in this group including nested views.- Returns:
- can be empty but never null.
- Since:
- 2.174
-
getView
Gets a view of the given name. This also creates the URL binding for views (in the form of ".../view/FOOBAR/...") -
getPrimaryView
If the view group renders one view in its own URL (like Jenkins top page does), then that view is called the primary view. In this case, the hyperlink to the primary view points to the view group itself.If the view group doesn't do such rendering, this method can always return null.
- Returns:
- by default, null
- Since:
- 1.417
-
getUrl
String getUrl()Returns the path of this group, relative to the context root, like "foo/bar/zot/". Note no leading slash but trailing slash. -
onViewRenamed
View
calls this method when it's renamed. This method is intended to work as a notification to theViewGroup
(so that it can adjust its internal data structure, for example.)It is the caller's responsibility to ensure that the new name is a legal view name.
-
getViewsTabBar
ViewsTabBar getViewsTabBar()Gets the TabBar for the views. TabBar for views can be provided by extension. Only one TabBar can be active at a given time (Selectable by user in the global Configuration page). Default TabBar is provided by Hudson Platform.- Since:
- 1.381
-
getItemGroup
Returns theItemGroup
from which the views in this group should render items.Generally speaking, Views render a subset of
TopLevelItem
s that belong to this item group.- Returns:
- Never null. Sometimes this is
ModifiableItemGroup
(if the container allows arbitrary addition). By default,Jenkins.get()
. - Since:
- 1.417
-
getViewActions
Returns actions that should be displayed in views.In this interface, the return value is used read-only. This doesn't prevent subtypes from returning modifiable actions, however.
- Returns:
- may be empty but never null;
Jenkins.getActions()
by default - Since:
- 1.417
- See Also:
-