Class DefaultSetupImpexService
java.lang.Object
de.hybris.platform.commerceservices.setup.impl.DefaultSetupImpexService
- All Implemented Interfaces:
SetupImpexService
- Direct Known Subclasses:
DefaultSetupImpexAddOnService,ProductConfigRulesSetupImpexService
Default implementation of
SetupImpexService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CommonI18NServiceprotected Stringprotected Stringprotected ImportServicevoidimportImpexFile(String file, boolean errorIfMissing) Import impex file.voidimportImpexFile(String file, boolean errorIfMissing, boolean legacyMode) Import impex file.booleanimportImpexFile(String file, ImpexMacroParameterData macroParameters, boolean errorIfMissing) booleanimportImpexFile(String file, ImpexMacroParameterData macroParameters, boolean errorIfMissing, boolean legacyMode) protected voidimportImpexFile(String file, InputStream stream, boolean legacyMode) booleanimportImpexFile(String file, Map<String, Object> macroParameters, boolean errorIfMissing) booleanimportImpexFile(String file, Map<String, Object> macroParameters, boolean errorIfMissing, boolean legacyMode) voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetFileEncoding(String fileEncoding) voidsetImpexExt(String impexExt) voidsetImportService(ImportService importService)
-
Constructor Details
-
DefaultSetupImpexService
public DefaultSetupImpexService()
-
-
Method Details
-
getFileEncoding
-
setFileEncoding
-
getImpexExt
-
setImpexExt
-
getCommonI18NService
-
setCommonI18NService
-
getImportService
-
setImportService
-
importImpexFile
Description copied from interface:SetupImpexServiceImport 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:
importImpexFilein interfaceSetupImpexService- Parameters:
file- the file path to importerrorIfMissing- flag, set to true to error if the file is not found
-
importImpexFile
Description copied from interface:SetupImpexServiceImport 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:
importImpexFilein interfaceSetupImpexService- Parameters:
file- the file path to importerrorIfMissing- flag, set to true to error if the file is not foundlegacyMode- flag, set to true to use legacy impex mode
-
importImpexFile
-
importImpexFile
public boolean importImpexFile(String file, Map<String, Object> macroParameters, boolean errorIfMissing, boolean legacyMode) - Specified by:
importImpexFilein interfaceSetupImpexService- Parameters:
file- the file path to importmacroParameters- the macro parameterserrorIfMissing- flag, set to true to error if the file is not foundlegacyMode- flag, set to true to use legacy impex mode- Returns:
falsefor default implementation
-
importImpexFile
public boolean importImpexFile(String file, Map<String, Object> macroParameters, boolean errorIfMissing) - Specified by:
importImpexFilein interfaceSetupImpexService- Parameters:
file- the file path to importmacroParameters- the macro parameterserrorIfMissing- flag, set to true to error if the file is not found- Returns:
falsefor default implementation
-
importImpexFile
public boolean importImpexFile(String file, ImpexMacroParameterData macroParameters, boolean errorIfMissing, boolean legacyMode) - Specified by:
importImpexFilein interfaceSetupImpexService- Parameters:
file- the file path to importmacroParameters- the macro parameterserrorIfMissing- flag, set to true to error if the file is not foundlegacyMode- flag, set to true to use legacy impex mode- Returns:
falsefor default implementation
-
importImpexFile
public boolean importImpexFile(String file, ImpexMacroParameterData macroParameters, boolean errorIfMissing) - Specified by:
importImpexFilein interfaceSetupImpexService- Parameters:
file- the file path to importmacroParameters- the macro parameterserrorIfMissing- flag, set to true to error if the file is not found- Returns:
falsefor default implementation
-