use of org.uberfire.workbench.events.NotificationEvent in project kie-wb-common by kiegroup.
the class EnableProviderTypeWizard method onEnableTypesSuccess.
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()));
}
use of org.uberfire.workbench.events.NotificationEvent in project kie-wb-common by kiegroup.
the class NewProviderWizard method onCreateProviderSuccess.
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()));
}
use of org.uberfire.workbench.events.NotificationEvent in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testStopRuntimeConfirmYesAndSuccessful.
@Test
public void testStopRuntimeConfirmYesAndSuccessful() {
prepareRuntimeStop();
RuntimeKey currentKey = runtime.getKey();
when(translationService.format(RuntimePresenter_RuntimeStopSuccessMessage, item.getRuntime().getKey().getId())).thenReturn(SUCCESS_MESSAGE);
when(translationService.getTranslation(RuntimePresenter_RuntimeStoppingMessage)).thenReturn(BUSY_POPUP_MESSAGE);
yesCommandCaptor.getValue().execute();
verify(runtimeService, times(1)).stopRuntime(currentKey);
verify(popupHelper, times(1)).showBusyIndicator(BUSY_POPUP_MESSAGE);
verify(popupHelper, times(1)).hideBusyIndicator();
verify(notificationEvent, times(1)).fire(new NotificationEvent(SUCCESS_MESSAGE, NotificationEvent.NotificationType.SUCCESS));
}
use of org.uberfire.workbench.events.NotificationEvent in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testForceDeleteRuntimeConfirmYesAndSuccessful.
@Test
public void testForceDeleteRuntimeConfirmYesAndSuccessful() {
prepareRuntimeForceDelete();
RuntimeKey currentKey = runtime.getKey();
when(translationService.format(RuntimePresenter_RuntimeDeleteSuccessMessage, item.getRuntime().getKey().getId())).thenReturn(SUCCESS_MESSAGE);
when(translationService.getTranslation(RuntimePresenter_RuntimeDeletingForcedMessage)).thenReturn(BUSY_POPUP_MESSAGE);
yesCommandCaptor.getValue().execute();
verify(runtimeService, times(1)).deleteRuntime(currentKey, true);
verify(notificationEvent, times(1)).fire(new NotificationEvent(SUCCESS_MESSAGE, NotificationEvent.NotificationType.SUCCESS));
verify(popupHelper, times(1)).showBusyIndicator(BUSY_POPUP_MESSAGE);
verify(popupHelper, times(1)).hideBusyIndicator();
}
use of org.uberfire.workbench.events.NotificationEvent in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testStartRuntimeSuccessful.
@Test
public void testStartRuntimeSuccessful() {
prepareRuntime();
RuntimeKey currentKey = runtime.getKey();
when(translationService.format(RuntimePresenter_RuntimeStartSuccessMessage, currentKey.getId())).thenReturn(SUCCESS_MESSAGE);
when(translationService.getTranslation(RuntimePresenter_RuntimeStartingMessage)).thenReturn(BUSY_POPUP_MESSAGE);
presenter.startRuntime();
verify(popupHelper, times(1)).showBusyIndicator(BUSY_POPUP_MESSAGE);
verify(popupHelper, times(1)).hideBusyIndicator();
verify(notificationEvent, times(1)).fire(new NotificationEvent(SUCCESS_MESSAGE, NotificationEvent.NotificationType.SUCCESS));
}
Aggregations