public interface ImportService
Callable from Spring controllers to take an uploaded file and process it. The processing of the uploaded file is not
usually done directly by implementors but instead this utilizes a list of FileImportProcessor
that can be used
to distinguish different types of file uploads based on an ImportSpecification
.
Modifier and Type | Method and Description |
---|---|
com.broadleafcommerce.process.domain.Process |
scheduleImport(InputStream input,
ImportScheduleDefinition def)
Schedules an import to be processed as a background event to be picked up via the
ImportProcessExecutor . |
com.broadleafcommerce.process.domain.Process |
scheduleImport(InputStream input,
ImportScheduleDefinition def,
Map<String,String> additionalEventDetails) |
com.broadleafcommerce.process.domain.Process scheduleImport(InputStream input, ImportScheduleDefinition def) throws ImportException, IOException
ImportProcessExecutor
. This will first take the
given input and save it off into a file. Once the file has been saved to the persistent file store via BroadleafFileService
the import event is scheduled and a handle to the Process
is returned that can be used to poll.input
- stream-based input of the data to importdef
- various toggles for how to process the given inputImportException
- if ther was a problem in the importIOException
- if there was a problem reading or processing the given file, or if the file exceeds import.server.max.uploadable.file.size
org.broadleafcommerce.common.exception.ServiceException
- if there was a problem saving the parsed file to the filesystem or persisting the reference to the databaseFileImportProcessor}
com.broadleafcommerce.process.domain.Process scheduleImport(InputStream input, ImportScheduleDefinition def, Map<String,String> additionalEventDetails) throws ImportException, IOException
ImportException
IOException
Copyright © 2020. All rights reserved.