Examples of addFilterId()


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

    private void persistChangeSetWhenTemplateGetsPinned() throws Exception {

        DriftDefinitionTemplate template = loadTemplate(TEST_PIN_TEMPLATE);

        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterId(template.getChangeSetId());

        PageList<? extends DriftChangeSet<?>> changeSets = driftMgr.findDriftChangeSetsByCriteria(getOverlord(),
            criteria);

        assertEquals("Expected to find change set for pinned template", 1, changeSets.size());
View Full Code Here

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

        return definitions.get(0);
    }

    private DriftChangeSet<?> loadChangeSet(String id) throws Exception {
        GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
        criteria.addFilterId(id);
        PageList<? extends DriftChangeSet<?>> changeSets = driftMgr.findDriftChangeSetsByCriteria(getOverlord(),
            criteria);

        if (changeSets.isEmpty()) {
            return null;
View Full Code Here

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

    @Override
    public FileDiffReport generateUnifiedDiffByIds(Subject subject, String driftId1, String driftId2) {
        DriftServerPluginFacet driftServerPlugin = getServerPlugin();

        GenericDriftCriteria criteria = new GenericDriftCriteria();
        criteria.addFilterId(driftId1);
        criteria.setPageControl(PageControl.getSingleRowInstance());

        List<? extends Drift<?, ?>> result = driftServerPlugin.findDriftsByCriteria(subject, criteria);
        if (result.size() != 1) {
            throw new IllegalArgumentException("Drift record not found: " + driftId1);
View Full Code Here

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

                .getResourceGroup().getId()));
            resourceDatasource.fetchData(criteria, new LoadResourcesCallback(latch));

            if (getOperationExampleId() != null) {
                GroupOperationHistoryCriteria historyCriteria = new GroupOperationHistoryCriteria();
                historyCriteria.addFilterId(getOperationExampleId());
                historyCriteria.fetchOperationDefinition(true);
                historyCriteria.fetchParameters(true);
                historyCriteria.setPageControl(PageControl.getSingleRowInstance());
                GWTServiceLookup.getOperationService().findGroupOperationHistoriesByCriteria(historyCriteria,
                    new LoadExampleCallback(latch));
View Full Code Here

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

        String newChangeSetId = jpaDriftServer.persistChangeSet(getOverlord(), changeSet);

        // verify that the change set was persisted
        JPADriftChangeSetCriteria criteria = new JPADriftChangeSetCriteria();
        criteria.addFilterId(newChangeSetId);
        criteria.fetchDrifts(true);

        PageList<JPADriftChangeSet> changeSets = jpaDriftServer.findDriftChangeSetsByCriteria(getOverlord(), criteria);
        assertEquals("Expected to find one change set", 1, changeSets.size());
View Full Code Here

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

        String newChangeSetId = jpaDriftServer.persistChangeSet(getOverlord(), changeSet);

        // verify that the change set was persisted
        JPADriftChangeSetCriteria criteria = new JPADriftChangeSetCriteria();
        criteria.addFilterId(newChangeSetId);
        criteria.fetchDrifts(true);

        PageList<JPADriftChangeSet> changeSets = jpaDriftServer.findDriftChangeSetsByCriteria(getOverlord(), criteria);
        assertEquals("Expected to find one change set", 1, changeSets.size());
View Full Code Here

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

        // due to the conditional below which determines what kind of criteria to use, this datasource
        // doesn't rely on getFetchCriteria and the passed in criteria object. It is up to this method to
        // correctly prepare the criteria we build here (e.g. set the page control properly).
        if (request.getCriteria().getValues().containsKey("id")) {
            MeasurementDefinitionCriteria criteria = new MeasurementDefinitionCriteria();
            criteria.addFilterId(request.getCriteria().getAttributeAsInt("id"));
            criteria.setPageControl(getPageControl(request));

            GWTServiceLookup.getMeasurementDataService().findMeasurementDefinitionsByCriteria(criteria,
                new AsyncCallback<PageList<MeasurementDefinition>>() {
                    @Override
View Full Code Here

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

    @Deprecated
    @Override
    @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
    public org.rhq.enterprise.server.measurement.MeasurementAggregate getAggregate(Subject subject, int scheduleId, long startTime, long endTime) {
        MeasurementScheduleCriteria criteria = new MeasurementScheduleCriteria();
        criteria.addFilterId(scheduleId);
        criteria.fetchResource(true);

        PageList<MeasurementSchedule> schedules = measurementScheduleManager.findSchedulesByCriteria(
            subjectManager.getOverlord(), criteria);
        if (schedules.isEmpty()) {
View Full Code Here

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

                bfc, queryExecutor);

            List<PackageVersion> packageVersions = new ArrayList<PackageVersion>();
            PackageVersion packageVersion = null;
            for (BundleFile bundleFile : bundleFiles) {
                pvc.addFilterId(bundleFile.getPackageVersion().getId());
                packageVersion = cm.findPackageVersionsByCriteria(subject, pvc).get(0);
                HibernateDetachUtility.nullOutUninitializedFields(packageVersion, SerializationType.SERIALIZATION);
                packageVersions.add(packageVersion);
            }
            return packageVersions;
View Full Code Here

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

    @Override
    protected void onInit() {
        super.onInit();
        PartitionEventCriteria criteria = new PartitionEventCriteria();
        criteria.addFilterId(partitionEventId);
        final TopologyGWTServiceAsync service = GWTServiceLookup.getTopologyService();
        service.findPartitionEventsByCriteria(criteria, new AsyncCallback<PageList<PartitionEvent>>() {
            public void onSuccess(final PageList<PartitionEvent> events) {
                if (events == null || events.size() != 1) {
                    CoreGUI.getErrorHandler().handleError(
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.