Package org.rhq.core.domain.alert

Examples of org.rhq.core.domain.alert.AlertDefinition.addCondition()


            em.persist(ad);

            AlertCondition ac = new AlertCondition(ad, AlertConditionCategory.AVAILABILITY);
            ac.setComparator("==");
            em.persist(ac);
            ad.addCondition(ac);

            EventDefinition ed = new EventDefinition(resourceType, "DataPurgeJobTestEventDefinition");
            em.persist(ed);
            resourceType.addEventDefinition(ed);
View Full Code Here


        AlertCondition ac = new AlertCondition();
        ac.setCategory(AlertConditionCategory.THRESHOLD);
        ac.setMeasurementDefinition(testData.getMeasurementDef());
        ac.setComparator("<");
        ac.setThreshold(0.5);
        alertDefinition.addCondition(ac);

        AlertDefinition newAlertDefinition = alertDefinitionManager.createAlertDefinitionInNewTransaction(
            testData.getSubject(), alertDefinition, null, true);
        testData.getAlertDefinitionIds().add(newAlertDefinition.getId());
        return newAlertDefinition.getId();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.