Package de.hybris.platform.servicelayer
Class ServicelayerTestLogic
java.lang.Object
de.hybris.platform.servicelayer.ServicelayerTestLogic
- Direct Known Subclasses:
IntegrationTestUtil
This class holds common logic used in Servicelayer Test
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic voidstatic voidprotected static voidImports given csv file from classpath using given encoding.voidimportData(ImpExResource resource, ImportService importService) Imports given resource.importData(ImportConfig config, ImportService importService) Performs import using provided config.voidimportData(String resource, String encoding, ImportService importService) Imports given file from classpath using given encoding.protected static voidimportStream(InputStream is, String encoding, String resourceName) protected static voidimportStream(InputStream is, String encoding, String resourceName, boolean hijackExceptions) protected booleanmethod returns true if configured attribute prefetch mode is NONE.
-
Constructor Details
-
ServicelayerTestLogic
public ServicelayerTestLogic()
-
-
Method Details
-
createCoreData
- Throws:
Exception
-
createDefaultCatalog
- Throws:
Exception
-
createHardwareCatalog
- Throws:
Exception
-
createDefaultUsers
- 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 importedencoding- encoding of classpath resource- Throws:
ImpExException
-
importData
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
Imports given csv file from classpath using given encoding. Fails in case of import errors.- Parameters:
csvFile- name of file to import from classpathencoding- 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
-