Package org.rhq.coregui.client.util.message

Examples of org.rhq.coregui.client.util.message.Message


                            refreshTableInfo();
                        }

                        public void onSuccess(Void result) {
                            String msg = MSG.view_inventory_resources_unignoreSuccessful();
                            CoreGUI.getMessageCenter().notify(new Message(msg, Severity.Info));
                            onActionSuccess();
                        }
                    });

                    return;
View Full Code Here


    private void pinToDefinition() {
        GWTServiceLookup.getDriftService().pinSnapshot(driftDefId, version, new AsyncCallback<Void>() {
            public void onSuccess(Void x) {

                CoreGUI.getMessageCenter().notify(
                    new Message(MSG.view_drift_success_pinToDef(String.valueOf(version)), Message.Severity.Info));
                CoreGUI.goToView(LinkManager.getDriftDefinitionsLink(resourceId));
            }

            public void onFailure(Throwable caught) {
                CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_pinToDef(), caught);
View Full Code Here

        Boolean forceValue = request.getAttributeAsBoolean(RequestAttribute.FORCE);
        boolean force = ((forceValue != null) && forceValue);
        operationService.deleteOperationHistories(new int[] { operationHistoryToRemove.getId() }, force,
            new AsyncCallback<Void>() {
            public void onSuccess(Void result) {
                sendSuccessResponse(request, response, operationHistoryToRemove, new Message("success"));
            }

            public void onFailure(Throwable caught) {
                throw new RuntimeException("Failed to delete " + operationHistoryToRemove + ".", caught);
            }
View Full Code Here

                String results = event.getResults();
                if (processSubmitCompleteResults(results)) {
                    uploadResult = Boolean.TRUE;
                    changeIcon(iconGreen, MSG.view_upload_success());
                    CoreGUI.getMessageCenter().notify(new Message(MSG.view_upload_success(), results, Severity.Info));
                } else {
                    uploadResult = Boolean.FALSE;
                    String cause = "[" + name + "] " + parseCauseFromResponse(results);
                    changeIcon(iconRed, cause);
                    setUploadError(cause);
                    CoreGUI.getMessageCenter().notify(
                        new Message(MSG.view_upload_error_fileName(name), results, Severity.Error));
                }
            }
        };
    }
View Full Code Here

                uploadResult = Boolean.FALSE;
                String cause = MSG.view_upload_error_fileName_2(name);
                changeIcon(iconRed, cause);
                setUploadError(cause);
                CoreGUI.getMessageCenter().notify(new Message(cause, Severity.Error));
            }
        };
    }
View Full Code Here

    protected void processFailure(String msg, Throwable caught) {
        this.lastError = caught;
        EnumSet<Option> options = EnumSet.of(Message.Option.BackgroundJobResult);
        Severity severity = Message.Severity.Error;
        CoreGUI.getMessageCenter().notify(new Message(msg, caught, severity, options));
    }
View Full Code Here

                }

                Severity severity = Severity.valueOf(severityMenu.getValueAsString());
                String conciseMessage = conciseMessageItem.getValueAsString();
                String detailsMessage = detailsMessageItem.getValueAsString();
                Message msg;
                Number exceptionDepth = (Number) exceptionItem.getValue();
                if (exceptionDepth != null && exceptionDepth.intValue() > 0) {
                    Throwable t = null;
                    for (int depth = exceptionDepth.intValue(); depth > 0; depth--) {
                        if (t == null) {
                            t = new Throwable(detailsMessage);
                        } else {
                            t = new Throwable("Exception at depth #" + depth, t);
                        }
                    }
                    msg = new Message(conciseMessage, t, severity, options);
                } else {
                    msg = new Message(conciseMessage, detailsMessage, severity, options);
                }
                CoreGUI.getMessageCenter().notify(msg);
            }
        });
View Full Code Here

            @Override
            public void onSuccess(OperationMode result) {
                if (OperationMode.MAINTENANCE.equals(result)) {
                    getMessageCenter().notify(
                        new Message(MSG.server_maintanance_warning(), Severity.Warning, EnumSet.of(Option.Sticky)));
                }

            }
        });
    }
View Full Code Here

    public void executeFetch(final DSRequest request, final DSResponse response, final ResourceGroupCriteria criteria) {
        groupService.findResourceGroupCompositesByCriteria(criteria,
            new AsyncCallback<PageList<ResourceGroupComposite>>() {
                public void onFailure(Throwable caught) {
                    if (caught.getMessage().contains("SearchExpressionException")) {
                        Message message = new Message(MSG.view_searchBar_suggest_noSuggest(), Message.Severity.Error);
                        CoreGUI.getMessageCenter().notify(message);
                    } else {
                        CoreGUI.getErrorHandler().handleError(MSG.view_inventory_groups_loadFailed(), caught);
                    }
                    response.setStatus(RPCResponse.STATUS_FAILURE);
View Full Code Here

        GWTServiceLookup.getAlertDefinitionService().enableAlertDefinitions(alertDefIds, new AsyncCallback<Integer>() {
            @Override
            public void onSuccess(Integer v) {
                CoreGUI.getMessageCenter().notify(
                    new Message(MSG.view_alert_definitions_enable_success(String.valueOf(alertDefIds.length)),
                        Severity.Info));
                TemplateAlertDefinitionsView.this.refresh();
            }

            @Override
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.util.message.Message

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.