Class AbstractDataImportService
- java.lang.Object
-
- de.hybris.platform.commerceservices.dataimport.AbstractDataImportService
-
- Direct Known Subclasses:
CoreDataImportService,SampleDataImportService
public abstract class AbstractDataImportService extends java.lang.ObjectDefines common data import services for subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACTIVATE_SOLR_CRON_JOBSstatic java.lang.StringIMPORT_MOBILE_DATA
-
Constructor Summary
Constructors Constructor Description AbstractDataImportService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidassignDependent(java.lang.String dependsOnProduct, java.util.List<java.lang.String> dependentContents)Assigns dependent content catalog sync jobs to product catalog sync jobsabstract voidexecute(AbstractSystemSetup systemSetup, SystemSetupContext context, java.util.List<ImportData> importData)Execute import data.<T> TgetBeanForName(java.lang.String name)Gets a bean by nameCatalogVersionServicegetCatalogVersionService()ConfigurationServicegetConfigurationService()EventServicegetEventService()SetupImpexServicegetSetupImpexService()SetupSolrIndexerServicegetSetupSolrIndexerService()SetupSyncJobServicegetSetupSyncJobService()protected voidimportAllData(AbstractSystemSetup systemSetup, SystemSetupContext context, ImportData importData, boolean syncCatalogs)protected abstract voidimportCommonData(java.lang.String extensionName)protected abstract voidimportContentCatalog(java.lang.String extensionName, java.lang.String contentCatalogName)protected abstract voidimportJobs(java.lang.String extensionName, java.lang.String storeName)protected abstract voidimportProductCatalog(java.lang.String extensionName, java.lang.String productCatalogName)protected abstract voidimportSolrIndex(java.lang.String extensionName, java.lang.String storeName)protected abstract voidimportStore(java.lang.String extensionName, java.lang.String storeName, java.lang.String productCatalogName)booleanisExtensionLoaded(java.lang.String extensionNameToCheck)Determines whether an extension is loaded or notbooleanisSyncRerunNeeded(PerformResult syncCronJobResult)Determines if the sync job needs to be rerunvoidrunSolrIndex(java.lang.String extensionName, java.lang.String storeName)Runs solr indexer jobsvoidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetConfigurationService(ConfigurationService configurationService)voidsetEventService(EventService eventService)voidsetSetupImpexService(SetupImpexService setupImpexService)voidsetSetupSolrIndexerService(SetupSolrIndexerService setupSolrIndexerService)voidsetSetupSyncJobService(SetupSyncJobService setupSyncJobService)booleansynchronizeContentCatalog(AbstractSystemSetup systemSetup, SystemSetupContext context, java.lang.String catalogName, boolean syncCatalogs)Creates and runs a content catalog synchronization jobbooleansynchronizeProductCatalog(AbstractSystemSetup systemSetup, SystemSetupContext context, java.lang.String catalogName, boolean syncCatalogs)Creates and runs a product catalog synchronization job
-
-
-
Field Detail
-
ACTIVATE_SOLR_CRON_JOBS
public static final java.lang.String ACTIVATE_SOLR_CRON_JOBS
- See Also:
- Constant Field Values
-
IMPORT_MOBILE_DATA
public static final java.lang.String IMPORT_MOBILE_DATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public abstract void execute(AbstractSystemSetup systemSetup, SystemSetupContext context, java.util.List<ImportData> importData)
Execute import data.- Parameters:
systemSetup- the system setup parameterscontext- the system setup contextimportData- the data to import
-
importCommonData
protected abstract void importCommonData(java.lang.String extensionName)
-
importProductCatalog
protected abstract void importProductCatalog(java.lang.String extensionName, java.lang.String productCatalogName)
-
importContentCatalog
protected abstract void importContentCatalog(java.lang.String extensionName, java.lang.String contentCatalogName)
-
importStore
protected abstract void importStore(java.lang.String extensionName, java.lang.String storeName, java.lang.String productCatalogName)
-
importSolrIndex
protected abstract void importSolrIndex(java.lang.String extensionName, java.lang.String storeName)
-
importJobs
protected abstract void importJobs(java.lang.String extensionName, java.lang.String storeName)
-
importAllData
protected void importAllData(AbstractSystemSetup systemSetup, SystemSetupContext context, ImportData importData, boolean syncCatalogs)
-
synchronizeProductCatalog
public boolean synchronizeProductCatalog(AbstractSystemSetup systemSetup, SystemSetupContext context, java.lang.String catalogName, boolean syncCatalogs)
Creates and runs a product catalog synchronization job- Parameters:
systemSetup- the system setup parameterscontext- the system setup contextcatalogName- the catalog namesyncCatalogs- executes catalog synchronization job if true- Returns:
- true if operation was successful
-
synchronizeContentCatalog
public boolean synchronizeContentCatalog(AbstractSystemSetup systemSetup, SystemSetupContext context, java.lang.String catalogName, boolean syncCatalogs)
Creates and runs a content catalog synchronization job- Parameters:
systemSetup- the system setup parameterscontext- the system setup contextcatalogName- the catalog namesyncCatalogs- executes catalog synchronization job if true- Returns:
- true if operation was successful
-
assignDependent
public void assignDependent(java.lang.String dependsOnProduct, java.util.List<java.lang.String> dependentContents)Assigns dependent content catalog sync jobs to product catalog sync jobs- Parameters:
dependsOnProduct- the job to assign todependentContents- the dependent job names
-
runSolrIndex
public void runSolrIndex(java.lang.String extensionName, java.lang.String storeName)Runs solr indexer jobs- Parameters:
extensionName-storeName-
-
isSyncRerunNeeded
public boolean isSyncRerunNeeded(PerformResult syncCronJobResult)
Determines if the sync job needs to be rerun- Parameters:
syncCronJobResult- the sync job result- Returns:
- true is the sync job is null or unsuccessful
-
getBeanForName
public <T> T getBeanForName(java.lang.String name)
Gets a bean by name- Parameters:
name- the bean name- Returns:
- the bean
-
isExtensionLoaded
public boolean isExtensionLoaded(java.lang.String extensionNameToCheck)
Determines whether an extension is loaded or not- Parameters:
extensionNameToCheck- the extension name- Returns:
- true if the
Listof loaded extensions contains the extension's name
-
getSetupImpexService
public SetupImpexService getSetupImpexService()
-
setSetupImpexService
public void setSetupImpexService(SetupImpexService setupImpexService)
-
getSetupSyncJobService
public SetupSyncJobService getSetupSyncJobService()
-
setSetupSyncJobService
public void setSetupSyncJobService(SetupSyncJobService setupSyncJobService)
-
getSetupSolrIndexerService
public SetupSolrIndexerService getSetupSolrIndexerService()
-
setSetupSolrIndexerService
public void setSetupSolrIndexerService(SetupSolrIndexerService setupSolrIndexerService)
-
getCatalogVersionService
public CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getEventService
public EventService getEventService()
-
setEventService
public void setEventService(EventService eventService)
-
getConfigurationService
public ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
-