Examples of AlertDefinitionManagerLocal


Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

            List<AlertDefinition> alertDefinitions = null;

            // if there's a "type" param, then its an alert template (can't use isAlertTemplate because the
            // definitionForm was just cleared on reset()
            if (request.getParameter("id") != null && !request.getParameter("id").equals("")) {
                AlertDefinitionManagerLocal alertDefinitionManager = LookupUtil.getAlertDefinitionManager();
                Integer resourceId = RequestUtils.getResourceId(request);

                alertDefinitions = alertDefinitionManager.findAlertDefinitions(subject, resourceId, PageControl
                    .getUnlimitedInstance());
            } else if (request.getParameter("type") != null && !request.getParameter("type").equals("")) {
                AlertTemplateManagerLocal alertTemplateManager = LookupUtil.getAlertTemplateManager();
                Integer resourceTypeId = RequestUtils.getResourceTypeId(request);
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        try {
            if (context == FormContext.Type) {
                AlertTemplateManagerLocal alertTemplateManager = LookupUtil.getAlertTemplateManager();
                alertTemplateManager.updateAlertTemplate(subject, alertDef, true);
            } else if (context == FormContext.Resource) {
                AlertDefinitionManagerLocal alertDefinitionManager = LookupUtil.getAlertDefinitionManager();
                alertDefinitionManager.updateAlertDefinition(subject, alertDef.getId(), alertDef, true);
            } else if (context == FormContext.Group) {
                GroupAlertDefinitionManagerLocal groupAlertDefinitionManager = LookupUtil
                    .getGroupAlertDefinitionManager();
                groupAlertDefinitionManager.updateGroupAlertDefinitions(subject, alertDef, true);
            } else {
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        alertDef.setAlertDampening(new AlertDampening(AlertDampening.Category.NONE));
        alertDef.setConditions(Collections.singleton(cond));
        alertDef.setEnabled(true);
        alertDef.setConditionExpression(BooleanExpression.ALL);

        AlertDefinitionManagerLocal alertDefinitionManager = LookupUtil.getAlertDefinitionManager();
        alertDefinitionManager.createAlertDefinitionInNewTransaction(getOverlord(), alertDef, newResource.getId(), true);

        //obvious, right? This needs to be done for the alert subsystem to become aware of the new def
        LookupUtil.getAlertConditionCacheManager().reloadAllCaches();

        ResourceCriteria crit = new ResourceCriteria();
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        // purge the resource fully, which should remove all alert defs and alert conditions and condition logs
        int resourceId = resource.getId();
        deleteNewResource(resource);
        resource = null;

        AlertDefinitionManagerLocal alertDefManager = LookupUtil.getAlertDefinitionManager();
        PageList<AlertDefinition> defs = alertDefManager.findAlertDefinitions(getOverlord(), resourceId,
            PageControl.getUnlimitedInstance());
        assert defs.isEmpty() : "failed to delete the alert definition - are condition logs still around?";
    }
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        // purge the resource fully, which should remove all alert defs and alert conditions and condition logs
        int resourceId = resource.getId();
        deleteNewResource(resource);
        resource = null;

        AlertDefinitionManagerLocal alertDefManager = LookupUtil.getAlertDefinitionManager();
        PageList<AlertDefinition> defs = alertDefManager.findAlertDefinitions(getOverlord(), resourceId,
            PageControl.getUnlimitedInstance());
        assert defs.isEmpty() : "failed to delete the alert definition - are condition logs still around?";
    }
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        // purge the resource fully, which should remove all alert defs and alert conditions and condition logs
        int resourceId = resource.getId();
        deleteNewResource(resource);
        resource = null;

        AlertDefinitionManagerLocal alertDefManager = LookupUtil.getAlertDefinitionManager();
        PageList<AlertDefinition> defs = alertDefManager.findAlertDefinitions(getOverlord(), resourceId,
            PageControl.getUnlimitedInstance());
        assert defs.isEmpty() : "failed to delete the alert definition - are condition logs still around?";
    }
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        alertDefinition.setAlertDampening(new AlertDampening(Category.NONE));
        alertDefinition.setRecoveryId(0);
        alertDefinition.setConditionExpression(BooleanExpression.ALL);
        alertDefinition.setConditions(conditions);

        AlertDefinitionManagerLocal alertDefManager = LookupUtil.getAlertDefinitionManager();
        alertDefinition = alertDefManager.createAlertDefinitionInNewTransaction(getOverlord(), alertDefinition,
            resourceId, true);
        assert alertDefinition != null && alertDefinition.getId() > 0 : "did not persist alert def properly: "
            + alertDefinition;

        // now that we created an alert def, we have to reload the alert condition cache
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        alertDefinition.setAlertDampening(dampening);
        alertDefinition.setRecoveryId(0);
        alertDefinition.setConditionExpression(BooleanExpression.ALL);
        alertDefinition.setConditions(Collections.singleton(cond));

        AlertDefinitionManagerLocal alertDefManager = LookupUtil.getAlertDefinitionManager();
        alertDefinition = alertDefManager.createAlertDefinitionInNewTransaction(getOverlord(), alertDefinition,
            resourceId, true);
        assert alertDefinition != null && alertDefinition.getId() > 0 : "did not persist alert def properly: "
            + alertDefinition;

        // now that we created an alert def, we have to reload the alert condition cache
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        alertDefinition.setAlertDampening(new AlertDampening(Category.NONE));
        alertDefinition.setRecoveryId(0);
        alertDefinition.setConditionExpression(BooleanExpression.ALL);
        alertDefinition.setConditions(conditions);

        AlertDefinitionManagerLocal alertDefManager = LookupUtil.getAlertDefinitionManager();
        alertDefinition = alertDefManager.createAlertDefinitionInNewTransaction(getOverlord(), alertDefinition,
            resourceId, true);
        assert alertDefinition != null && alertDefinition.getId() > 0 : "did not persist alert def properly: "
            + alertDefinition;

        // now that we created an alert def, we have to reload the alert condition cache
View Full Code Here

Examples of org.rhq.enterprise.server.alert.AlertDefinitionManagerLocal

        alertDefinition.setAlertDampening(new AlertDampening(Category.NONE));
        alertDefinition.setRecoveryId(0);
        alertDefinition.setConditionExpression(BooleanExpression.ALL);
        alertDefinition.setConditions(conditions);

        AlertDefinitionManagerLocal alertDefManager = LookupUtil.getAlertDefinitionManager();
        alertDefinition = alertDefManager.createAlertDefinitionInNewTransaction(getOverlord(), alertDefinition,
            resourceId, true);
        assert alertDefinition != null && alertDefinition.getId() > 0 : "did not persist alert def properly: "
            + alertDefinition;

        // now that we created an alert def, we have to reload the alert condition cache
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.