Package de.hybris.platform.servicelayer
Class ServicelayerTestLogic
- java.lang.Object
-
- de.hybris.platform.servicelayer.ServicelayerTestLogic
-
- Direct Known Subclasses:
IntegrationTestUtil
public class ServicelayerTestLogic extends java.lang.ObjectThis class holds common logic used in Servicelayer Test
-
-
Constructor Summary
Constructors Constructor Description ServicelayerTestLogic()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcreateCoreData()static voidcreateDefaultCatalog()static voidcreateDefaultUsers()static voidcreateHardwareCatalog()protected static voidimportCsv(java.lang.String csvFile, java.lang.String encoding)Imports given csv file from classpath using given encoding.voidimportData(ImpExResource resource, ImportService importService)Imports given resource.ImportResultimportData(ImportConfig config, ImportService importService)Performs import using provided config.voidimportData(java.lang.String resource, java.lang.String encoding, ImportService importService)Imports given file from classpath using given encoding.protected static voidimportStream(java.io.InputStream is, java.lang.String encoding, java.lang.String resourceName)protected static voidimportStream(java.io.InputStream is, java.lang.String encoding, java.lang.String resourceName, boolean hijackExceptions)protected booleanisPrefetchModeNone()method returns true if configured attribute prefetch mode is NONE.
-
-
-
Method Detail
-
createCoreData
public static void createCoreData() throws java.lang.Exception- Throws:
java.lang.Exception
-
createDefaultCatalog
public static void createDefaultCatalog() throws java.lang.Exception- Throws:
java.lang.Exception
-
createHardwareCatalog
public static void createHardwareCatalog() throws java.lang.Exception- Throws:
java.lang.Exception
-
createDefaultUsers
public static void createDefaultUsers() throws java.lang.Exception- Throws:
java.lang.Exception
-
importData
public void importData(java.lang.String resource, java.lang.String encoding, ImportService importService) throws ImpExExceptionImports 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
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(java.lang.String csvFile, java.lang.String encoding) throws ImpExExceptionImports 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(java.io.InputStream is, java.lang.String encoding, java.lang.String resourceName) throws ImpExException- Throws:
ImpExException
-
importStream
protected static void importStream(java.io.InputStream is, java.lang.String encoding, java.lang.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
-
-