Package hudson.model

Interface ViewGroup

    • Method Detail

      • canDelete

        boolean canDelete​(View view)
        Determine whether a view may be deleted.
        Since:
        1.365
      • 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 the ViewGroup (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 the ItemGroup from which the views in this group should render items.

        Generally speaking, Views render a subset of TopLevelItems 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()