Examples of addFilterId()


Examples of org.rhq.core.domain.criteria.AgentCriteria.addFilterId()

    @Override
    protected AgentCriteria getFetchCriteria(DSRequest request) {
        AgentCriteria criteria = new AgentCriteria();
        //      printRequestCriteria(request);
        criteria.addFilterId(getFilter(request, FIELD_ID.propertyName(), Integer.class));
        criteria.addFilterName(getFilter(request, FIELD_NAME.propertyName(), String.class));
        criteria.addFilterAddress(getFilter(request, FILTER_ADDRESS, String.class));
        criteria.addFilterPort(getFilter(request, FILTER_PORT, Integer.class));
        criteria.addFilterAgenttoken(getFilter(request, FILTER_AGENTTOKEN, String.class));
        criteria.addFilterServerId(getFilter(request, FILTER_SERVER_ID, Integer.class));
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterId()

     * @return Alert domain object
     * @throws StuffNotFoundException if no such alert exists in the system.
     */
    private Alert findAlertWithId(int id) {
        AlertCriteria criteria = new AlertCriteria();
        criteria.addFilterId(id);
        List<Alert> alerts = alertManager.findAlertsByCriteria(caller,criteria);
        if (alerts.isEmpty()) {
            throw new StuffNotFoundException("Alert with id " + id);
        }

View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterId()

        super();
    }

    private void show(int alertId) {
        AlertCriteria criteria = new AlertCriteria();
        criteria.addFilterId(alertId);
        GWTServiceLookup.getAlertService().findAlertsByCriteria(criteria, new AsyncCallback<PageList<Alert>>() {
            @Override
            public void onSuccess(PageList<Alert> result) {
                Alert alert = result.get(0);
                Integer parentId = alert.getAlertDefinition().getParentId();
View Full Code Here

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

            newAlertDef.setControlFiltered(false);
            singleAlertDefinitionView.setAlertDefinition(newAlertDef);
            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>>() {
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.addFilterId()

        assert files.get(0).getPackageVersion().getGeneralPackage().getName().equals("testDeleteBundle") : files;

        bundleManager.deleteBundle(overlord, b1.getId());

        BundleCriteria bCriteria = new BundleCriteria();
        bCriteria.addFilterId(b1.getId());
        PageList<Bundle> bResults = bundleManager.findBundlesByCriteria(overlord, bCriteria);
        assert bResults.size() == 0;
    }

    @Test(enabled = TESTS_ENABLED)
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.addFilterId()

        // delete the first one - this deletes the BV but the bundle should remain intact
        bundleManager.deleteBundleVersion(overlord, bv2.getId(), true);
        bvCriteria.addFilterId(bv2.getId());
        PageList<BundleVersion> bvResults = bundleManager.findBundleVersionsByCriteria(overlord, bvCriteria);
        assert bvResults.size() == 0;
        bCriteria.addFilterId(b1.getId());
        PageList<Bundle> bResults = bundleManager.findBundlesByCriteria(overlord, bCriteria);
        assert bResults.size() == 1 : "Should not have deleted bundle yet, 1 version still exists";

        // delete the second one - this deletes last BV thus the bundle should also get deleted
        bundleManager.deleteBundleVersion(overlord, bv1.getId(), true);
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.addFilterId()

        // delete the second one - this deletes last BV thus the bundle should also get deleted
        bundleManager.deleteBundleVersion(overlord, bv1.getId(), true);
        bvCriteria.addFilterId(bv1.getId());
        bvResults = bundleManager.findBundleVersionsByCriteria(overlord, bvCriteria);
        assert bvResults.size() == 0;
        bCriteria.addFilterId(b1.getId());
        bResults = bundleManager.findBundlesByCriteria(overlord, bCriteria);
        assert bResults.size() == 0 : "Should have deleted bundle since no versions exists anymore";

        // make sure our composite query is OK and can show us 0 bundles, too
        PageList<BundleWithLatestVersionComposite> composites;
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.addFilterId()

        assertTrue(b.getName() + " does not contain [" + name + "]", b.getName().contains(name));
        assertTrue(b.getBundleType().getName() + " does not contain [" + name + "]", b.getBundleType().getName()
            .contains(name));

        // return bundle "two" using all criteria and with all optional data
        c.addFilterId(b.getId());
        c.addFilterName(b.getName());
        c.addFilterBundleTypeName(b.getBundleType().getName());
        c.fetchBundleVersions(true);
        c.fetchRepo(true);
        bundles = bundleManager.findBundlesByCriteria(overlord, c);
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.addFilterId()

        // delete the first one - this deletes the BV but the bundle should remain intact
        bundleManager.deleteBundleVersion(subject, bv2.getId(), true);
        bvCriteria.addFilterId(bv2.getId());
        PageList<BundleVersion> bvResults = bundleManager.findBundleVersionsByCriteria(subject, bvCriteria);
        assert bvResults.size() == 0;
        bCriteria.addFilterId(b1.getId());
        PageList<Bundle> bResults = bundleManager.findBundlesByCriteria(subject, bCriteria);
        assert bResults.size() == 1 : "Should not have deleted bundle yet, 1 version still exists";

        // delete the second one - this deletes last BV thus the bundle should also get deleted
        bundleManager.deleteBundleVersion(subject, bv1.getId(), true);
View Full Code Here

Examples of org.rhq.core.domain.criteria.BundleCriteria.addFilterId()

        // delete the second one - this deletes last BV thus the bundle should also get deleted
        bundleManager.deleteBundleVersion(subject, bv1.getId(), true);
        bvCriteria.addFilterId(bv1.getId());
        bvResults = bundleManager.findBundleVersionsByCriteria(subject, bvCriteria);
        assert bvResults.size() == 0;
        bCriteria.addFilterId(b1.getId());
        bResults = bundleManager.findBundlesByCriteria(subject, bCriteria);
        assert bResults.size() == 0 : "Should have deleted bundle since no versions exists anymore";

        // make sure our composite query is OK and can show us 0 bundles, too
        PageList<BundleWithLatestVersionComposite> composites;
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.