Class AbstractExampleImportResolver

java.lang.Object
com.broadleafcommerce.dataimport.service.AbstractExampleImportResolver
All Implemented Interfaces:
ExampleImportResolver
Direct Known Subclasses:
CompleteProductExampleImportResolver, DefaultExampleImportResolver, PriceDataExampleImportResolver, UserExampleImportResolver

public abstract class AbstractExampleImportResolver extends Object implements ExampleImportResolver
Provides a shared mechanism to return a non-existing Resource in the event that this component can't resolve a resource since one can programmatically determine if a Resource exists. These components are typically ordered, so returning a Resource that doesn't exist allows us to iterate over these and find one that does.
Author:
Kelly Tisdell (ktisdell)
  • Constructor Details

    • AbstractExampleImportResolver

      public AbstractExampleImportResolver()
  • Method Details

    • getNonExistentResource

      protected org.springframework.core.io.Resource getNonExistentResource(String type, String fileType)
      If we can't resolve this, then return a ClassPathResource pointing to a file that does not exist. There is logic to filter resources that don't exist. These components are ordered, so they will eventually get to the DefaultExampleImportResolver, which will attempt a generic construction of the resource.
      Parameters:
      type -
      fileType -
      Returns: