Interface ExportDataProcessorService
- All Known Implementing Classes:
DefaultExportDataProcessorService
public interface ExportDataProcessorService
ExportDataProcessorService. Main service that queries, looks up and converts data.
-
Method Summary
Modifier and TypeMethodDescriptioncomputeFilename(org.springframework.messaging.Message<?> message, PipelineConfig pipelineConfig) Compute the filename of the generated file for the export event.convertItem(org.springframework.messaging.Message<? extends ItemModel> message, PipelineConfig pipelineConfig) Convert the Item model to a POJOconvertOutput(List<Object> records, PipelineConfig pipelineConfig) Convert a POJO to an object that could be outputted to file.lookupBean(String beanName) Lookup the bean with the name specifiedlookupItemForPk(PK pk) Get the Item model for the specified PKsearch(org.springframework.messaging.Message<ExportDataEvent> message, PipelineConfig pipelineConfig) Search for a list of items.
-
Method Details
-
lookupBean
Lookup the bean with the name specified- Parameters:
beanName- the bean name- Returns:
- the bean
-
computeFilename
String computeFilename(org.springframework.messaging.Message<?> message, PipelineConfig pipelineConfig) Compute the filename of the generated file for the export event.- Parameters:
message- message containing the eventpipelineConfig- the configuration used in this export- Returns:
- the filename
-
search
List<PK> search(org.springframework.messaging.Message<ExportDataEvent> message, PipelineConfig pipelineConfig) throws Throwable Search for a list of items.- Parameters:
message- message containing the eventpipelineConfig- object that holds the export configuration- Returns:
- List of item PK's
- Throws:
Throwable- throwable
-
lookupItemForPk
Get the Item model for the specified PK- Parameters:
pk- pk to look up- Returns:
- Item model for the specified PK
-
convertItem
Object convertItem(org.springframework.messaging.Message<? extends ItemModel> message, PipelineConfig pipelineConfig) Convert the Item model to a POJO- Parameters:
message- message that contains the Item modelpipelineConfig- object that holds the export configuration. Should hold the converter- Returns:
- the POJO representing the Item model
-
convertOutput
Convert a POJO to an object that could be outputted to file.- Parameters:
records- List of POJO'spipelineConfig- pipelineConfig object that holds the export configuration. Should hold the output converter- Returns:
- an object that can be sent to a writer
-