@Override public void displayNotification(final String text) { notification.fire(new NotificationEvent(text)); } }
private void notifyValidationSuccess() { // the null check is due to tests that are not able to inject Event instance if (notificationEvent != null) { notificationEvent.fire(new NotificationEvent(CommonConstants.INSTANCE.ItemValidatedSuccessfully(), NotificationEvent.NotificationType.SUCCESS)); } } }
@Override public void callback( final Void aVoid ) { notification.fire( new NotificationEvent( view.getRemoteInstanceRemoveSuccessMessage(), NotificationEvent.NotificationType.SUCCESS ) ); } }, new ErrorCallback<Object>() {
@Override public void showOnlySingleEntryAllowed() { notification.fire(new NotificationEvent(StunnerFormsClientFieldsConstants.INSTANCE.Only_single_entry_allowed(), NotificationEvent.NotificationType.ERROR)); }
private RemoteCallback<Void> getDeleteSuccessCallback() { return (Void v) -> { busyIndicatorView.hideBusyIndicator(); notification.fire(new NotificationEvent(CommonConstants.INSTANCE.ItemDeletedSuccessfully())); }; }
@Override public boolean error(final Object o, final Throwable throwable) { notification.fire(new NotificationEvent(view.getStartContainerErrorMessage(), NotificationEvent.NotificationType.ERROR)); updateStatus(KieContainerStatus.DEACTIVATED); return false; } }).activateContainer(containerSpec);
public boolean error(Message message, Throwable t) { notification.fire(new NotificationEvent(StunnerFormsClientFieldsConstants.INSTANCE.Error_retrieving_datatypes(), NotificationEvent.NotificationType.ERROR)); showDataIOEditor(simpleDataTypes); return false; } },
public void fireCancelEvent() { undoChangesEvent.fire(new PreferencesCentralUndoChangesEvent()); notification.fire(new NotificationEvent(view.getChangesUndoneMessage(), NotificationEvent.NotificationType.DEFAULT)); goBackToAdminPage(); }
private void onEnableTypesSuccess(final Collection<ProviderType> providerTypes) { notification.fire(new NotificationEvent(translationService.getTranslation(EnableProviderTypeWizard_ProviderTypeEnableSuccessMessage), NotificationEvent.NotificationType.SUCCESS)); EnableProviderTypeWizard.super.complete(); providerTypeListRefreshEvent.fire(new ProviderTypeListRefreshEvent(providerTypes.iterator().next().getKey())); }
private RemoteCallback<Path> getRenameSuccessCallback(final RenamePopUpPresenter.View renamePopupView) { return (Path path) -> { renamePopupView.hide(); busyIndicatorView.hideBusyIndicator(); notification.fire(new NotificationEvent(CommonConstants.INSTANCE.ItemRenamedSuccessfully())); }; }
@Override public void callback(final WorkspaceProject project) { NewWorkspaceProjectWizard.super.complete(); invokeCallback(project); if (openEditor) { placeManager.goTo("ProjectSettings"); } notificationEvent.fire(new NotificationEvent(CommonConstants.INSTANCE.ItemCreatedSuccessfully())); busyIndicatorView.hideBusyIndicator(); } };
Promise<Void> displaySuccessMessage() { view.hideBusyIndicator(); notificationEvent.fire(new NotificationEvent(view.getSaveSuccessMessage(), SUCCESS)); return promises.resolve(); }
private RemoteCallback<Path> getCopySuccessCallback(final CopyPopUpPresenter.View copyPopupView) { return response -> { copyPopupView.hide(); view.hideBusyIndicator(); notification.fire(new NotificationEvent(org.kie.workbench.common.widgets.client.resources.i18n.CommonConstants.INSTANCE.ItemCopiedSuccessfully(), NotificationEvent.NotificationType.SUCCESS)); }; }
@EventHandler("copy-details-button") private void onCopyDetailsButtonClicked(final @ForEvent("click") elemental2.dom.Event e) { final boolean copySucceeded = clipboard.copy(errorDetails); if (copySucceeded) { notificationEvent.fire(new NotificationEvent(DefaultWorkbenchConstants.INSTANCE.ErrorDetailsSuccessfullyCopiedToClipboard(), SUCCESS)); } else { notificationEvent.fire(new NotificationEvent(DefaultWorkbenchConstants.INSTANCE.ErrorDetailsFailedToBeCopiedToClipboard(), WARNING)); } console.error(errorDetails.textContent); hide(); }
@Override public void callback( final Void o ) { notification.fire( new NotificationEvent( newTemplatePresenter.getView().getNewServerTemplateWizardSaveSuccess(), NotificationEvent.NotificationType.SUCCESS ) ); clear(); NewServerTemplateWizard.super.complete(); serverTemplateListRefreshEvent.fire( new ServerTemplateListRefresh( newServerTemplate.getId() ) ); } }, new ErrorCallback<Object>() {
private void onCreateProviderSuccess(final ProviderConfiguration providerConfiguration) { notification.fire(new NotificationEvent(translationService.getTranslation(NewProviderWizard_ProviderCreateSuccessMessage), NotificationEvent.NotificationType.SUCCESS)); NewProviderWizard.super.complete(); providerTypeSelectedEvent.fire(new ProviderTypeSelectedEvent(providerType.getKey(), providerConfiguration.getId())); }
private RemoteCallback<Void> getDeletePipelineSuccessCallback() { return aVoid -> notification.fire(new NotificationEvent(translationService.format(RuntimePresenter_PipelineExecutionDeleteSuccessMessage, item.getPipelineTrace().getKey().getId()), NotificationEvent.NotificationType.SUCCESS)); }
public void onNodeInstanceCancel(final NodeInstanceSummary node) { processService.call((Void) -> { notification.fire(new NotificationEvent(constants.NodeInstanceCancelled(node.getLabel()), NotificationEvent.NotificationType.SUCCESS)); refreshDetails(); }).cancelProcessInstanceNode(processInstance.getProcessInstanceKey(), node.getId()); }
public void forwardTask(final String entity) { taskService.call(nothing -> { notification.fire(new NotificationEvent(constants.TaskSuccessfullyForwarded())); taskRefreshed.fire(new TaskRefreshedEvent(getServerTemplateId(), getContainerId(), getTaskId())); refreshTaskPotentialOwners(); }).forward(getServerTemplateId(), getContainerId(), getTaskId(), entity); }
public void loadContext(FormModelerContent content) { busyIndicatorView.hideBusyIndicator(); this.content = content; resetEditorPages(content.getOverview()); if (content.getContextTO().isLoadError()) { notification.fire(new NotificationEvent(Constants.INSTANCE.form_modeler_cannot_load_form(content.getPath().getFileName()), NotificationEvent.NotificationType.ERROR)); } view.loadContext(content.getContextTO().getCtxUID()); }