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 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:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)
    • lookupBean

      public Object lookupBean(String beanName)
      Description copied from interface: ExportDataProcessorService
      Lookup the bean with the name specified
      Specified by:
      lookupBean in interface ExportDataProcessorService
      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: ExportDataProcessorService
      Compute the filename of the generated file for the export event.
      Specified by:
      computeFilename in interface ExportDataProcessorService
      Parameters:
      message - message containing the event
      pipelineConfig - 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: ExportDataProcessorService
      Search for a list of items.
      Specified by:
      search in interface ExportDataProcessorService
      Parameters:
      message - message containing the event
      pipelineConfig - object that holds the export configuration
      Returns:
      List of item PK's
      Throws:
      Throwable - throwable
    • lookupItemForPk

      public ItemModel lookupItemForPk(PK pk)
      Description copied from interface: ExportDataProcessorService
      Get the Item model for the specified PK
      Specified by:
      lookupItemForPk in interface ExportDataProcessorService
      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: ExportDataProcessorService
      Convert the Item model to a POJO
      Specified by:
      convertItem in interface ExportDataProcessorService
      Parameters:
      message - message that contains the Item model
      pipelineConfig - 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: ExportDataProcessorService
      Convert a POJO to an object that could be outputted to file.
      Specified by:
      convertOutput in interface ExportDataProcessorService
      Parameters:
      records - List of POJO's
      pipelineConfig - 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, String expressionString, Class<T> resultType)