Class DefaultExportDataProcessorService
java.lang.Object
de.hybris.platform.acceleratorservices.dataexport.generic.impl.DefaultExportDataProcessorService
- All Implemented Interfaces:
ExportDataProcessorService,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware
public class DefaultExportDataProcessorService
extends Object
implements ExportDataProcessorService, org.springframework.beans.factory.BeanFactoryAware
Default implementation of
ExportDataProcessorService.-
Constructor Summary
Constructors -
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.protected <T> TevalExpression(org.springframework.messaging.Message<?> message, String expressionString, Class<T> resultType) protected org.springframework.beans.factory.BeanFactoryprotected ModelServicelookupBean(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.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetModelService(ModelService modelService)
-
Constructor Details
-
DefaultExportDataProcessorService
public DefaultExportDataProcessorService()
-
-
Method Details
-
getBeanFactory
protected org.springframework.beans.factory.BeanFactory getBeanFactory() -
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
getModelService
-
setModelService
-
lookupBean
Description copied from interface:ExportDataProcessorServiceLookup the bean with the name specified- Specified by:
lookupBeanin interfaceExportDataProcessorService- Parameters:
beanName- the bean name- Returns:
- the bean
-
computeFilename
public String computeFilename(org.springframework.messaging.Message<?> message, @Header("pipelineConfig") PipelineConfig pipelineConfig) Description copied from interface:ExportDataProcessorServiceCompute the filename of the generated file for the export event.- Specified by:
computeFilenamein interfaceExportDataProcessorService- Parameters:
message- message containing the eventpipelineConfig- the configuration used in this export- Returns:
- the filename
-
search
public List<PK> search(org.springframework.messaging.Message<ExportDataEvent> message, @Header("pipelineConfig") PipelineConfig pipelineConfig) throws Throwable Description copied from interface:ExportDataProcessorServiceSearch for a list of items.- Specified by:
searchin interfaceExportDataProcessorService- Parameters:
message- message containing the eventpipelineConfig- object that holds the export configuration- Returns:
- List of item PK's
- Throws:
Throwable- throwable
-
lookupItemForPk
Description copied from interface:ExportDataProcessorServiceGet the Item model for the specified PK- Specified by:
lookupItemForPkin interfaceExportDataProcessorService- Parameters:
pk- pk to look up- Returns:
- Item model for the specified PK
-
convertItem
public Object convertItem(org.springframework.messaging.Message<? extends ItemModel> message, @Header("pipelineConfig") PipelineConfig pipelineConfig) Description copied from interface:ExportDataProcessorServiceConvert the Item model to a POJO- Specified by:
convertItemin interfaceExportDataProcessorService- 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
public Object convertOutput(List<Object> records, @Header("pipelineConfig") PipelineConfig pipelineConfig) Description copied from interface:ExportDataProcessorServiceConvert a POJO to an object that could be outputted to file.- Specified by:
convertOutputin interfaceExportDataProcessorService- 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
-
evalExpression
-