Examples of DriftSnapshotRequest


Examples of org.rhq.core.domain.drift.DriftSnapshotRequest

    @Override
    protected void executeFetch(final DSRequest request, final DSResponse response,
        GenericDriftChangeSetCriteria criteria) {

        if (null == this.templateId) {
            DriftSnapshotRequest snapshotRequest = new DriftSnapshotRequest(driftDefId, version, null, null, true,
                false);
            executeGetSnapshot(request, response, snapshotRequest);

        } else {
            if (null == this.templateChangeSetId) {

                DriftDefinitionTemplateCriteria templateCriteria = new DriftDefinitionTemplateCriteria();
                templateCriteria.addFilterId(this.templateId);

                GWTServiceLookup.getDriftService().findDriftDefinitionTemplatesByCriteria(templateCriteria,
                    new AsyncCallback<PageList<DriftDefinitionTemplate>>() {

                        public void onSuccess(final PageList<DriftDefinitionTemplate> result) {
                            templateChangeSetId = String.valueOf(result.get(0).getChangeSetId());
                            DriftSnapshotRequest snapshotRequest = new DriftSnapshotRequest(templateChangeSetId, null,
                                true, false);
                            executeGetSnapshot(request, response, snapshotRequest);
                        }

                        public void onFailure(Throwable caught) {
                            CoreGUI.getErrorHandler().handleError("Failed to load definition.", caught);
                        }
                    });
            } else {
                DriftSnapshotRequest snapshotRequest = new DriftSnapshotRequest(templateChangeSetId, null, true, false);
                executeGetSnapshot(request, response, snapshotRequest);
            }
        }
    }
View Full Code Here

Examples of org.rhq.core.domain.drift.DriftSnapshotRequest

            @Override
            protected void executeFetch(final DSRequest request, final DSResponse response,
                GenericDriftChangeSetCriteria criteria) {

                if (null == templateId) {
                    DriftSnapshotRequest snapshotRequest = new DriftSnapshotRequest(driftDefId, version, null,
                        directory, false, true);
                    executeGetSnapshot(request, response, snapshotRequest);

                } else {
                    if (null == templateChangeSetId) {

                        DriftDefinitionTemplateCriteria templateCriteria = new DriftDefinitionTemplateCriteria();
                        templateCriteria.addFilterId(templateId);

                        GWTServiceLookup.getDriftService().findDriftDefinitionTemplatesByCriteria(templateCriteria,
                            new AsyncCallback<PageList<DriftDefinitionTemplate>>() {

                                public void onSuccess(final PageList<DriftDefinitionTemplate> result) {
                                    templateChangeSetId = String.valueOf(result.get(0).getChangeSetId());
                                    DriftSnapshotRequest snapshotRequest = new DriftSnapshotRequest(
                                        templateChangeSetId, directory, false, true);
                                    executeGetSnapshot(request, response, snapshotRequest);
                                }

                                public void onFailure(Throwable caught) {
                                    CoreGUI.getErrorHandler().handleError("Failed to load definition.", caught);
                                }
                            });
                    } else {
                        DriftSnapshotRequest snapshotRequest = new DriftSnapshotRequest(templateChangeSetId, directory,
                            false, true);
                        executeGetSnapshot(request, response, snapshotRequest);
                    }
                }
            }
View Full Code Here

Examples of org.rhq.core.domain.drift.DriftSnapshotRequest

        driftDef.setPinned(true);
        driftManager.updateDriftDefinition(subject, driftDef);
        driftDef.getResource().setAgentSynchronizationNeeded();

        DriftSnapshotRequest snapshotRequest = new DriftSnapshotRequest(driftDefId, snapshotVersion);
        DriftSnapshot snapshot = getSnapshot(subject, snapshotRequest);

        DriftChangeSetDTO changeSet = new DriftChangeSetDTO();
        changeSet.setCategory(COVERAGE);
        changeSet.setVersion(0);
View Full Code Here

Examples of org.rhq.core.domain.drift.DriftSnapshotRequest

            AgentClient agentClient = agentManager.getAgentClient(subjectManager.getOverlord(), resourceId);
            DriftAgentService service = agentClient.getDriftAgentService();
            try {
                DriftSnapshot snapshot = null;
                if (driftDef.getTemplate() != null && driftDef.getTemplate().isPinned()) {
                    snapshot = getSnapshot(subject, new DriftSnapshotRequest(driftDef.getId()));
                }
                // Do not pass attached entities to the following Agent call, which is outside Hibernate's control. Flush
                // and clear the entities to ensure the work above is captured and we pass out a detached object.
                entityManager.flush();
                entityManager.clear();
View Full Code Here

Examples of org.rhq.core.domain.drift.DriftSnapshotRequest

    @Override
    public DriftSnapshot getCurrentSnapshot(int driftDefinitionId) {
        Subject overlord = getSubjectManager().getOverlord();

        return getDriftManager().getSnapshot(overlord, new DriftSnapshotRequest(driftDefinitionId));
    }
View Full Code Here

Examples of org.rhq.core.domain.drift.DriftSnapshotRequest

    @Override
    public DriftSnapshot getSnapshot(int driftDefinitionId, int startVersion, int endVersion) {
        Subject overlord = getSubjectManager().getOverlord();

        return getDriftManager().getSnapshot(overlord,
            new DriftSnapshotRequest(driftDefinitionId, startVersion, endVersion));
    }
View Full Code Here

Examples of org.rhq.core.domain.drift.DriftSnapshotRequest

    @Override
    @TransactionAttribute
    public void createTemplateChangeSet(Subject subject, int templateId, int driftDefId, int snapshotVersion) {
        DriftDefinitionTemplate template = entityMgr.find(DriftDefinitionTemplate.class, templateId);
        DriftSnapshot snapshot = driftMgr.getSnapshot(subject, new DriftSnapshotRequest(driftDefId, snapshotVersion));

        DriftChangeSetDTO changeSetDTO = new DriftChangeSetDTO();
        changeSetDTO.setCategory(COVERAGE);
        changeSetDTO.setDriftHandlingMode(normal);
        changeSetDTO.setVersion(0);
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.