Package hudson.model
Interface ViewGroup
-
- All Superinterfaces:
AccessControlled
,ModelObject
,Saveable
- All Known Subinterfaces:
ModifiableViewGroup
- All Known Implementing Classes:
AbstractCIBase
,Hudson
,Jenkins
,MyViewsProperty
public interface ViewGroup extends Saveable, ModelObject, AccessControlled
Container ofView
s.- Since:
- 1.269
- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
canDelete(View view)
Determine whether a view may be deleted.void
deleteView(View view)
Deletes a view in this group.default Collection<View>
getAllViews()
Gets all the views in this group including nested views.default ItemGroup<? extends TopLevelItem>
getItemGroup()
Returns theItemGroup
from which the views in this group should render items.default View
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.String
getUrl()
Returns the path of this group, relative to the context root, like "foo/bar/zot/".View
getView(String name)
Gets a view of the given name.default List<Action>
getViewActions()
Returns actions that should be displayed in views.Collection<View>
getViews()
Gets all the views in this group.ViewsTabBar
getViewsTabBar()
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 Detail
-
canDelete
boolean canDelete(View view)
Determine whether a view may be deleted.- Since:
- 1.365
-
deleteView
void deleteView(View view) throws IOException
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
@NonNull default Collection<View> getAllViews()
Gets all the views in this group including nested views.- Returns:
- can be empty but never null.
- Since:
- 2.174
-
getView
View getView(String name)
Gets a view of the given name. This also creates the URL binding for views (in the form of ".../view/FOOBAR/...")
-
getPrimaryView
default View 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
void onViewRenamed(View view, String oldName, String newName)
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
default ItemGroup<? extends TopLevelItem> 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
default List<Action> 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:
Actionable.getActions()
-
-