Class DefaultSetupImpexService

java.lang.Object
de.hybris.platform.commerceservices.setup.impl.DefaultSetupImpexService
All Implemented Interfaces:
SetupImpexService
Direct Known Subclasses:
DefaultSetupImpexAddOnService, ProductConfigRulesSetupImpexService

public class DefaultSetupImpexService extends Object implements SetupImpexService
Default implementation of SetupImpexService.
  • Constructor Details

    • DefaultSetupImpexService

      public DefaultSetupImpexService()
  • Method Details

    • getFileEncoding

      protected String getFileEncoding()
    • setFileEncoding

      public void setFileEncoding(String fileEncoding)
    • getImpexExt

      protected String getImpexExt()
    • setImpexExt

      public void setImpexExt(String impexExt)
    • getCommonI18NService

      protected CommonI18NService getCommonI18NService()
    • setCommonI18NService

      public void setCommonI18NService(CommonI18NService commonI18NService)
    • getImportService

      protected ImportService getImportService()
    • setImportService

      public void setImportService(ImportService importService)
    • importImpexFile

      public void importImpexFile(String file, boolean errorIfMissing)
      Description copied from interface: SetupImpexService
      Import impex file. The file is looked up from the classpath. If the file does not exist then an info message is logged. The file should used the ".impex" file extension. Any language specific files are found with the same root file name then they are also imported. Language specific files have the language iso code appended to the file name using an underscore as a separator. For example if the file /path/file.impex is imported and the language specific file /path/file_de.impex exists, then it will also be imported. Only files for languages that exist in the hybris system will be imported. By default this method imports the impex data with legacy mode set to false.
      Specified by:
      importImpexFile in interface SetupImpexService
      Parameters:
      file - the file path to import
      errorIfMissing - flag, set to true to error if the file is not found
    • importImpexFile

      public void importImpexFile(String file, boolean errorIfMissing, boolean legacyMode)
      Description copied from interface: SetupImpexService
      Import impex file. The file is looked up from the classpath. If the file does not exist then an info message is logged. The file should used the ".impex" file extension. Any language specific files are found with the same root file name then they are also imported. Language specific files have the language iso code appended to the file name using an underscore as a separator. For example if the file /path/file.impex is imported and the language specific file /path/file_de.impex exists, then it will also be imported. Only files for languages that exist in the hybris system will be imported.
      Specified by:
      importImpexFile in interface SetupImpexService
      Parameters:
      file - the file path to import
      errorIfMissing - flag, set to true to error if the file is not found
      legacyMode - flag, set to true to use legacy impex mode
    • importImpexFile

      protected void importImpexFile(String file, InputStream stream, boolean legacyMode)
    • importImpexFile

      public boolean importImpexFile(String file, Map<String,Object> macroParameters, boolean errorIfMissing, boolean legacyMode)
      Specified by:
      importImpexFile in interface SetupImpexService
      Parameters:
      file - the file path to import
      macroParameters - the macro parameters
      errorIfMissing - flag, set to true to error if the file is not found
      legacyMode - flag, set to true to use legacy impex mode
      Returns:
      false for default implementation
    • importImpexFile

      public boolean importImpexFile(String file, Map<String,Object> macroParameters, boolean errorIfMissing)
      Specified by:
      importImpexFile in interface SetupImpexService
      Parameters:
      file - the file path to import
      macroParameters - the macro parameters
      errorIfMissing - flag, set to true to error if the file is not found
      Returns:
      false for default implementation
    • importImpexFile

      public boolean importImpexFile(String file, ImpexMacroParameterData macroParameters, boolean errorIfMissing, boolean legacyMode)
      Specified by:
      importImpexFile in interface SetupImpexService
      Parameters:
      file - the file path to import
      macroParameters - the macro parameters
      errorIfMissing - flag, set to true to error if the file is not found
      legacyMode - flag, set to true to use legacy impex mode
      Returns:
      false for default implementation
    • importImpexFile

      public boolean importImpexFile(String file, ImpexMacroParameterData macroParameters, boolean errorIfMissing)
      Specified by:
      importImpexFile in interface SetupImpexService
      Parameters:
      file - the file path to import
      macroParameters - the macro parameters
      errorIfMissing - flag, set to true to error if the file is not found
      Returns:
      false for default implementation