UI error handling refactoring (#1106)

* refactored HawkbitUIErrorHandler to delegate error details extraction to external extractor beans
* refactored ui error handling, allowed ui error details extractors to return a list of error details
* added license headers, restructured package structure
* adapted javadocs
* fixed sonar findings
* fixed license header
* added tests for HawkbitUIErrorHandler
* refactored ConstraintViolationErrorExtractor, added test for extractors
* changed UI tests feature to Management UI
* fixed the parent/child error type resolution by ui error details extractor, added test

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
This commit is contained in:
Bondar Bogdan
2021-04-22 08:19:45 +02:00
committed by GitHub
parent cf67467fb5
commit 5bcaf3d99b
14 changed files with 840 additions and 154 deletions

View File

@@ -9,9 +9,9 @@
package org.eclipse.hawkbit.app;
import org.eclipse.hawkbit.ui.AbstractHawkbitUI;
import org.eclipse.hawkbit.ui.ErrorView;
import org.eclipse.hawkbit.ui.UiProperties;
import org.eclipse.hawkbit.ui.components.NotificationUnreadButton;
import org.eclipse.hawkbit.ui.error.ErrorView;
import org.eclipse.hawkbit.ui.menu.DashboardMenu;
import org.eclipse.hawkbit.ui.push.EventPushStrategy;
import org.eclipse.hawkbit.ui.push.UIEventProvider;
@@ -21,6 +21,7 @@ import org.springframework.context.ApplicationContext;
import org.vaadin.spring.events.EventBus.UIEventBus;
import com.vaadin.annotations.Push;
import com.vaadin.server.ErrorHandler;
import com.vaadin.shared.communication.PushMode;
import com.vaadin.shared.ui.ui.Transport;
import com.vaadin.spring.annotation.SpringUI;
@@ -49,9 +50,9 @@ public class MyUI extends AbstractHawkbitUI {
MyUI(final EventPushStrategy pushStrategy, final UIEventBus eventBus, final UIEventProvider eventProvider,
final SpringViewProvider viewProvider, final ApplicationContext context, final DashboardMenu dashboardMenu,
final ErrorView errorview, final NotificationUnreadButton notificationUnreadButton,
final UiProperties uiProperties, final VaadinMessageSource i18n) {
final UiProperties uiProperties, final VaadinMessageSource i18n, final ErrorHandler uiErrorHandler) {
super(pushStrategy, eventBus, eventProvider, viewProvider, context, dashboardMenu, errorview,
notificationUnreadButton, uiProperties, i18n);
notificationUnreadButton, uiProperties, i18n, uiErrorHandler);
}
}