CsvExportCustomizer

public interface CsvExportCustomizer

The CsvExportCustomizer interface allows to provide custom method to format related instances during csv import.

Methods

columnOrderComparator

Comparator<FieldDto> columnOrderComparator(BrowsingSettingsDto browsingSettingsDtos)

Allows the customizer to change the ordering of columns in the exporter file. The comparator returned by this method will be used for ordering fields. Note that the comparator might be requested to order fields that were not selected for export - it will be used to order the entire collection of fields from the entity.

Returns:the comparator that will be used for determining the column order

exportDisplayName

String exportDisplayName(FieldDto fieldDto)

Retrieves the display name for the given entity field, that will be shown in the top row while exporting instances to CSV/PDF file. By default, the display name of the field is used.

Parameters:
  • fieldDto – entity field to retrieve display name for
Returns:

display name of the given field in the exported files

formatField

String formatField(FieldDto fieldDto, Object object)

Formats the field value for CSV display.

Parameters:
  • fieldDto – the field to format
  • object – the object to format
Returns:

the formatted string that will represent the value in CSV data