public static interface Metrics.ReadAssociate extends ReadInterface<Metrics.Single,Metrics.Multiple>
| Modifier and Type | Method and Description |
|---|---|
Relationship |
associate(String id)
Adds a pre-existing entity into the relation with the current entity.
|
Relationship |
associationWith(String id)
Finds the relationship with the entity with the provided id.
|
Relationship |
disassociate(String id)
Removes an entity from the relation with the current entity.
|
getgetAllRelationship associate(String id) throws EntityNotFoundException, RelationAlreadyExistsException
inventory.tenants().get(tenantId).environments().get(envId).resources().get(rId).metrics().associate(metricId);
In here the associate method will add a new metric (identified by the metricId) to the
resource identified by the rId.
id - the id of a pre-existing entity to be related to the entity on the current position in the inventory
traversal.EntityNotFoundExceptionRelationAlreadyExistsExceptionRelationship disassociate(String id) throws EntityNotFoundException
id - the id of the entity to remove from the relation with the current entity.EntityNotFoundExceptionfor explanation of how the current entity and the relation is determined.Relationship associationWith(String id) throws RelationNotFoundException
id - the id of the entity to find the relation withRelationNotFoundException - if a relation with an entity of given id doesn't existfor the discussion of how the entity and the relationship is determinedCopyright © 2015 Red Hat, Inc.. All rights reserved.