public interface ItemGroup<T extends Item> extends PersistenceRoot, ModelObject
Item
s.ItemGroupMixIn
Modifier and Type | Method and Description |
---|---|
default Iterable<Item> |
allItems()
Gets all the items unordered, lazily and recursively.
|
default <T extends Item> |
allItems(Class<T> type)
|
default <T extends Item> |
allItems(Class<T> type,
Predicate<T> pred)
|
default List<Item> |
getAllItems()
Gets all the items recursively.
|
default <T extends Item> |
getAllItems(Class<T> type)
|
default <T extends Item> |
getAllItems(Class<T> type,
Predicate<T> pred)
Similar to
getAllItems(Class) with additional predicate filtering |
String |
getFullDisplayName() |
String |
getFullName()
Gets the full name of this
ItemGroup . |
T |
getItem(String name)
Gets the
Item inside this group that has a given name, or null if it does not exist. |
Collection<T> |
getItems()
Gets all the items in this collection in a read-only view.
|
default Collection<T> |
getItems(Predicate<T> pred)
Gets all the items in this collection in a read-only view
that matches supplied Predicate
|
default Stream<T> |
getItemsStream()
Gets a read-only stream of all the items in this collection
|
default Stream<T> |
getItemsStream(Predicate<T> pred)
Gets a read-only stream of all the items in this collection
that matches supplied Predicate
|
File |
getRootDirFor(T child)
Assigns the
root directory for children. |
String |
getUrl()
Returns the path relative to the context root,
like "foo/bar/zot/".
|
String |
getUrlChildPrefix()
Gets the URL token that prefixes the URLs for child
Item s. |
void |
onDeleted(T item)
Internal method.
|
default void |
onRenamed(T item,
String oldName,
String newName)
Internal method.
|
getRootDir
getDisplayName
String getFullName()
ItemGroup
.Item.getFullName()
String getFullDisplayName()
Item.getFullDisplayName()
Collection<T> getItems()
default Collection<T> getItems(Predicate<T> pred)
default Stream<T> getItemsStream()
default Stream<T> getItemsStream(Predicate<T> pred)
String getUrl()
String getUrlChildPrefix()
Item
s.
Like "job", "item", etc.@CheckForNull T getItem(String name) throws org.springframework.security.access.AccessDeniedException
Item
inside this group that has a given name, or null if it does not exist.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 itorg.springframework.security.access.AccessDeniedException
- if the current user has Item.DISCOVER
but not Item.READ
on this itemFile getRootDirFor(T child)
root directory
for children.default void onRenamed(T item, String oldName, String newName) throws IOException
Item
s when they are renamed by users.
This is not expected to call ItemListener.onRenamed(hudson.model.Item, java.lang.String, java.lang.String)
, inconsistent with onDeleted(T)
.IOException
void onDeleted(T item) throws IOException
Item
s when they are deleted by users.IOException
default <T extends Item> List<T> getAllItems(Class<T> type, Predicate<T> pred)
getAllItems(Class)
with additional predicate filteringdefault <T extends Item> Iterable<T> allItems(Class<T> type)
Item
s unordered, lazily and recursively in the ItemGroup
tree
and filter them by the given type.default <T extends Item> Iterable<T> allItems(Class<T> type, Predicate<T> pred)
Item
s unordered, lazily and recursively in the ItemGroup
tree
and filter them by the given type and given predicateCopyright © 2004–2021. All rights reserved.