public static class EmptyInventory.MetricsReadAssociate extends Object implements Metrics.ReadAssociate
| Constructor and Description |
|---|
MetricsReadAssociate() |
| 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.
|
Metrics.Single |
get(String id)
Tries to find a single entity in the current position in the inventory traversal.
|
Metrics.Multiple |
getAll(Filter... filters)
Returns access interface to all entities conforming to provided filters in the current position in the inventory
traversal.
|
public Relationship 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.EntityNotFoundExceptionRelationAlreadyExistsExceptionpublic Relationship 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.public 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 determinedpublic Metrics.Multiple getAll(Filter... filters)
ResolvingToMultiplegetAll in interface ResolvingToMultiple<Metrics.Multiple>filters - the (possibly empty) list of filters to apply.public Metrics.Single get(String id) throws EntityNotFoundException
ResolvingToSingleget in interface ResolvingToSingle<Metrics.Single>id - the id of the entity to find in the current traversal positionEntityNotFoundExceptionCopyright © 2015 Red Hat, Inc.. All rights reserved.