Class DefaultMerchCategoryExporter
- java.lang.Object
-
- de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<CronJobModel>
-
- com.hybris.merchandising.exporter.DefaultMerchCategoryExporter
-
- All Implemented Interfaces:
MerchCategoryExporter,JobPerformable<CronJobModel>
public class DefaultMerchCategoryExporter extends AbstractJobPerformable<CronJobModel> implements MerchCategoryExporter
DefaultMerchCategoryExporter is a default implementation ofMerchCategoryExporterfor the purposes of exporting the categories from a configured catalog / catalog version to Merch v2.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService
-
-
Constructor Summary
Constructors Constructor Description DefaultMerchCategoryExporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexportCategories()exportCategories is a method for retrieving the category hierarchy and invoking a call to Merch v2 to persist the hierarchy.voidexportCategoriesForCurrentBaseSite()exportCategoriesForCurrentBaseSite is a method for retrieving the category hierarchy and invoking a call to Merch v2 to persist the hierarchy.protected BaseSiteServicegetBaseSiteService()Gets the configured instance ofBaseSiteServicefor use with this.protected ChangeDetectionServicegetChangeDetectionService()Gets the configured instance ofChangeDetectionServicefor use with this.protected MerchCatalogServiceClientgetClient()Gets the configured client for handling the sending of the categories to Merch v2.protected MerchCatalogServicegetMerchCatalogService()Gets the configured catalog service.protected MerchSynchronizationConfigDaogetMerchSynchronizationConfigDao()Retrieves the configured DAO to retrieve the configuration.protected TypeServicegetTypeService()Gets the configuredTypeServiceinstance for retrieving composed type for class.protected PerformResultperform(InMemoryChangesCollector collector)perform is a method for actually performing the delta detection functionality.PerformResultperform(CronJobModel cronJob)The execution body for aServicelayerJob.voidsetBaseSiteService(BaseSiteService baseSiteService)Sets the configured instance ofBaseSiteService.voidsetChangeDetectionService(ChangeDetectionService changeDetectionService)Sets the configured instance ofChangeDetectionService.voidsetClient(MerchCatalogServiceClient client)Sets the configured client for handling the sending of categories to Merch v2.voidsetMerchCatalogService(MerchCatalogService merchCatalogService)Sets the configured catalog service.voidsetMerchSynchronizationConfigDao(MerchSynchronizationConfigDao merchSynchronizationConfigDao)Sets the configured DAO to retrieve the configuration.voidsetTypeService(TypeService typeService)Sets the configured instance ofTypeServicefor use.-
Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isAbortable, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
-
-
-
Method Detail
-
exportCategories
public void exportCategories()
exportCategories is a method for retrieving the category hierarchy and invoking a call to Merch v2 to persist the hierarchy.- Specified by:
exportCategoriesin interfaceMerchCategoryExporter
-
exportCategoriesForCurrentBaseSite
public void exportCategoriesForCurrentBaseSite()
exportCategoriesForCurrentBaseSite is a method for retrieving the category hierarchy and invoking a call to Merch v2 to persist the hierarchy.- Specified by:
exportCategoriesForCurrentBaseSitein interfaceMerchCategoryExporter
-
perform
public PerformResult perform(CronJobModel cronJob)
The execution body for aServicelayerJob. Implement here your execution logic. It can be called synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the execution has reached end and if it was successful.- Specified by:
performin interfaceJobPerformable<CronJobModel>- Specified by:
performin classAbstractJobPerformable<CronJobModel>- Parameters:
cronJob- the related CronJob in whose context the execution will be performed.- Returns:
- a
PerformResultthat indicates whether theexecutionwas successfully executed or not and has finished or not.
-
perform
protected PerformResult perform(InMemoryChangesCollector collector)
perform is a method for actually performing the delta detection functionality.- Parameters:
collector- theInMemoryChangesCollectorto hold the changed.- Returns:
- an instance of
PerformResultrepresenting the result of the delta detection job.
-
getMerchSynchronizationConfigDao
protected MerchSynchronizationConfigDao getMerchSynchronizationConfigDao()
Retrieves the configured DAO to retrieve the configuration.- Returns:
- the configured
MerchSynchronizationConfigDao.
-
setMerchSynchronizationConfigDao
public void setMerchSynchronizationConfigDao(MerchSynchronizationConfigDao merchSynchronizationConfigDao)
Sets the configured DAO to retrieve the configuration.- Parameters:
merchSynchronizationConfigDao-
-
getMerchCatalogService
protected MerchCatalogService getMerchCatalogService()
Gets the configured catalog service.- Returns:
- the configured
MerchCatalogService.
-
setMerchCatalogService
public void setMerchCatalogService(MerchCatalogService merchCatalogService)
Sets the configured catalog service.- Parameters:
merchCatalogService- the configuredMerchCatalogService.
-
getClient
protected MerchCatalogServiceClient getClient()
Gets the configured client for handling the sending of the categories to Merch v2.- Returns:
- the configured
MerchCatalogServiceClient.
-
setClient
public void setClient(MerchCatalogServiceClient client)
Sets the configured client for handling the sending of categories to Merch v2.- Parameters:
client- the configuredMerchCatalogServiceClientto send categories as.
-
getTypeService
protected TypeService getTypeService()
Gets the configuredTypeServiceinstance for retrieving composed type for class.- Returns:
- the configured
TypeService.
-
setTypeService
public void setTypeService(TypeService typeService)
Sets the configured instance ofTypeServicefor use.- Parameters:
typeService- theTypeServiceto inject.
-
getChangeDetectionService
protected ChangeDetectionService getChangeDetectionService()
Gets the configured instance ofChangeDetectionServicefor use with this.- Returns:
- configured
ChangeDetectionService.
-
setChangeDetectionService
public void setChangeDetectionService(ChangeDetectionService changeDetectionService)
Sets the configured instance ofChangeDetectionService.- Parameters:
changeDetectionService- - theChangeDetectionServiceto inject.
-
getBaseSiteService
protected BaseSiteService getBaseSiteService()
Gets the configured instance ofBaseSiteServicefor use with this.- Returns:
- configured
BaseSiteService.
-
setBaseSiteService
public void setBaseSiteService(BaseSiteService baseSiteService)
Sets the configured instance ofBaseSiteService.- Parameters:
changeDetectionService- - theBaseSiteServiceto inject.
-
-