Examples of fetchResourceType()


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

    private void fetchDefinitionWithGroupAndTemplate(final Alert alert) {
        AlertDefinitionCriteria criteria = new AlertDefinitionCriteria();
        criteria.addFilterAlertId(alert.getId());
        criteria.fetchGroupAlertDefinition(true);
        criteria.fetchResourceType(true);
        GWTServiceLookup.getAlertDefinitionService().findAlertDefinitionsByCriteria(criteria, new AsyncCallback<PageList<AlertDefinition>>() {
            public void onSuccess(PageList<AlertDefinition> result) {
                alert.getAlertDefinition().setGroupAlertDefinition(result.get(0).getGroupAlertDefinition());
                alert.getAlertDefinition().setResourceType(result.get(0).getResourceType());
                show(alert);
View Full Code Here

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

                    // template alert definition. I previously tried accessing the resource
                    // type id via AlertDefinition.resourceType.id, but resourceType is null
                    // even though fetchResourceType is set to true in the critera.
                    //
                    // jsanda
                    criteria.fetchResourceType(true);

                    CriteriaQueryExecutor<AlertDefinition, AlertDefinitionCriteria> queryExecutor =
                            new CriteriaQueryExecutor<AlertDefinition, AlertDefinitionCriteria>() {
                                @Override
                                public PageList<AlertDefinition> execute(AlertDefinitionCriteria criteria) {
View Full Code Here

Examples of org.rhq.core.domain.criteria.DriftDefinitionTemplateCriteria.fetchResourceType()

                }
            });
        } else {
            DriftDefinitionTemplateCriteria templateCriteria = new DriftDefinitionTemplateCriteria();
            templateCriteria.addFilterId(templateId);
            templateCriteria.fetchResourceType(true);

            DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
            driftService.findDriftDefinitionTemplatesByCriteria(templateCriteria,
                new AsyncCallback<PageList<DriftDefinitionTemplate>>() {
                    public void onFailure(Throwable caught) {
View Full Code Here

Examples of org.rhq.core.domain.criteria.DriftDefinitionTemplateCriteria.fetchResourceType()

    private DriftDefinitionTemplate loadTemplate(String name, boolean verifyResultsUnique) {
        DriftDefinitionTemplateCriteria criteria = new DriftDefinitionTemplateCriteria();
        criteria.addFilterResourceTypeId(resourceType.getId());
        criteria.addFilterName(name);
        criteria.fetchDriftDefinitions(true);
        criteria.fetchResourceType(true);

        PageList<DriftDefinitionTemplate> templates = templateMgr.findTemplatesByCriteria(getOverlord(), criteria);
        if (verifyResultsUnique) {
            assertEquals("Expected to find one template", 1, templates.size());
        }
View Full Code Here

Examples of org.rhq.core.domain.criteria.MeasurementDefinitionCriteria.fetchResourceType()

                .getMeasurementDefinitionManager();

            SystemSettings beforeSystemSettings = systemManager.getUnmaskedSystemSettings(false);
            MeasurementDefinitionCriteria criteria = new MeasurementDefinitionCriteria();
            criteria.setPageControl(PageControl.getUnlimitedInstance());
            criteria.fetchResourceType(true);

            List<MeasurementDefinition> beforeMeasurementDefinitions = measurementDefinitionManager
                .findMeasurementDefinitionsByCriteria(freshUser(), criteria);

            synchronizationManager.importAllSubsystems(freshUser(), export.getExportFile(), null);
View Full Code Here

Examples of org.rhq.core.domain.criteria.MeasurementDefinitionCriteria.fetchResourceType()

    @Override
    public ExportingIterator<MetricTemplate> getExportingIterator() {
        MeasurementDefinitionCriteria criteria = new MeasurementDefinitionCriteria();
        criteria.setPageControl(PageControl.getUnlimitedInstance());
        criteria.fetchResourceType(true);
       
        List<MeasurementDefinition> defs = measurementDefinitionManager.findMeasurementDefinitionsByCriteria(subject,
            criteria);
       
        return new MetricTemplateIterator(defs.iterator());
View Full Code Here

Examples of org.rhq.core.domain.criteria.ResourceCriteria.fetchResourceType()

        switch (context.getType()) {
        case Resource:

            ResourceCriteria rc = new ResourceCriteria();
            rc.addFilterId(context.getResourceId());
            rc.fetchResourceType(true);
            GWTServiceLookup.getDriftService().updateDriftDefinition(context, getNewDriftDefinition(),
                new AsyncCallback<Void>() {
                    public void onSuccess(Void result) {
                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_drift_wizard_addDef_success(getNewDriftDefinition().getName()),
View Full Code Here

Examples of org.rhq.core.domain.criteria.ResourceCriteria.fetchResourceType()

        switch (context.getType()) {
        case Resource:
            ResourceCriteria rc = new ResourceCriteria();
            rc.addFilterId(context.getResourceId());
            rc.fetchResourceType(true);
            GWTServiceLookup.getResourceService().findResourcesByCriteria(rc, new AsyncCallback<PageList<Resource>>() {
                public void onSuccess(PageList<Resource> result) {
                    if (result.isEmpty()) {
                        throw new IllegalArgumentException("Entity not found [" + context + "]");
                    }
View Full Code Here

Examples of org.rhq.core.domain.criteria.ResourceCriteria.fetchResourceType()

        criteria.addFilterIds(resourceIds);
        // filter out any that are not actually in inventory
        criteria.addFilterInventoryStatuses(new ArrayList<InventoryStatus>(InventoryStatus.getInInventorySet()));
        // get all of them, don't limit to default paging
        criteria.clearPaging();
        criteria.fetchResourceType(true);
        criteria.fetchPluginConfiguration(true);

        ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
        Subject overlord = LookupUtil.getSubjectManager().getOverlord();
        List<Resource> result = resourceManager.findResourcesByCriteria(overlord, criteria);
View Full Code Here

Examples of org.rhq.core.domain.criteria.ResourceCriteria.fetchResourceType()

            return result;
        }

        ResourceCriteria resourceCriteria = new ResourceCriteria();
        resourceCriteria.addFilterIds(resourceIds);
        resourceCriteria.fetchResourceType(true);
        resourceCriteria.clearPaging();//disable paging as the code assumes all the results will be returned.
        List<Resource> resources = findResourcesByCriteria(subject, resourceCriteria);

        if (ResourceAncestryFormat.RAW == format) {
            for (Resource resource : resources) {
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.