Interface ExportManager

  • All Known Implementing Classes:

    public interface ExportManager
    While ExportService is purely in charge of CRUD-related operations on Export, this service is a higher level abstraction that performs the surrounding logic of processing export operations. This includes processing requests and emitting the required messages. It internally delegates to ExportService for CRUD operations.

    Resource services should directly interact with this manager rather than the ExportService for export processing.

    For actual processing of exports, the manager delegates to ExportProcessor, and for writing the files, the manager delegates to the ExportFileWriter.

    Samarth Dhruva (samarthd)
    See Also:
    ExportProcessor, ExportFileWriter
    • Method Detail

      • initiateExport

        Export initiateExport​(ExportRequest request,
                              String target,
                              String filterString,
        This method accepts an export request and the context of the request to build a Export and persist it in the data store.

        Sends a ProcessExportRequest message to request that the export be processed.

        request - a request to perform an Export.

        For each of the "exporting context" fields describing where the operation will be performed, the default implementation will first check if the field is supplied in ExportRequest, and if not, use the value from the ContextInfo.

        target - the target of the export. This is some value that can be mapped to a particular domain by the logic performing an export, rather than explicitly requiring the fully qualified classname. Used to populate
        filterString - the filter string that should be used to find the records to export. Used to populate Export.filterString.
        contextInfo - context information surrounding sandboxing and multitenant state
        the newly created Export
        com.broadleafcommerce.common.error.validation.ValidationException - if the request failed validation
        IllegalArgumentException - if request is null or target is blank - if the currently authenticated user is not permitted to perform an export in the final determined exporting context