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

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


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

            @Override
View Full Code Here


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

            @Override
View Full Code Here

            GWTServiceLookup.getAlertTemplateService().createAlertTemplate(alertDefinition,
                Integer.valueOf(this.resourceType.getId()), new AsyncCallback<Integer>() {
                    @Override
                    public void onSuccess(Integer result) {
                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_alert_definitions_create_success(), Severity.Info));
                        alertDefinition.setId(result.intValue());
                        TemplateAlertDefinitionsView.this.refresh();
                        resultReceiver.onSuccess(alertDefinition);
                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError(MSG.view_alert_definitions_create_failure(), caught);
                        resultReceiver.onFailure(caught);
                    }
                });
        } else {
            GWTServiceLookup.getAlertTemplateService().updateAlertTemplate(alertDefinition, resetMatching,
                new AsyncCallback<AlertDefinition>() {
                    @Override
                    public void onSuccess(AlertDefinition result) {
                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_alert_definitions_update_success(), Severity.Info));
                        TemplateAlertDefinitionsView.this.refresh();
                        resultReceiver.onSuccess(result);
                    }

                    @Override
View Full Code Here

        addMember(buttonbar);

        refresh();

        if (!this.hasWriteAccess) {
            Message message = new Message(MSG.view_configurationDetails_noPermission(), Message.Severity.Info,
                EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            CoreGUI.getMessageCenter().notify(message);
        }
    }
View Full Code Here

                public void onFailure(Throwable caught) {
                    CoreGUI.getErrorHandler().handleError(MSG.view_configurationDetails_error_updateFailure(), caught);
                }

                public void onSuccess(Void result) {
                    Message message = new Message(MSG.view_drift_success_defUpdated(), Message.Severity.Info);

                    switch (context.getType()) {
                    case Resource:
                        int resourceId = context.getResourceId();
View Full Code Here

    }

    @Override
    public void propertyValueChanged(PropertyValueChangeEvent event) {
        MessageCenter messageCenter = CoreGUI.getMessageCenter();
        Message message;
        if (event.isInvalidPropertySetChanged()) {
            Map<String, String> invalidPropertyNames = event.getInvalidPropertyNames();
            if (invalidPropertyNames.isEmpty()) {
                this.saveButton.enable();
                message = new Message(MSG.view_configurationDetails_allPropertiesValid(), Message.Severity.Info,
                    EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            } else {
                this.saveButton.disable();
                message = new Message(MSG.view_configurationDetails_somePropertiesInvalid(invalidPropertyNames.values()
                    .toString()), Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
            }
            messageCenter.notify(message);
        } else if (event.getInvalidPropertyNames().isEmpty()) {
            this.saveButton.enable();
View Full Code Here

            rc.fetchResourceType(true);
            GWTServiceLookup.getDriftService().updateDriftDefinition(context, getNewDriftDefinition(),
                new AsyncCallback<Void>() {
                    public void onSuccess(Void result) {
                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_drift_wizard_addDef_success(getNewDriftDefinition().getName()),
                                Message.Severity.Info));
                        getView().closeDialog();
                        DriftAddDefinitionWizard.this.table.refresh();
                    }

                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError(
                            MSG.view_drift_wizard_addDef_failure(getNewDriftDefinition().getName()), caught);
                        getView().closeDialog();
                    }
                });

            break;

        case ResourceTemplate:
            GWTServiceLookup.getDriftService().createTemplate(getType().getId(), getNewDriftDefinition(),
                new AsyncCallback<DriftDefinitionTemplate>() {
                    public void onSuccess(DriftDefinitionTemplate result) {

                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_drift_wizard_addTemplate_success(getNewDriftDefinition().getName()),
                                Message.Severity.Info));
                        getView().closeDialog();
                        DriftAddDefinitionWizard.this.table.refresh();
                    }
View Full Code Here

                    try {
                        if (validate()) {
                            prefs.begin = advancedStartItem.getValueAsDate().getTime();
                            prefs.end = advancedEndItem.getValueAsDate().getTime();
                            if (null != prefs.begin && null != prefs.end && prefs.begin > prefs.end) {
                                CoreGUI.getMessageCenter().notify(new Message(MSG.view_measureTable_startBeforeEnd()));
                            } else {
                                setMetricRangeProperties(prefs);
                            }
                        }
                    } catch (Exception ex) {
View Full Code Here

                }
            }
        } catch (Exception e) {
            // in case any odd errors occur (like bad format of preference strings), just fill in some defaults
            CoreGUI.getMessageCenter().notify(
                new Message("Failed to get range user preferences, using defaults", e, Severity.Warning));
            assignDefaultsToSimpleItems();
            assignDefaultsToAdvancedItems();
        }

        markForRedraw();
View Full Code Here

                            refreshTableInfo();
                        }

                        public void onSuccess(Void result) {
                            CoreGUI.getMessageCenter().notify(
                                new Message(MSG.view_inventory_groups_deleteSuccessful(), Severity.Info));
                            refresh(true);
                        }
                    });
                }
            });
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.