@Override public Single visitOperationType(OperationType operationType, Void parameter) { return accessInterface.cast(inspect(operationType)); }
@Override public Single visitResourceType(ResourceType type, Void ignored) { return accessInterface.cast(inspect(type)); }
@Override public Single visitTenant(Tenant tenant, Void ignored) { return accessInterface.cast(inspect(tenant)); }
@Override public Single visitFeed(Feed feed, Void ignored) { return accessInterface.cast(inspect(feed)); }
@Override public Single visitEnvironment(Environment environment, Void ignored) { return accessInterface.cast(inspect(environment)); }
@Override public Single visitMetric(Metric metric, Void ignored) { return accessInterface.cast(inspect(metric)); }
@Override public Single visitMetricType(MetricType definition, Void ignored) { return accessInterface.cast(inspect(definition)); }
@Override public Single visitData(DataEntity data, Void parameter) { return accessInterface.cast(inspect(data)); }
@Override public Single visitResource(Resource resource, Void ignored) { return accessInterface.cast(inspect(resource)); }
/** * Provides an access interface for inspecting given environment. * * @param environment the environment to steer to. * @return the access interface to the environment */ default Environments.Single inspect(Environment environment) throws EntityNotFoundException { return inspect(environment.getPath(), Environments.Single.class); }
/** * Provides an access interface for inspecting given metric. * * @param metric the metric to steer to. * @return the access interface to the metric */ default Metrics.Single inspect(Metric metric) throws EntityNotFoundException { return inspect(metric.getPath(), Metrics.Single.class); }
/** * Provides an access interface for inspecting given metric type. * * @param metricType the metric type to steer to. * @return the access interface to the metric type */ default MetricTypes.Single inspect(MetricType metricType) throws EntityNotFoundException { return inspect(metricType.getPath(), MetricTypes.Single.class); }
/** * Provides an access interface for inspecting given resource type. * * @param resourceType the resource type to steer to. * @return the access interface to the resource type */ default ResourceTypes.Single inspect(ResourceType resourceType) throws EntityNotFoundException { return inspect(resourceType.getPath(), ResourceTypes.Single.class); }
/** * Provides an access interface for inspecting given resource. * * @param resource the resource to steer to. * @return the access interface to the resource */ default Resources.Single inspect(Resource resource) throws EntityNotFoundException { return inspect(resource.getPath(), Resources.Single.class); }
/** * Provides an access interface for inspecting given feed. * * @param feed the feed to steer to. * @return the access interface to the feed */ default Feeds.Single inspect(Feed feed) throws EntityNotFoundException { return inspect(feed.getPath(), Feeds.Single.class); }
default Data.Single inspect(DataEntity data) throws EntityNotFoundException { return inspect(data.getPath(), Data.Single.class); }
default OperationTypes.Single inspect(OperationType operationType) throws EntityNotFoundException { return inspect(operationType.getPath(), OperationTypes.Single.class); }
default MetadataPacks.Single inspect(MetadataPack metadataPack) throws EntityNotFoundException { return inspect(metadataPack.getPath(), MetadataPacks.Single.class); }
public static String of(MetadataPack mp, Inventory inventory) { List<Entity<? extends Entity.Blueprint, ?>> all = new ArrayList<>(); all.addAll(inventory.inspect(mp).resourceTypes().getAll().entities()); all.addAll(inventory.inspect(mp).metricTypes().getAll().entities()); return of(all, inventory); }
@Override public Single visitOperationType(Void parameter) { ResourceTypes.Single rt = inspect(path.up(), ResourceTypes.Single.class); return accessInterface.cast(rt.operationTypes().get(path.getSegment().getElementId())); }