Class DefaultMerchProductDirectoryCategoryExporter
java.lang.Object
de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<CronJobModel>
com.hybris.merchandising.exporter.DefaultMerchProductDirectoryCategoryExporter
- All Implemented Interfaces:
MerchCategoryExporter,JobPerformable<CronJobModel>
public class DefaultMerchProductDirectoryCategoryExporter
extends AbstractJobPerformable<CronJobModel>
implements MerchCategoryExporter
DefaultMerchProductDirectoryCategoryExporter is a default implementation of
MerchCategoryExporter for the purposes of
exporting the categories from a configured catalog / catalog version to CDS and assigning them to a product directory.-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexportCategories is a method for retrieving the category hierarchy and invoking a call to Merch v2 to persist the hierarchy.voidexportCategories is a method for retrieving the categories to synchronise for a given product directory.voidexportCategoriesForCurrentBaseSite is a method for retrieving the category hierarchy and invoking a call to Merch v2 to persist the hierarchy.protected BaseSiteServiceGets the configured instance ofBaseSiteServicefor use with this.protected ChangeDetectionServiceGets the configured instance ofChangeDetectionServicefor use with this.Gets the configured client for handling the sending of the categories to Merch v2.protected MerchCatalogServiceGets the configured catalog service.protected MerchProductDirectoryConfigServiceGets the configured instance ofMerchProductDirectoryConfigServicefor use with this.protected TypeServiceGets the configuredTypeServiceinstance for retrieving composed type for class.protected PerformResultperform(InMemoryChangesCollector collector) perform is a method for actually performing the delta detection functionality.perform(CronJobModel cronJob) The execution body for aServicelayerJob.voidsetBaseSiteService(BaseSiteService baseSiteService) Sets the configured instance ofBaseSiteService.voidsetChangeDetectionService(ChangeDetectionService changeDetectionService) Sets the configured instance ofChangeDetectionService.voidSets the configured client for handling the sending of categories to Merch v2.voidsetMerchCatalogService(MerchCatalogService merchCatalogService) Sets the configured catalog service.voidsetMerchProductDirectoryConfigService(MerchProductDirectoryConfigService merchProductDirectoryConfigService) Sets the configured instance ofMerchProductDirectoryConfigServicefor use with this.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
-
Constructor Details
-
DefaultMerchProductDirectoryCategoryExporter
public DefaultMerchProductDirectoryCategoryExporter()
-
-
Method Details
-
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
-
exportCategories
exportCategories is a method for retrieving the categories to synchronise for a given product directory.- Specified by:
exportCategoriesin interfaceMerchCategoryExporter- Parameters:
config- the product directory we wish to extract categories for.
-
perform
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
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.
-
getMerchCatalogService
Gets the configured catalog service.- Returns:
- the configured
MerchCatalogService.
-
setMerchCatalogService
Sets the configured catalog service.- Parameters:
merchCatalogService- the configuredMerchCatalogService.
-
getClient
Gets the configured client for handling the sending of the categories to Merch v2.- Returns:
- the configured
MerchCatalogServiceProductDirectoryClient.
-
setClient
Sets the configured client for handling the sending of categories to Merch v2.- Parameters:
client- the configuredMerchCatalogServiceProductDirectoryClientto send categories as.
-
getTypeService
Gets the configuredTypeServiceinstance for retrieving composed type for class.- Returns:
- the configured
TypeService.
-
setTypeService
Sets the configured instance ofTypeServicefor use.- Parameters:
typeService- theTypeServiceto inject.
-
getChangeDetectionService
Gets the configured instance ofChangeDetectionServicefor use with this.- Returns:
- configured
ChangeDetectionService.
-
setChangeDetectionService
Sets the configured instance ofChangeDetectionService.- Parameters:
changeDetectionService- - theChangeDetectionServiceto inject.
-
getBaseSiteService
Gets the configured instance ofBaseSiteServicefor use with this.- Returns:
- configured
BaseSiteService.
-
setBaseSiteService
Sets the configured instance ofBaseSiteService.- Parameters:
changeDetectionService- - theBaseSiteServiceto inject.
-
getMerchProductDirectoryConfigService
Gets the configured instance ofMerchProductDirectoryConfigServicefor use with this.- Returns:
- configured
MerchProductDirectoryConfigService.
-
setMerchProductDirectoryConfigService
public void setMerchProductDirectoryConfigService(MerchProductDirectoryConfigService merchProductDirectoryConfigService) Sets the configured instance ofMerchProductDirectoryConfigServicefor use with this.- Parameters:
merchProductDirectoryConfigService- theMerchProductDirectoryConfigServiceto inject.
-