class ImportableColumnController {

    public void detectNonImportableColumns(CSVParseParameters parameters, PreferencesRegistry registry)
    {
        List<String> metaColumns = new ArrayList<String>(Arrays.asList(MetaColumn.COLOR, MetaColumn.HILIGHT, MetaColumn.INDEX,
                MetaColumn.LOB_VISIBLE, MetaColumn.MGRS_DERIVED, MetaColumn.SELECTED, MetaColumn.VISIBLE));
        if (parameters.getColumnNames() != null)
        {
            Map<String, Integer> upperCasedColumnNames = New.map();

            int index = 0;
            for (String columnName : parameters.getColumnNames())
            {
                upperCasedColumnNames.put(columnName.toUpperCase(), Integer.valueOf(index));
                index++;
            }

            for (String columnName : parameters.getColumnNames())
            {
                String key = ourKeyPrefix + columnName.toLowerCase();
                List<String> columnsToNotImport = CSVColumnPrefsUtil.getCustomKeys(registry, key);
                List<String> currentParams = new ArrayList<String>(parameters.getColumnNames());
                List<String> newParams = new ArrayList<String>();
                currentParams.forEach(e ->
                {
                    if (metaColumns.contains(e))
                    {
                        e = e + "_user";
                    }
                    newParams.add(e);
                });
                parameters.setColumnNames(newParams);

                if (columnsToNotImport != null)
                {
                    for (String columns : columnsToNotImport)
                    {
                        String upperCaseColumn = columns.toUpperCase();
                        if (upperCasedColumnNames.containsKey(upperCaseColumn))
                        {
                            parameters.getColumnsToIgnore().add(upperCasedColumnNames.get(upperCaseColumn));
                        }
                    }
                }
            }
        }
    }

}