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

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


    public void handleError(String message) {
        handleError(message, null);
    }

    public void handleError(String message, Throwable t) {
        Severity severity;

        if ((t != null) && (t instanceof com.google.gwt.http.client.RequestTimeoutException)) {
            // if its a timeout exception, log it as a warning since the request might still complete on the server
            severity = Message.Severity.Warning;
            message = MSG.common_msg_asyncTimeout(message);
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

                    for (String optString : optionsArray) {
                        options.add(Option.valueOf(optString));
                    }
                }

                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) {
View Full Code Here

        severityField.setShowHover(true);
        severityField.setHoverCustomizer(new HoverCustomizer() {
            @Override
            public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
                try {
                    Severity severity = ((Message) record.getAttributeAsObject(FIELD_OBJECT)).getSeverity();
                    switch (severity) {
                    case Info:
                        return MSG.common_severity_info();
                    case Warning:
                        return MSG.common_severity_warn();
                    case Error:
                        return MSG.common_severity_error();
                    case Fatal:
                        return MSG.common_severity_fatal();
                    }
                } catch (Throwable e) {
                    Log.error("Cannot get severity hover", e);
                }
                return null;
            }
        });
        severityField.setSortNormalizer(new SortNormalizer() {
            @Override
            public Object normalize(ListGridRecord record, String fieldName) {
                try {
                    Severity severity = ((Message) record.getAttributeAsObject(FIELD_OBJECT)).getSeverity();
                    return Integer.valueOf(severity.ordinal());
                } catch (Throwable e) {
                    Log.error("Cannot get sort nomalizer", e);
                }
                return Integer.valueOf(0);
            }
View Full Code Here

                        String resourceTypeName = resource.getResourceType().getName();
                        String resourceKey = resource.getResourceKey();

                        String conciseMessage;
                        String detailedMessage;
                        Severity severity;
                        if (!resourceAlreadyExisted) {
                            conciseMessage = MSG.widget_resourceFactoryWizard_importSuccess(resourceTypeName,
                                resourceKey);
                            detailedMessage = null;
                            severity = Severity.Info;
View Full Code Here

TOP

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

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.