public interface InventoryStructure<Root extends Entity.Blueprint>
| Modifier and Type | Interface and Description |
|---|---|
static class |
InventoryStructure.AbstractBuilder<This extends InventoryStructure.AbstractBuilder<?>> |
static class |
InventoryStructure.Builder<Root extends Entity.Blueprint> |
static class |
InventoryStructure.ChildBuilder<ParentBuilder extends InventoryStructure.AbstractBuilder<?>> |
static class |
InventoryStructure.EntityType
This enum lists all the entity types that can be part of a inventory structure.
|
static class |
InventoryStructure.FullNode
Represents an entity in the inventory structure together with the attachment assigned to it by the inventory
structure builder.
|
static class |
InventoryStructure.Offline<Root extends Entity.Blueprint>
Represents the structure of the inventory off-line, without access to an inventory instance.
|
| Modifier and Type | Method and Description |
|---|---|
Entity.Blueprint |
get(RelativePath path)
Gets a blueprint on the given path.
|
default Stream<InventoryStructure.FullNode> |
getAllChildNodes(RelativePath parent)
Returns all direct children of the specified parent.
|
default Stream<Entity.Blueprint> |
getAllChildren(RelativePath parent)
Returns all direct children of the specified parent.
|
default Stream<InventoryStructure.FullNode> |
getAllChildrenWithAttachments(RelativePath parent)
Deprecated.
|
default <E extends Entity,B extends Entity.Blueprint> |
getChildNodes(RelativePath parent,
Class<E> childType) |
<E extends Entity,B extends Entity.Blueprint> |
getChildren(RelativePath parent,
Class<E> childType)
Returns the direct children of given type under the supplied path to the parent entity, which is relative to some
root entity for which this structure was instantiated.
|
default InventoryStructure.FullNode |
getNode(RelativePath path)
By providing an empty relative path, one can retrieve the attachment of the root entity.
|
Root |
getRoot() |
static <B extends Entity.Blueprint> |
of(B root)
Shortcut method, exactly identical to calling
InventoryStructure.Offline.of(Entity.Blueprint). |
static <B extends Entity.Blueprint> |
of(B root,
Object attachment)
Shortcut method, exactly identical to calling
InventoryStructure.Offline.of(Entity.Blueprint, Object). |
static <B extends Entity.Blueprint> InventoryStructure.Builder<B> of(B root)
InventoryStructure.Offline.of(Entity.Blueprint).B - the type of the blueprintroot - the root blueprintstatic <B extends Entity.Blueprint> InventoryStructure.Builder<B> of(B root, Object attachment)
InventoryStructure.Offline.of(Entity.Blueprint, Object).B - the type of the blueprintroot - the root blueprintattachment - the attachment of the blueprintRoot getRoot()
<E extends Entity,B extends Entity.Blueprint> Stream<B> getChildren(RelativePath parent, Class<E> childType)
WARNING: the returned stream MUST BE closed after processing.
E - the type of the child entitiesB - the type of the child entity blueprintparent - the path to the parent entity, relative to the root entitychildType - the type of the child entities to retrievedefault <E extends Entity,B extends Entity.Blueprint> Stream<InventoryStructure.FullNode> getChildNodes(RelativePath parent, Class<E> childType)
Entity.Blueprint get(RelativePath path)
path - the path under the root of the structuredefault InventoryStructure.FullNode getNode(RelativePath path)
path - the path to the entity in the inventory structuredefault Stream<Entity.Blueprint> getAllChildren(RelativePath parent)
parent - the parent of which to return the childrendefault Stream<InventoryStructure.FullNode> getAllChildNodes(RelativePath parent)
parent - the parent of which to return the children@Deprecated default Stream<InventoryStructure.FullNode> getAllChildrenWithAttachments(RelativePath parent)
getAllChildNodes(RelativePath) instead.parent - the parent of which to return the childrenCopyright © 2014–2017 Red Hat, Inc.. All rights reserved.