Class DefaultSetupSyncJobService
java.lang.Object
de.hybris.platform.commerceservices.setup.impl.DefaultSetupSyncJobService
- All Implemented Interfaces:
SetupSyncJobService
- Direct Known Subclasses:
MarketplaceSetupSyncJobService
Default implementation for
SetupSyncJobService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassignDependentSyncJobs(String catalogId, Set<String> dependentCatalogIds) Sets up a dependency relationship between the CatalogVersionSyncJob for a catalog and the CatalogVersionSyncJobs for a set of dependant catalogs.protected StringcatalogVersionSyncJobsToString(Collection<CatalogVersionSyncJobModel> catalogVersionSyncJobs) voidcreateContentCatalogSyncJob(String catalogId) Ensure that a cms content catalog sync job exists for the specified catalog id.protected StringcreateJobIdentifier(String catalogId) voidcreateProductCatalogSyncJob(String catalogId) Ensure that a product catalog sync job exists for the specified catalog id.executeCatalogSyncJob(String catalogId) Run the catalog sync for the specified catalog.protected CatalogServiceprotected CatalogSynchronizationServiceprotected SyncItemJobModelgetCatalogSyncJob(String catalogId) protected CatalogVersionModelgetCatalogVersion(String catalogId, String version) protected CatalogVersionServiceprotected Map<Class<?>,List<EditSyncAttributeDescriptorData>> protected CronJobServiceprotected FlexibleSearchServiceprotected SyncItemCronJobModelgetLastFailedSyncCronJob(SyncItemJobModel syncItemJob) Returns the last cronjob if exists and failed or the new one otherwiseprotected ModelServiceprotected Map<Class<?>,List<EditSyncAttributeDescriptorData>> protected SyncAttributeDescriptorConfigModelgetSyncAttrDescConfig(SyncItemJobModel syncJob, AttributeDescriptorModel attributeDesc) protected SyncItemJobModelgetSyncJobForCatalog(String catalogId) protected SyncItemJobModelgetSyncJobForCatalogAndQualifier(String catalogId, String qualifier) protected TypeServiceprotected voidprocessEditSyncAttributeDescriptor(SyncItemJobModel syncJob, Class<?> clazz, EditSyncAttributeDescriptorData descriptor) Configures sync attributes of aComposedTypeModel.protected voidprocessEditSyncAttributeDescriptors(SyncItemJobModel job, String catalogId, Map<Class<?>, List<EditSyncAttributeDescriptorData>> editSyncDescriptors) protected voidprocessRootTypes(SyncItemJobModel job, String catalogId, List<String> rootTypes) voidsetCatalogService(CatalogService catalogService) voidsetCatalogSynchronizationService(CatalogSynchronizationService catalogSynchronizationService) voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetContentCatalogEditSyncDescriptors(Map<Class<?>, List<EditSyncAttributeDescriptorData>> contentCatalogEditSyncDescriptors) voidsetContentCatalogRootTypeCodes(List<String> contentCatalogRootTypeCodes) voidsetCronJobService(CronJobService cronJobService) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetModelService(ModelService modelService) voidsetProductCatalogEditSyncDescriptors(Map<Class<?>, List<EditSyncAttributeDescriptorData>> productCatalogEditSyncDescriptors) voidsetProductCatalogRootTypeCodes(List<String> productCatalogRootTypeCodes) voidsetTypeService(TypeService typeService) protected AttributeDescriptorModeltryGetAttributeDescriptor(ComposedTypeModel composedType, String attributeName) protected ComposedTypeModeltryGetComposedType(Class<?> clazz) protected ComposedTypeModeltryGetComposedType(String typeCode)
-
Constructor Details
-
DefaultSetupSyncJobService
public DefaultSetupSyncJobService()
-
-
Method Details
-
createProductCatalogSyncJob
Description copied from interface:SetupSyncJobServiceEnsure that a product catalog sync job exists for the specified catalog id. The sync job is created between the Staged and Online catalog versions only if there is no existing sync job.- Specified by:
createProductCatalogSyncJobin interfaceSetupSyncJobService- Parameters:
catalogId- the catalog id to search sync job for.
-
getCatalogVersion
-
assignDependentSyncJobs
Description copied from interface:SetupSyncJobServiceSets up a dependency relationship between the CatalogVersionSyncJob for a catalog and the CatalogVersionSyncJobs for a set of dependant catalogs.- Specified by:
assignDependentSyncJobsin interfaceSetupSyncJobService- Parameters:
catalogId- the catalog iddependentCatalogIds- the dependant catalog ids
-
catalogVersionSyncJobsToString
protected String catalogVersionSyncJobsToString(Collection<CatalogVersionSyncJobModel> catalogVersionSyncJobs) -
createContentCatalogSyncJob
Description copied from interface:SetupSyncJobServiceEnsure that a cms content catalog sync job exists for the specified catalog id. The sync job is created between the Staged and Online catalog versions only if there is no existing sync job.- Specified by:
createContentCatalogSyncJobin interfaceSetupSyncJobService- Parameters:
catalogId- the catalog id
-
createJobIdentifier
-
executeCatalogSyncJob
Description copied from interface:SetupSyncJobServiceRun the catalog sync for the specified catalog.- Specified by:
executeCatalogSyncJobin interfaceSetupSyncJobService- Parameters:
catalogId- the catalog id- Returns:
- an instance of
PerformResultcontaining the sync job result and status
-
getLastFailedSyncCronJob
Returns the last cronjob if exists and failed or the new one otherwise- Parameters:
syncItemJob-- Returns:
- synchronization cronjob - new one or the last one if failed
-
processEditSyncAttributeDescriptors
protected void processEditSyncAttributeDescriptors(SyncItemJobModel job, String catalogId, Map<Class<?>, List<EditSyncAttributeDescriptorData>> editSyncDescriptors) -
processEditSyncAttributeDescriptor
protected void processEditSyncAttributeDescriptor(SyncItemJobModel syncJob, Class<?> clazz, EditSyncAttributeDescriptorData descriptor) Configures sync attributes of aComposedTypeModel. The following attributes can be configured: IncludeInSync, CopyByValue, Untranslatable- Parameters:
syncJob- the synchronization jobclazz- The class ofComposedTypeModeldescriptor- Holds values for attributes to be modified for a givenSyncItemJobModel
-
getSyncAttrDescConfig
protected SyncAttributeDescriptorConfigModel getSyncAttrDescConfig(SyncItemJobModel syncJob, AttributeDescriptorModel attributeDesc) -
getCatalogSyncJob
-
getSyncJobForCatalog
-
getSyncJobForCatalogAndQualifier
-
processRootTypes
-
tryGetComposedType
-
tryGetComposedType
-
tryGetAttributeDescriptor
protected AttributeDescriptorModel tryGetAttributeDescriptor(ComposedTypeModel composedType, String attributeName) -
getModelService
-
setModelService
-
getContentCatalogRootTypeCodes
-
setContentCatalogRootTypeCodes
-
getProductCatalogRootTypeCodes
-
setProductCatalogRootTypeCodes
-
getContentCatalogEditSyncDescriptors
protected Map<Class<?>,List<EditSyncAttributeDescriptorData>> getContentCatalogEditSyncDescriptors() -
setContentCatalogEditSyncDescriptors
public void setContentCatalogEditSyncDescriptors(Map<Class<?>, List<EditSyncAttributeDescriptorData>> contentCatalogEditSyncDescriptors) -
getProductCatalogEditSyncDescriptors
protected Map<Class<?>,List<EditSyncAttributeDescriptorData>> getProductCatalogEditSyncDescriptors() -
setProductCatalogEditSyncDescriptors
public void setProductCatalogEditSyncDescriptors(Map<Class<?>, List<EditSyncAttributeDescriptorData>> productCatalogEditSyncDescriptors) -
getCatalogVersionService
-
setCatalogVersionService
-
getCatalogSynchronizationService
-
setCatalogSynchronizationService
public void setCatalogSynchronizationService(CatalogSynchronizationService catalogSynchronizationService) -
getCatalogService
-
setCatalogService
-
getCronJobService
-
setCronJobService
-
getTypeService
-
setTypeService
-
getFlexibleSearchService
-
setFlexibleSearchService
-