Package hudson.model

Interface ItemGroup<T extends Item>

    • Method Detail

      • getItems

        Collection<T> getItems()
        Gets all the items in this collection in a read-only view.
      • getItems

        default Collection<T> getItems​(Predicate<T> pred)
        Gets all the items in this collection in a read-only view that matches supplied Predicate
        Since:
        2.221
      • getItemsStream

        default Stream<T> getItemsStream()
        Gets a read-only stream of all the items in this collection
        Since:
        2.221
      • getItemsStream

        default Stream<T> getItemsStream​(Predicate<T> pred)
        Gets a read-only stream of all the items in this collection that matches supplied Predicate
        Since:
        2.221
      • getUrl

        String getUrl()
        Returns the path relative to the context root, like "foo/bar/zot/". Note no leading slash but trailing slash.
      • getUrlChildPrefix

        String getUrlChildPrefix()
        Gets the URL token that prefixes the URLs for child Items. Like "job", "item", etc.
      • getItem

        @CheckForNull
        T getItem​(String name)
           throws org.springframework.security.access.AccessDeniedException
        Gets the Item inside this group that has a given name, or null if it does not exist.
        Returns:
        an item whose Item.getName() is name and whose Item.getParent() is this, or null if there is no such item, or there is but the current user lacks both Item.DISCOVER and Item.READ on it
        Throws:
        org.springframework.security.access.AccessDeniedException - if the current user has Item.DISCOVER but not Item.READ on this item
      • onDeleted

        void onDeleted​(T item)
                throws IOException
        Internal method. Called by Items when they are deleted by users.
        Throws:
        IOException
      • getAllItems

        default <T extends ItemList<T> getAllItems​(Class<T> type)
        Gets all the Items recursively in the ItemGroup tree and filter them by the given type.
        Since:
        2.93
      • allItems

        default <T extends ItemIterable<T> allItems​(Class<T> type)
        Gets all the Items unordered, lazily and recursively in the ItemGroup tree and filter them by the given type.
        Since:
        2.93
      • allItems

        default <T extends ItemIterable<T> allItems​(Class<T> type,
                                                      Predicate<T> pred)
        Gets all the Items unordered, lazily and recursively in the ItemGroup tree and filter them by the given type and given predicate
        Since:
        2.221
      • getAllItems

        default List<Item> getAllItems()
        Gets all the items recursively.
        Since:
        2.93
      • allItems

        default Iterable<Item> allItems()
        Gets all the items unordered, lazily and recursively.
        Since:
        2.93