Package org.rhq.coregui.client.gwt

Examples of org.rhq.coregui.client.gwt.DriftGWTServiceAsync


        super.onDraw();
        show(this.driftId);
    }

    private void show(final String driftId) {
        final DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
        driftService.getDriftDetails(driftId, new AsyncCallback<DriftDetails>() {
            @Override
            public void onFailure(Throwable caught) {
                CoreGUI.getErrorHandler().handleError("Failed to load drift details for drift id: " + driftId, caught);
            }
View Full Code Here


    }

    private void executeGetSnapshot(final DSRequest request, final DSResponse response,
        DriftSnapshotRequest snapshotRequest) {

        DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();

        driftService.getSnapshot(snapshotRequest, new AsyncCallback<DriftSnapshot>() {
            public void onFailure(Throwable caught) {
                CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_load(), caught);
                response.setStatus(RPCResponse.STATUS_FAILURE);
                processResponse(request.getRequestId(), response);
            }
View Full Code Here

            DriftDefinitionCriteria defCriteria = new DriftDefinitionCriteria();
            defCriteria.addFilterId(driftDefId);
            defCriteria.fetchConfiguration(true);
            defCriteria.fetchTemplate(true);

            DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
            driftService.findDriftDefinitionsByCriteria(defCriteria, new AsyncCallback<PageList<DriftDefinition>>() {
                public void onFailure(Throwable caught) {
                    CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_load(), caught);
                }

                public void onSuccess(PageList<DriftDefinition> result) {
                    DriftDefinition driftDef = result.get(0);
                    String defName = driftDef.getName();
                    String title;
                    if (0 == version) {
                        String isPinned = String.valueOf(driftDef.isPinned());
                        title = MSG.view_drift_table_title_initialSnapshot(defName, isPinned);
                    } else {
                        title = MSG.view_drift_table_title_snapshot(String.valueOf(version), defName);
                    }
                    setTitleString(title);
                    pinnedToTemplate = driftDef.getTemplate() != null && driftDef.getTemplate().isPinned();
                    DriftSnapshotView.super.onDraw();
                }
            });
        } 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) {
                        CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_load(), caught);
                    }
View Full Code Here

            }

            private void executeGetSnapshot(final DSRequest request, final DSResponse response,
                DriftSnapshotRequest snapshotRequest) {

                DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();

                driftService.getSnapshot(snapshotRequest, new AsyncCallback<DriftSnapshot>() {

                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_load(), caught);
                        response.setStatus(RPCResponse.STATUS_FAILURE);
                        processResponse(request.getRequestId(), response);
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.gwt.DriftGWTServiceAsync

Copyright © 2018 www.massapicom. 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.