Search in sources :

Example 1 with ServiceLevelAgreementMetric

use of com.thinkbiganalytics.metadata.sla.api.ServiceLevelAgreementMetric in project kylo by Teradata.

the class ServiceLevelAgreementMetricTransformer method discoverSlaMetrics.

public List<ServiceLevelAgreementRule> discoverSlaMetrics() {
    List<ServiceLevelAgreementRule> rules = new ArrayList<>();
    Set<Class<?>> metrics = ReflectionPolicyAnnotationDiscoverer.getTypesAnnotatedWith(ServiceLevelAgreementMetric.class);
    for (Class c : metrics) {
        List<FieldRuleProperty> properties = getUiProperties(c);
        ServiceLevelAgreementMetric policy = (ServiceLevelAgreementMetric) c.getAnnotation(ServiceLevelAgreementMetric.class);
        rules.add(buildUiModel(policy, c, properties));
    }
    return rules;
}
Also used : ServiceLevelAgreementMetric(com.thinkbiganalytics.metadata.sla.api.ServiceLevelAgreementMetric) ArrayList(java.util.ArrayList) FieldRuleProperty(com.thinkbiganalytics.policy.rest.model.FieldRuleProperty)

Aggregations

ServiceLevelAgreementMetric (com.thinkbiganalytics.metadata.sla.api.ServiceLevelAgreementMetric)1 FieldRuleProperty (com.thinkbiganalytics.policy.rest.model.FieldRuleProperty)1 ArrayList (java.util.ArrayList)1