Class ServicelayerTestLogic

  • Direct Known Subclasses:
    IntegrationTestUtil

    public class ServicelayerTestLogic
    extends java.lang.Object
    This class holds common logic used in Servicelayer Test
    • Constructor Detail

      • ServicelayerTestLogic

        public ServicelayerTestLogic()
    • 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 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
      • importCsv

        protected static void importCsv​(java.lang.String csvFile,
                                        java.lang.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​(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