class BusinessAdminTasksPreprocessor extends UserTasksPreprocessor {

    @SuppressWarnings("rawtypes")
    @Override
    public void preprocess(DataSetLookup lookup) {
        if (identityProvider == null || userGroupCallback == null) {
            return;
        }

        if (ADMIN_USER.equals(identityProvider.getName())) {
            return;
        }

        final List<String> groups = Optional.ofNullable(userGroupCallback.getGroupsForUser(identityProvider.getName())).orElse(new ArrayList<>());
        if (groups.stream().filter(s -> s.equals(ADMIN_GROUP)).findFirst().isPresent()) {
            return;
        }

        final List<Comparable> orgEntities = new ArrayList<>(groups);
        orgEntities.add(identityProvider.getName());
        final ColumnFilter columnFilter = equalsTo(COLUMN_ORGANIZATIONAL_ENTITY,
                                                   orgEntities);
        LOGGER.debug("Adding column filter: {}",
                     columnFilter);

        if (lookup.getFirstFilterOp() != null) {
            lookup.getFirstFilterOp().addFilterColumn(columnFilter);
        } else {
            DataSetFilter filter = new DataSetFilter();
            filter.addFilterColumn(columnFilter);
            lookup.addOperation(filter);
        }

        super.preprocess(lookup);
    }

    public  BusinessAdminTasksPreprocessor(IdentityProvider identityProvider,
                                          UserGroupCallback userGroupCallback,
                                          DataSetMetadata metadata);

}