NAME
Kernel::WebApp::Controller::API::Role::ProvidesBusinessObjectExportList – Role that provides methods to manage business object export list content.
PUBLIC INTERFACE
Provides methods to manage business object list content. The role consumer has to provide the method ValidationJSONBodyFields of role Kernel::WebApp::Controller::API::Role::ValidatesInputData, that will be extended with needed parameters to be validated.
has ItemIDs
This attribute contains the list of item ids, that are provided via the ItemSearch
method by the related endpoint.
has ItemList
This attribute contains the list of items, that are provided via the _BuildItemList
method.
has TotalItems
This attribute contains the total count of items, that are provided via the DiscoverTotalItems
method by the related endpoint.
requires ItemSearch
Every endpoint that consumes this role, must implement a method ItemSearch
, provides the list of items to be displayed in the related business object list.
has ItemDetailDataDynamicFields
This attribute contains the list of dynamic fields which should be included in the item detail data.
has SelectedItemIDs
This attribute contains the selected item ids, for the case that we have no full export.
has ExportColumns
This attribute contains the list of dynamic fields which should be included in the item detail data.
has LanguageObject
This attribute contains the language object.
has UserData
Attribute that holds all user information.
around ValidationQueryParameters
Deactivate the query parameters from the base business object role.
around ValidationJSONBodyFields
Injects validators
to the validation schema for needed business object export list related fields. For more information, please refer to Kernel::WebApp::Controller::API::Role::ValidatesInputData.
BusinessObjectGenerateExportListFile()
This method builds the for the export list file.
Returns:
$File = {
ContentType => '..',
Content => '...',
Filename => '...'
};
PRIVATE INTERFACE
_BuildExportListFileForFormatCSV()
This method builds the export list file for the format 'CSV'.
_BuildExportListFileForFormatExcel()
This method builds the export list file for the format 'Excel'.
_BuildExportListFileForFormatPDF()
This method builds the export list file for the format 'PDF'.
_BuildExportListHeaderAndData()
This method builds the export list header and data.
_GetSeparator()
Get the separator from the current user or the language object.
_GetFileName()
Generate the filename for the export file.
_BuildItemList()
Initializes the attribute ItemList
.
PRIVATE INTERFACE
_BuildActiveFilters()
Add SelectedItemIDs to active filters, if present
_BuildItemDetailDataDynamicFields()
Initializes the attribute ItemDetailDataDynamicFields
.
_BuildSelectedItemIDs()
Initializes the attribute SelectedItemIDs
.
_BuildExportColumns()
Initializes the attribute ExportColumns
.
_BuildLanguageObject()
Initializes the attribute LanguageObject
.
_BuildUserData()
Initializes the attribute UserData
.