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 java.lang.Object implements ExportDataProcessorService, org.springframework.beans.factory.BeanFactoryAware
Default implementation ofExportDataProcessorService.
-
-
Constructor Summary
Constructors Constructor Description DefaultExportDataProcessorService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcomputeFilename(org.springframework.messaging.Message<?> message, PipelineConfig pipelineConfig)Compute the filename of the generated file for the export event.java.lang.ObjectconvertItem(org.springframework.messaging.Message<? extends ItemModel> message, PipelineConfig pipelineConfig)Convert the Item model to a POJOjava.lang.ObjectconvertOutput(java.util.List<java.lang.Object> records, PipelineConfig pipelineConfig)Convert a POJO to an object that could be outputted to file.protected <T> TevalExpression(org.springframework.messaging.Message<?> message, java.lang.String expressionString, java.lang.Class<T> resultType)protected org.springframework.beans.factory.BeanFactorygetBeanFactory()protected ModelServicegetModelService()java.lang.ObjectlookupBean(java.lang.String beanName)Lookup the bean with the name specifiedItemModellookupItemForPk(PK pk)Get the Item model for the specified PKjava.util.List<PK>search(org.springframework.messaging.Message<ExportDataEvent> message, PipelineConfig pipelineConfig)Search for a list of items.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidsetModelService(ModelService modelService)
-
-
-
Method Detail
-
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
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
lookupBean
public java.lang.Object lookupBean(java.lang.String beanName)
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 java.lang.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 interfaceExportDataProcessorServicepipelineConfig- the configuration used in this export- Returns:
- the filename
-
search
public java.util.List<PK> search(org.springframework.messaging.Message<ExportDataEvent> message, @Header("pipelineConfig") PipelineConfig pipelineConfig) throws java.lang.Throwable
Description copied from interface:ExportDataProcessorServiceSearch for a list of items.- Specified by:
searchin interfaceExportDataProcessorServicepipelineConfig- object that holds the export configuration- Returns:
- List of item PK's
- Throws:
java.lang.Throwable
-
lookupItemForPk
public ItemModel lookupItemForPk(PK pk)
Description copied from interface:ExportDataProcessorServiceGet the Item model for the specified PK- Specified by:
lookupItemForPkin interfaceExportDataProcessorService- Returns:
- Item model for the specified PK
-
convertItem
public java.lang.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 java.lang.Object convertOutput(java.util.List<java.lang.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
protected <T> T evalExpression(org.springframework.messaging.Message<?> message, java.lang.String expressionString, java.lang.Class<T> resultType)
-
-