ExecutionErrorListPresenter extends AbstractMultiGridPresenter<ExecutionErrorSummary, ExecutionErrorListPresenter.ExecutionErrorListView> { @Override public ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter) { if (columnFilter instanceof CoreFunctionFilter) { CoreFunctionFilter coreFunctionFilter = (CoreFunctionFilter) columnFilter; if (columnFilter.getColumnId().equals(COLUMN_ERROR_ACK) && coreFunctionFilter.getType() == CoreFunctionType.EQUALS_TO) { return new ActiveFilterItem<>(constants.Acknowledged(), getStatusColumnFilterDescription(columnFilter), null, coreFunctionFilter.getParameters(), v -> removeActiveFilter(columnFilter)); } if (columnFilter.getColumnId().equals(COLUMN_ERROR_TYPE) && (coreFunctionFilter.getType() == CoreFunctionType.IN || coreFunctionFilter.getType() == CoreFunctionType.EQUALS_TO)) { return new ActiveFilterItem<>(constants.Type(), getTypeColumnFilterDescription(columnFilter), null, coreFunctionFilter.getParameters(), v -> removeActiveFilter(columnFilter)); } } return super.getActiveFilterFromColumnFilter(columnFilter); }  void createListBreadcrumb(); void setupDetailBreadcrumb(String detailLabel); void acknowledgeExecutionError(final String executionErrorId,
                                          final String deploymentId); void goToJob(ExecutionErrorSummary errorSummary); Predicate<ExecutionErrorSummary> getAcknowledgeActionCondition(); Predicate<ExecutionErrorSummary> getViewJobActionCondition(); Predicate<ExecutionErrorSummary> getViewProcessInstanceActionCondition(); Predicate<ExecutionErrorSummary> getViewTaskActionCondition(); void goToProcessInstance(final ExecutionErrorSummary errorSummary); void goToTask(final ExecutionErrorSummary errorSummary); void bulkAcknowledge(List<ExecutionErrorSummary> execErrorsSelected); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @Override void selectSummaryItem(final ExecutionErrorSummary summary); @Inject void setFilterSettingsManager(final ExecutionErrorListFilterSettingsManager filterSettingsManager); @Inject void setExecutorService(final Caller<ExecutorService> executorService); @Override void setupActiveSearchFilters(); @Override boolean existActiveSearchFilters(); @Override ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter); String getStatusColumnFilterDescription(ColumnFilter columnFilter); String getTypeColumnFilterDescription(ColumnFilter columnFilter); void setExecutionErrorSelectedEvent(Event<ExecutionErrorSelectedEvent> executionErrorSelectedEvent);  }
@Test public void testActiveFilterLabelAck() { ColumnFilter testColumFilter = equalsTo(COLUMN_ERROR_ACK, 0); ActiveFilterItem activeFilterItem = presenter.getActiveFilterFromColumnFilter(testColumFilter); assertEquals(Constants.INSTANCE.Acknowledged(), activeFilterItem.getKey()); assertEquals("Acknowledged: No", activeFilterItem.getLabelValue()); assertNotEquals(testColumFilter.toString(), activeFilterItem.getLabelValue()); }
@Test public void testActiveFilterLabelType() { ColumnFilter testColumFilter = equalsTo(COLUMN_ERROR_TYPE, Arrays.asList(ExecutionErrorType.JOB.getType(), ExecutionErrorType.DB.getType())); ActiveFilterItem activeFilterItem = presenter.getActiveFilterFromColumnFilter(testColumFilter); assertEquals(Constants.INSTANCE.Type(), activeFilterItem.getKey()); assertEquals("Type: Job, DB", activeFilterItem.getLabelValue()); assertNotEquals(testColumFilter.toString(), activeFilterItem.getLabelValue()); }
@Test public void testActiveFilterLabelOther() { ColumnFilter testColumFilter = equalsTo(COLUMN_PROCESS_INST_ID, 1); ActiveFilterItem activeFilterItem = presenter.getActiveFilterFromColumnFilter(testColumFilter); assertEquals(COLUMN_PROCESS_INST_ID, activeFilterItem.getKey()); assertEquals(testColumFilter.toString(), activeFilterItem.getLabelValue()); testColumFilter = equalsTo(COLUMN_JOB_ID, 1); activeFilterItem = presenter.getActiveFilterFromColumnFilter(testColumFilter); assertEquals(COLUMN_JOB_ID, activeFilterItem.getKey()); assertEquals(testColumFilter.toString(), activeFilterItem.getLabelValue()); }