Examples of fetchAlertNotifications()


Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

    protected AlertDefinitionCriteria getFetchCriteria(DSRequest request) {
        AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();

        criteria.fetchGroupAlertDefinition(true);
        criteria.fetchConditions(true);
        criteria.fetchAlertNotifications(true);

        Criteria requestCriteria = request.getCriteria();
        if (requestCriteria != null) {
            Map values = requestCriteria.getValues();
            for (Object key : values.keySet()) {
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

        // have everything we need when calling the copy constructor, minimizing
        AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
        criteria.addFilterResourceGroupIds(resourceGroupId);
        criteria.fetchGroupAlertDefinition(false);
        criteria.fetchConditions(true);
        criteria.fetchAlertNotifications(true);
        // Apply paging when optionally fetching collections, to avoid duplicates. Hibernate seems to apply DISTINCT,
        // which is what we want.  Use a huge # because we want them all.
        criteria.setPaging(0, Integer.MAX_VALUE);

        List<AlertDefinition> groupAlertDefinitions = alertDefinitionManager.findAlertDefinitionsByCriteria(subject,
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

        Subject overlord = subjectManager.getOverlord();

        AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
        criteria.addFilterNotificationNames(pluginName);
        criteria.setPageControl(PageControl.getUnlimitedInstance());
        criteria.fetchAlertNotifications(true);
        if (alertDefIds != null) {
            criteria.addFilterIds(alertDefIds.toArray(new Integer[alertDefIds.size()]));
        }

        return manager.findAlertDefinitionsByCriteria(overlord, criteria);
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

        } else {
            final AlertDefinitionCriteria criteria = getDetailCriteria();
            criteria.addFilterId(id);
            criteria.fetchGroupAlertDefinition(true);
            criteria.fetchConditions(true);
            criteria.fetchAlertNotifications(true);
            GWTServiceLookup.getAlertDefinitionService().findAlertDefinitionsByCriteria(criteria,
                new AsyncCallback<PageList<AlertDefinition>>() {
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError(
                            MSG.view_alert_definitions_loadFailed_single(String.valueOf(id)), caught);
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

            TestAlertSender.getValidateMethodCallCount());

        AlertDefinitionManagerLocal adm = LookupUtil.getAlertDefinitionManager();
        AlertDefinitionCriteria adCrit = new AlertDefinitionCriteria();
        adCrit.addFilterResourceIds(res.getId());
        adCrit.fetchAlertNotifications(true);

        List<AlertDefinition> foundAlertDefs = adm.findAlertDefinitionsByCriteria(subject, adCrit);
        junk.addAll(foundAlertDefs);

        assertEquals("The new resource should have an alert definition obtained from the template.", 1,
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

            TestAlertSender.getValidateMethodCallCount());

        AlertDefinitionManagerLocal adm = LookupUtil.getAlertDefinitionManager();
        AlertDefinitionCriteria adCrit = new AlertDefinitionCriteria();
        adCrit.addFilterResourceIds(res.getId());
        adCrit.fetchAlertNotifications(true);

        List<AlertDefinition> foundAlertDefs = adm.findAlertDefinitionsByCriteria(subject, adCrit);
        junk.addAll(foundAlertDefs);

        //1 from the group, 1 from the template
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

        AlertDefinitionManagerLocal adm = LookupUtil.getAlertDefinitionManager();

        AlertDefinitionCriteria crit = new AlertDefinitionCriteria();
        crit.addFilterId(resourceLevelAlertDefinitionId);
        crit.fetchAlertNotifications(true);
        crit.fetchConditions(true);

        List<AlertDefinition> foundDefs = adm.findAlertDefinitionsByCriteria(subject, crit);

        assertEquals("Failed to find the previously created resource level alert definition.", 1, foundDefs.size());
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

        AlertDefinitionManagerLocal adm = LookupUtil.getAlertDefinitionManager();

        AlertDefinitionCriteria crit = new AlertDefinitionCriteria();
        crit.addFilterId(groupLevelAlertDefinitionId);
        crit.fetchAlertNotifications(true);
        crit.fetchConditions(true);

        List<AlertDefinition> foundDefs = adm.findAlertDefinitionsByCriteria(subject, crit);

        assertEquals("Failed to find the previously created group level alert definition.", 1, foundDefs.size());
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

        AlertDefinitionManagerLocal adm = LookupUtil.getAlertDefinitionManager();

        AlertDefinitionCriteria crit = new AlertDefinitionCriteria();
        crit.addFilterId(templateLevelAlertDefinitionId);
        crit.fetchAlertNotifications(true);
        crit.fetchConditions(true);

        List<AlertDefinition> foundDefs = adm.findAlertDefinitionsByCriteria(subject, crit);

        assertEquals("Failed to find the previously created resource level alert definition.", 1, foundDefs.size());
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertDefinitionCriteria.fetchAlertNotifications()

        AlertDefinitionManagerLocal adm = LookupUtil.getAlertDefinitionManager();

        AlertDefinitionCriteria crit = new AlertDefinitionCriteria();
        crit.addFilterId(resourceLevelAlertDefinitionId);
        crit.fetchAlertNotifications(true);
        crit.fetchConditions(true);

        List<AlertDefinition> foundDefs = adm.findAlertDefinitionsByCriteria(subject, crit);

        assertEquals("Failed to find the previously created resource level alert definition.", 1, foundDefs.size());
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.