Class ServicelayerTestLogic

java.lang.Object
de.hybris.platform.servicelayer.ServicelayerTestLogic
Direct Known Subclasses:
IntegrationTestUtil

public class ServicelayerTestLogic extends Object
This class holds common logic used in Servicelayer Test
  • Constructor Details

    • ServicelayerTestLogic

      public ServicelayerTestLogic()
  • Method Details

    • createCoreData

      public static void createCoreData() throws Exception
      Throws:
      Exception
    • createDefaultCatalog

      public static void createDefaultCatalog() throws Exception
      Throws:
      Exception
    • createHardwareCatalog

      public static void createHardwareCatalog() throws Exception
      Throws:
      Exception
    • createDefaultUsers

      public static void createDefaultUsers() throws Exception
      Throws:
      Exception
    • importData

      public void importData(String resource, String encoding, ImportService importService) throws ImpExException
      Imports given file from classpath using given encoding. Fails in case of import errors.
      Parameters:
      resource - location of classpath resource that will be imported
      encoding - encoding of classpath resource
      Throws:
      ImpExException
    • importData

      public void importData(ImpExResource resource, ImportService importService) throws ImpExException
      Imports given resource. Fails in case of import errors.
      Parameters:
      resource - impex resource to load
      Throws:
      ImpExException
    • importData

      public ImportResult importData(ImportConfig config, ImportService importService) throws ImpExException
      Performs import using provided config. Fails in case of import errors.
      Parameters:
      config - with import details.
      Returns:
      import result
      Throws:
      ImpExException
    • importCsv

      protected static void importCsv(String csvFile, String encoding) throws ImpExException
      Imports given csv file from classpath using given encoding. Fails in case of import errors.
      Parameters:
      csvFile - name of file to import from classpath
      encoding - encoding to use
      Throws:
      ImpExException
    • importStream

      protected static void importStream(InputStream is, String encoding, String resourceName) throws ImpExException
      Throws:
      ImpExException
    • importStream

      protected static void importStream(InputStream is, String encoding, String resourceName, boolean hijackExceptions) throws ImpExException
      Throws:
      ImpExException
    • isPrefetchModeNone

      protected boolean isPrefetchModeNone()
      method returns true if configured attribute prefetch mode is NONE. This must be consistsnt with logic at ItemModelConverter#readPrefetchSettings