Class DefaultSetupSyncJobService

    • Constructor Detail

      • DefaultSetupSyncJobService

        public DefaultSetupSyncJobService()
    • Method Detail

      • createProductCatalogSyncJob

        public void createProductCatalogSyncJob​(java.lang.String catalogId)
        Description copied from interface: SetupSyncJobService
        Ensure 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:
        createProductCatalogSyncJob in interface SetupSyncJobService
        Parameters:
        catalogId - the catalog id to search sync job for.
      • getCatalogVersion

        protected CatalogVersionModel getCatalogVersion​(java.lang.String catalogId,
                                                        java.lang.String version)
      • assignDependentSyncJobs

        public void assignDependentSyncJobs​(java.lang.String catalogId,
                                            java.util.Set<java.lang.String> dependentCatalogIds)
        Description copied from interface: SetupSyncJobService
        Sets up a dependency relationship between the CatalogVersionSyncJob for a catalog and the CatalogVersionSyncJobs for a set of dependant catalogs.
        Specified by:
        assignDependentSyncJobs in interface SetupSyncJobService
        Parameters:
        catalogId - the catalog id
        dependentCatalogIds - the dependant catalog ids
      • catalogVersionSyncJobsToString

        protected java.lang.String catalogVersionSyncJobsToString​(java.util.Collection<CatalogVersionSyncJobModel> catalogVersionSyncJobs)
      • createContentCatalogSyncJob

        public void createContentCatalogSyncJob​(java.lang.String catalogId)
        Description copied from interface: SetupSyncJobService
        Ensure 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:
        createContentCatalogSyncJob in interface SetupSyncJobService
        Parameters:
        catalogId - the catalog id
      • createJobIdentifier

        protected java.lang.String createJobIdentifier​(java.lang.String catalogId)
      • getLastFailedSyncCronJob

        protected SyncItemCronJobModel getLastFailedSyncCronJob​(SyncItemJobModel syncItemJob)
        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,
                                                           java.lang.String catalogId,
                                                           java.util.Map<java.lang.Class<?>,​java.util.List<EditSyncAttributeDescriptorData>> editSyncDescriptors)
      • processEditSyncAttributeDescriptor

        protected void processEditSyncAttributeDescriptor​(SyncItemJobModel syncJob,
                                                          java.lang.Class<?> clazz,
                                                          EditSyncAttributeDescriptorData descriptor)
        Configures sync attributes of a ComposedTypeModel. The following attributes can be configured: IncludeInSync, CopyByValue, Untranslatable
        Parameters:
        syncJob - the synchronization job
        clazz - The class of ComposedTypeModel
        descriptor - Holds values for attributes to be modified for a given SyncItemJobModel
      • getCatalogSyncJob

        protected SyncItemJobModel getCatalogSyncJob​(java.lang.String catalogId)
      • getSyncJobForCatalog

        protected SyncItemJobModel getSyncJobForCatalog​(java.lang.String catalogId)
      • getSyncJobForCatalogAndQualifier

        protected SyncItemJobModel getSyncJobForCatalogAndQualifier​(java.lang.String catalogId,
                                                                    java.lang.String qualifier)
      • processRootTypes

        protected void processRootTypes​(SyncItemJobModel job,
                                        java.lang.String catalogId,
                                        java.util.List<java.lang.String> rootTypes)
      • tryGetComposedType

        protected ComposedTypeModel tryGetComposedType​(java.lang.Class<?> clazz)
      • tryGetComposedType

        protected ComposedTypeModel tryGetComposedType​(java.lang.String typeCode)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • getContentCatalogRootTypeCodes

        protected java.util.List<java.lang.String> getContentCatalogRootTypeCodes()
      • setContentCatalogRootTypeCodes

        public void setContentCatalogRootTypeCodes​(java.util.List<java.lang.String> contentCatalogRootTypeCodes)
      • getProductCatalogRootTypeCodes

        protected java.util.List<java.lang.String> getProductCatalogRootTypeCodes()
      • setProductCatalogRootTypeCodes

        public void setProductCatalogRootTypeCodes​(java.util.List<java.lang.String> productCatalogRootTypeCodes)
      • getContentCatalogEditSyncDescriptors

        protected java.util.Map<java.lang.Class<?>,​java.util.List<EditSyncAttributeDescriptorData>> getContentCatalogEditSyncDescriptors()
      • setContentCatalogEditSyncDescriptors

        public void setContentCatalogEditSyncDescriptors​(java.util.Map<java.lang.Class<?>,​java.util.List<EditSyncAttributeDescriptorData>> contentCatalogEditSyncDescriptors)
      • getProductCatalogEditSyncDescriptors

        protected java.util.Map<java.lang.Class<?>,​java.util.List<EditSyncAttributeDescriptorData>> getProductCatalogEditSyncDescriptors()
      • setProductCatalogEditSyncDescriptors

        public void setProductCatalogEditSyncDescriptors​(java.util.Map<java.lang.Class<?>,​java.util.List<EditSyncAttributeDescriptorData>> productCatalogEditSyncDescriptors)
      • setCatalogVersionService

        public void setCatalogVersionService​(CatalogVersionService catalogVersionService)
      • setCatalogSynchronizationService

        public void setCatalogSynchronizationService​(CatalogSynchronizationService catalogSynchronizationService)
      • setCatalogService

        public void setCatalogService​(CatalogService catalogService)
      • setCronJobService

        public void setCronJobService​(CronJobService cronJobService)
      • getTypeService

        protected TypeService getTypeService()
      • setTypeService

        public void setTypeService​(TypeService typeService)
      • setFlexibleSearchService

        public void setFlexibleSearchService​(FlexibleSearchService flexibleSearchService)