Examples of fetchConditions()


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

    @Override
    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();
View Full Code Here

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

        // We want to copy the group level AlertDefinitions, so fetch them with the relevant lazy fields, so we
        // 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);
View Full Code Here

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

            singleAlertDefinitionView.makeEditable();
        } 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(
View Full Code Here

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

        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.fetchConditions()

        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.fetchConditions()

        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.fetchConditions()

        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.fetchConditions()

        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.fetchConditions()

        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 template level alert definition.", 1, foundDefs.size());
View Full Code Here

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

            LookupUtil.getResourceGroupManager().addResourcesToGroup(subjectManager.getOverlord(),
                testData.getResourceGroup().getId(), new int[] { resource3.getId() });

            int[] ids = new int[] { resource2.getId(), resource3.getId() };
            AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
            criteria.fetchConditions(true);
            criteria.addFilterResourceIds(ids[0], ids[1]);

            List<AlertDefinition> result = alertDefinitionManager.findAlertDefinitionsByCriteria(testData.getSubject(),
                criteria);
            assertNotNull(result);
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.