Class ProductConfigRulesSetup
- java.lang.Object
-
- de.hybris.platform.commerceservices.setup.AbstractSystemSetup
-
- de.hybris.platform.sap.productconfig.rules.setup.ProductConfigRulesSetup
-
- Direct Known Subclasses:
ProductConfigRulesCPSSetup
@SystemSetup(extension="sapproductconfigrules") public class ProductConfigRulesSetup extends AbstractSystemSetup
This Setup implementation loads multiple language files for the CPQ rules implementation. It is expected, that the language files are delivered as properties file, following the file name format sapproductconfigrules-impexsupport_[two character language code].properties, and are placed in the resources/localization folder. The properties files are used as parameter sets for the essential Impex file ( essentialdata-sapproductconfigrules_languages.impex).
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.commerceservices.setup.AbstractSystemSetup
BOOLEAN_FALSE, BOOLEAN_TRUE
-
-
Constructor Summary
Constructors Constructor Description ProductConfigRulesSetup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringextractLocaleOutOfFileName(java.lang.String fileName)protected java.lang.StringgetBasedir()protected java.lang.StringgetExtensionName()protected FlexibleSearchServicegetFlexibleSearchService()protected ImpExSystemSetupgetImpexImporter()protected ImpexMacroParameterDatagetImpexParameterMap(SystemSetupContext context, java.nio.file.Path localeFile, java.util.Map<java.lang.String,java.lang.String> defaultParameters)java.util.List<SystemSetupParameter>getInitializationOptions()Abstract method to be implemented in subclasses.protected java.util.List<java.nio.file.Path>getListOfLanguageFiles(java.lang.String basedir, SystemSetupContext context)protected java.lang.StringgetLocaleFileLanguageRegex()protected java.lang.StringgetLocaleFileRegex()protected java.util.Map<java.lang.String,java.lang.String>getPropertyFileAsMap(SystemSetupContext context, java.nio.file.Path localeFile)protected voidimportImpex(ImpexMacroParameterData parameters)voidprocessEssentialFiles(SystemSetupContext context)The method processes first the base definitions for the CPQ rules, and updates the definitions values with the language specific property files.voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)voidsetImpexImporter(ImpExSystemSetup impexImporter)-
Methods inherited from class de.hybris.platform.commerceservices.setup.AbstractSystemSetup
activateSolrIndexerCronJobs, createBooleanSystemSetupParameter, createContentCatalogSyncJob, createProductCatalogSyncJob, createSolrIndexerCronJobs, executeCatalogSyncJob, executeSolrIndexerCronJob, getBooleanSystemSetupParameter, getCatalogSyncJob, getCatalogVersionService, getDefaultValueForBooleanSystemSetupParameter, getEventService, getSetupImpexService, getSetupSolrIndexerService, getSetupSyncJobService, importImpexFile, importImpexFile, importImpexFile, isSyncRerunNeeded, logError, logInfo, setCatalogVersionService, setEventService, setSetupImpexService, setSetupSolrIndexerService, setSetupSyncJobService
-
-
-
-
Method Detail
-
processEssentialFiles
@SystemSetup(type=ESSENTIAL, process=ALL) public void processEssentialFiles(SystemSetupContext context)
The method processes first the base definitions for the CPQ rules, and updates the definitions values with the language specific property files. Each language property file will trigger an import for the language essential Impex.- Parameters:
context- System context, provided by the initialize or update run
-
getBasedir
protected java.lang.String getBasedir()
-
importImpex
protected void importImpex(ImpexMacroParameterData parameters)
-
getImpexParameterMap
protected ImpexMacroParameterData getImpexParameterMap(SystemSetupContext context, java.nio.file.Path localeFile, java.util.Map<java.lang.String,java.lang.String> defaultParameters)
-
getPropertyFileAsMap
protected java.util.Map<java.lang.String,java.lang.String> getPropertyFileAsMap(SystemSetupContext context, java.nio.file.Path localeFile)
-
extractLocaleOutOfFileName
protected java.lang.String extractLocaleOutOfFileName(java.lang.String fileName)
-
getListOfLanguageFiles
protected java.util.List<java.nio.file.Path> getListOfLanguageFiles(java.lang.String basedir, SystemSetupContext context)
-
getInitializationOptions
@SystemSetupParameterMethod public java.util.List<SystemSetupParameter> getInitializationOptions()
Description copied from class:AbstractSystemSetupAbstract method to be implemented in subclasses.- Specified by:
getInitializationOptionsin classAbstractSystemSetup- Returns:
- the list of SystemSetupParameters for the SystemSetup class.
-
getLocaleFileRegex
protected java.lang.String getLocaleFileRegex()
-
getLocaleFileLanguageRegex
protected java.lang.String getLocaleFileLanguageRegex()
-
getExtensionName
protected java.lang.String getExtensionName()
-
getFlexibleSearchService
protected FlexibleSearchService getFlexibleSearchService()
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
getImpexImporter
protected ImpExSystemSetup getImpexImporter()
-
setImpexImporter
public void setImpexImporter(ImpExSystemSetup impexImporter)
-
-