Fixed import and sonar issues

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
kaizimmerm
2016-09-20 18:30:31 +02:00
parent ca23b6e1b8
commit 1000ca3d19
12 changed files with 56 additions and 43 deletions

View File

@@ -15,7 +15,7 @@ import java.util.Map;
import org.eclipse.hawkbit.ui.common.AbstractAcceptCriteria;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.common.collect.Maps;
import com.vaadin.spring.annotation.SpringComponent;
import com.vaadin.spring.annotation.ViewScope;
import com.vaadin.ui.Component;

View File

@@ -20,12 +20,12 @@ import org.eclipse.hawkbit.ui.artifacts.state.CustomFile;
import org.eclipse.hawkbit.ui.common.confirmwindow.layout.AbstractConfirmationWindowLayout;
import org.eclipse.hawkbit.ui.common.confirmwindow.layout.ConfirmationTab;
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.springframework.beans.factory.annotation.Autowired;
import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.common.collect.Maps;
import com.vaadin.data.Container;
import com.vaadin.data.Item;
import com.vaadin.data.util.IndexedContainer;

View File

@@ -24,11 +24,11 @@ import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
import org.eclipse.hawkbit.ui.distributions.smtable.SwMetadataPopupLayout;
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
import org.eclipse.hawkbit.ui.utils.TableColumn;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
@@ -36,7 +36,7 @@ import org.vaadin.addons.lazyquerycontainer.LazyQueryDefinition;
import org.vaadin.spring.events.EventScope;
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.common.collect.Maps;
import com.vaadin.data.Container;
import com.vaadin.data.Item;
import com.vaadin.event.dd.DragAndDropEvent;

View File

@@ -27,13 +27,13 @@ import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleNoBorderWithIcon;
import org.eclipse.hawkbit.ui.layouts.AbstractCreateUpdateTagLayout;
import org.eclipse.hawkbit.ui.management.targettable.TargetAddUpdateWindowLayout;
import org.eclipse.hawkbit.ui.utils.I18N;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.vaadin.hene.flexibleoptiongroup.FlexibleOptionGroupItemComponent;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.vaadin.data.Container.ItemSetChangeEvent;
import com.vaadin.data.Container.ItemSetChangeListener;
import com.vaadin.data.Property.ValueChangeEvent;

View File

@@ -30,8 +30,8 @@ import org.eclipse.hawkbit.ui.utils.UINotification;
import org.springframework.beans.factory.annotation.Autowired;
import org.vaadin.spring.events.EventBus;
import com.google.gwt.thirdparty.guava.common.collect.Iterables;
import com.google.gwt.thirdparty.guava.common.collect.Sets;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.vaadin.data.Container;
import com.vaadin.data.Item;
import com.vaadin.event.Transferable;

View File

@@ -240,11 +240,10 @@ public class DelayedEventBusPushStrategy implements EventPushStrategy {
private void fowardBulkEvents(final List<org.eclipse.hawkbit.eventbus.event.Event> events,
final SecurityContext userContext) {
final Set<Class<?>> filterBulkEvenTypes = eventProvider.getFilteredBulkEventsType(events);
publishBulkEvent(events, userContext, filterBulkEvenTypes);
for (final Class<?> bulkType : filterBulkEvenTypes) {
final List<org.eclipse.hawkbit.eventbus.event.Event> listBulkEvents = events.stream()
.filter(event -> DelayedEventBusPushStrategy.this.eventSecurityCheck(userContext, event)
.filter(event -> DelayedEventBusPushStrategy.eventSecurityCheck(userContext, event)
&& bulkType.isInstance(event))
.collect(Collectors.toList());
if (!listBulkEvents.isEmpty()) {
@@ -253,15 +252,10 @@ public class DelayedEventBusPushStrategy implements EventPushStrategy {
}
}
private void publishBulkEvent(final List<org.eclipse.hawkbit.eventbus.event.Event> events,
final SecurityContext userContext, final Set<Class<?>> filterBulkEvenTypes) {
}
private void fowardSingleEvents(final List<org.eclipse.hawkbit.eventbus.event.Event> events,
final SecurityContext userContext) {
events.stream()
.filter(event -> DelayedEventBusPushStrategy.this.eventSecurityCheck(userContext, event)
.filter(event -> DelayedEventBusPushStrategy.eventSecurityCheck(userContext, event)
&& eventProvider.getSingleEvents().contains(event.getClass()))
.forEach(event -> eventBus.publish(vaadinUI, event));
}