public static enum Relationships.WellKnown extends Enum<Relationships.WellKnown>
| Enum Constant and Description |
|---|
contains
Expresses encapsulation of a set of entities in another entity.
|
defines
Expresses "instantiation" of some entity based on the definition provided by "source" entity.
|
incorporates
Expresses inclusion.
|
isParentOf
Used to express hierarchy of resources.
|
| Modifier and Type | Method and Description |
|---|---|
static Relationships.WellKnown |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Relationships.WellKnown[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Relationships.WellKnown contains
Note that entities that are contained within another entity (by the virtue of there being this relationship between them) are deleted along with it.
Note also that it is prohibited to create loops in the contains relationships, i.e. an entity cannot (indirectly) contain itself. Also, containment is unique and therefore 1 entity cannot be contained in 2 or more other entities.
public static final Relationships.WellKnown defines
Note that as long as an entity defines other entities, it cannot be deleted.
public static final Relationships.WellKnown incorporates
public static final Relationships.WellKnown isParentOf
There are 2 separate concepts that need to be understood when examining resource hierarchy:
contains relationship and
the hierarchy aspect is modelled by the isParentOf relationship. When a contains
relationship is established between 2 resources, the isParentOf is automagically added by the
inventory.
This relationship cannot form loops (similarly to contains) but allows for 1 resource having more
than 1 parent. This is allowed so that custom/parallel resource hierarchies can be created that share the
same resources (the most obvious example of this is that a resource that has been discovered and
"hierarchized" by a feed can also be put "under" a custom, user-defined, resource).
When deleting a resource, all its contained child resources are deleted along with it as mandated by the
contract of the contains relationship.
public static Relationships.WellKnown[] values()
for (Relationships.WellKnown c : Relationships.WellKnown.values()) System.out.println(c);
public static Relationships.WellKnown valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2015 Red Hat, Inc.. All rights reserved.