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

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


    @Override
    protected void save(DSRequest requestProperties) {
        if ((null != this.operationParametersConfigurationEditor && !this.operationParametersConfigurationEditor
            .isValid()) || !this.triggerEditor.validate()) {
            {
                Message message = new Message(MSG.widget_recordEditor_warn_validation(this.getDataTypeName()),
                    Severity.Warning, EnumSet.of(Option.Transient));
                CoreGUI.getMessageCenter().notify(message);

                return;
            }
View Full Code Here


                    case RESET:
                        OperationHistory operationExample = getOperationExample();
                        if (operationExample != null) {
                            Configuration exampleParameters = operationExample.getParameters();
                            if (exampleParameters == null) {
                                Message message = new Message(
                                    MSG.view_operationScheduleDetails_example_null_parameters(), Severity.Warning);
                                CoreGUI.getMessageCenter().notify(message);
                            } else if (!ConfigurationUtility.validateConfiguration(exampleParameters,
                                parametersDefinition).isEmpty()) {
                                Message message = new Message(
                                    MSG.view_operationScheduleDetails_example_parameters_invalid(), Severity.Warning);
                                CoreGUI.getMessageCenter().notify(message);
                            } else {
                                operationParameters = exampleParameters.deepCopy(false);
                                break;
View Full Code Here

        super.onDraw();
        if (this.groupPerms.isInventory()) {
            loadConfigurationDefinition();
            loadConfigurations();
        } else {
            CoreGUI.getMessageCenter().notify(new Message(MSG.view_group_resConfig_view_noperm()));
        }
    }
View Full Code Here

    }

    private void handleLoadFailure(Throwable caught) {
        if (caught.getMessage().contains("ConfigurationUpdateStillInProgressException")) {
            CoreGUI.getMessageCenter().notify(
                new Message(MSG.view_group_resConfig_members_fetchFailureConfigInProgress(), caught, Severity.Info));
        } else {
            CoreGUI.getErrorHandler().handleError(
                MSG.view_group_resConfig_members_fetchFailureConfig(group.toString()), caught);
        }
    }
View Full Code Here

        super.onDraw();

        refresh();

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

    private void handleLoadFailure(Throwable caught) {
        refreshing = false;
        if (caught.getMessage().contains("ConfigurationUpdateStillInProgressException")) {
            final String msg = MSG.view_group_resConfig_edit_loadFail(group.toString());
            CoreGUI.getMessageCenter().notify(new Message(msg, Message.Severity.Warning));
        } else {
            CoreGUI.getErrorHandler().handleError(MSG.view_group_resConfig_edit_loadFail(group.toString()), caught);
        }
    }
View Full Code Here

                public void onSuccess(Void result) {
                    String configHistoryUrl = LinkManager.getEntityTabLink(EntityContext.forGroup(group),
                        ResourceDetailView.Tab.Configuration.NAME,
                        ResourceDetailView.Tab.Configuration.SubTab.HISTORY);
                    String configHistoryView = configHistoryUrl.substring(1); // chop off the leading '#'
                    Message message = new Message(MSG.view_group_resConfig_edit_saveInitiated_concise(), MSG
                        .view_group_resConfig_edit_saveInitiated_full(group.getResourceType().getName(),
                            group.getName()), Message.Severity.Info);
                    CoreGUI.goToView(configHistoryView, message);
                }
            });
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_group_resConfig_edit_valid(), Message.Severity.Info, EnumSet.of(
                    Message.Option.Transient, Message.Option.Sticky));
            } else {
                this.saveButton.disable();
                message = new Message(MSG.view_group_resConfig_edit_invalid(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

                            String messageConcise = MSG.view_bundle_revertWizard_confirmStep_noLiveDeployment_concise();
                            String message = MSG.view_bundle_revertWizard_confirmStep_noLiveDeployment(wizard
                                .getDestination().toString());
                            wizard.getView().showMessage(message);
                            CoreGUI.getMessageCenter().notify(
                                new Message(messageConcise, message, Message.Severity.Warning));
                        }

                        wizard.setLiveDeployment(liveDeployments.get(0));
                        Integer replacedBundleDeploymentId = wizard.getLiveDeployment().getReplacedBundleDeploymentId();

                        if (null == replacedBundleDeploymentId) {
                            nextPage = false;
                            String messageConcise = MSG
                                .view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
                            String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(wizard
                                .getLiveDeployment().toString(), wizard.getDestination().toString());
                            wizard.getView().showMessage(message);
                            CoreGUI.getMessageCenter().notify(
                                new Message(messageConcise, message, Message.Severity.Warning));
                        }

                        // Get the Replaced Deployment (the one we want to revert to_
                        BundleDeploymentCriteria c = new BundleDeploymentCriteria();
                        c.addFilterId(replacedBundleDeploymentId);
                        bundleServer.findBundleDeploymentsByCriteria(c, //
                            new AsyncCallback<PageList<BundleDeployment>>() {

                                public void onSuccess(PageList<BundleDeployment> replacedBundleDeployments) {
                                    if (1 != replacedBundleDeployments.size()) {
                                        nextPage = false;
                                        String messageConcise = MSG
                                            .view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
                                        String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(
                                            wizard.getLiveDeployment().toString(), wizard.getDestination().toString());
                                        wizard.getView().showMessage(message);
                                        CoreGUI.getMessageCenter().notify(
                                            new Message(messageConcise, message, Message.Severity.Warning));
                                    }

                                    wizard.setPreviousDeployment(replacedBundleDeployments.get(0));
                                    setLayout();
                                }

                                public void onFailure(Throwable caught) {
                                    nextPage = false;
                                    String messageConcise = MSG
                                        .view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
                                    String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(wizard
                                        .getLiveDeployment().toString(), wizard.getDestination().toString());
                                    wizard.getView().showMessage(message);
                                    CoreGUI.getMessageCenter().notify(
                                        new Message(messageConcise, message, Message.Severity.Warning));
                                }
                            });
                    }

                    public void onFailure(Throwable caught) {
View Full Code Here

                BundleGWTServiceAsync bundleManager = GWTServiceLookup.getBundleService();
                bundleManager.deleteBundleGroups(doomedIds, new AsyncCallback<Void>() {
                    public void onFailure(Throwable caught) {
                        String names = doomedNames.toString();
                        String error = ErrorHandler.getAllMessages(caught);
                        Message m = new Message(MSG.view_bundleGroup_deletesFailure(), names + "<br/>\n" + error,
                            Severity.Error);
                        CoreGUI.getMessageCenter().notify(m);
                    }

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