Class AbstractDataImportService
- java.lang.Object
-
- de.hybris.platform.commerceservices.dataimport.AbstractDataImportService
-
- Direct Known Subclasses:
CoreDataImportService
,SampleDataImportService
public abstract class AbstractDataImportService extends java.lang.Object
Defines common data import services for subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACTIVATE_SOLR_CRON_JOBS
static java.lang.String
IMPORT_MOBILE_DATA
-
Constructor Summary
Constructors Constructor Description AbstractDataImportService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
assignDependent(java.lang.String dependsOnProduct, java.util.List<java.lang.String> dependentContents)
Assigns dependent content catalog sync jobs to product catalog sync jobsabstract void
execute(AbstractSystemSetup systemSetup, SystemSetupContext context, java.util.List<ImportData> importData)
Execute import data.<T> T
getBeanForName(java.lang.String name)
Gets a bean by nameCatalogVersionService
getCatalogVersionService()
ConfigurationService
getConfigurationService()
EventService
getEventService()
SetupImpexService
getSetupImpexService()
SetupSolrIndexerService
getSetupSolrIndexerService()
SetupSyncJobService
getSetupSyncJobService()
protected void
importAllData(AbstractSystemSetup systemSetup, SystemSetupContext context, ImportData importData, boolean syncCatalogs)
protected abstract void
importCommonData(java.lang.String extensionName)
protected abstract void
importContentCatalog(java.lang.String extensionName, java.lang.String contentCatalogName)
protected abstract void
importJobs(java.lang.String extensionName, java.lang.String storeName)
protected abstract void
importProductCatalog(java.lang.String extensionName, java.lang.String productCatalogName)
protected abstract void
importSolrIndex(java.lang.String extensionName, java.lang.String storeName)
protected abstract void
importStore(java.lang.String extensionName, java.lang.String storeName, java.lang.String productCatalogName)
boolean
isExtensionLoaded(java.lang.String extensionNameToCheck)
Determines whether an extension is loaded or notboolean
isSyncRerunNeeded(PerformResult syncCronJobResult)
Determines if the sync job needs to be rerunvoid
runSolrIndex(java.lang.String extensionName, java.lang.String storeName)
Runs solr indexer jobsvoid
setCatalogVersionService(CatalogVersionService catalogVersionService)
void
setConfigurationService(ConfigurationService configurationService)
void
setEventService(EventService eventService)
void
setSetupImpexService(SetupImpexService setupImpexService)
void
setSetupSolrIndexerService(SetupSolrIndexerService setupSolrIndexerService)
void
setSetupSyncJobService(SetupSyncJobService setupSyncJobService)
boolean
synchronizeContentCatalog(AbstractSystemSetup systemSetup, SystemSetupContext context, java.lang.String catalogName, boolean syncCatalogs)
Creates and runs a content catalog synchronization jobboolean
synchronizeProductCatalog(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
List
of 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)
-
-