Package de.hybris.y2ysync.services.impl
Class DefaultSyncExecutionService
- java.lang.Object
-
- de.hybris.y2ysync.services.impl.DefaultSyncExecutionService
-
- All Implemented Interfaces:
SyncExecutionService
public class DefaultSyncExecutionService extends java.lang.Object implements SyncExecutionService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.y2ysync.services.SyncExecutionService
SyncExecutionService.ExecutionMode
-
-
Constructor Summary
Constructors Constructor Description DefaultSyncExecutionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Y2YSyncJobModel
createSyncJobForDataHub(java.lang.String code, Y2YStreamConfigurationContainerModel container)
Creates sync job configured for DataHub sync for a givencontainer
.Y2YSyncJobModel
createSyncJobForDataHub(java.lang.String code, Y2YStreamConfigurationContainerModel container, java.lang.String dataHubUrl)
Creates sync job configured for DataHub sync for a givencontainer
with customdataHubUrl
.Y2YSyncJobModel
createSyncJobForZip(java.lang.String code, Y2YStreamConfigurationContainerModel container)
Creates sync job configured for Zip sync for a givencontainer
.java.util.Collection<Y2YSyncJobModel>
getAllSyncJobs()
Returns collection of all sync jobs in the system.java.util.Collection<Y2YSyncJobModel>
getSyncJobsForContainer(Y2YStreamConfigurationContainerModel container)
Returns collection of all sync jobs for given Y2YStreamConfigurationContainer.void
setCronJobService(CronJobService cronJobService)
void
setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
void
setModelService(ModelService modelService)
Y2YSyncCronJobModel
startSync(Y2YSyncJobModel job, SyncExecutionService.ExecutionMode executionMode)
Starts synchronization usingY2YSyncJobModel
.Y2YSyncCronJobModel
startSync(java.lang.String jobCode, SyncExecutionService.ExecutionMode executionMode)
Starts synchronization usingY2YSyncJobModel
defined by ajobCode
.
-
-
-
Method Detail
-
startSync
public Y2YSyncCronJobModel startSync(java.lang.String jobCode, SyncExecutionService.ExecutionMode executionMode)
Description copied from interface:SyncExecutionService
Starts synchronization usingY2YSyncJobModel
defined by ajobCode
. This method creates instance ofY2YSyncCronJobModel
connected to a givenY2YSyncCronJobModel
under the hood each time it is called.- Specified by:
startSync
in interfaceSyncExecutionService
- Parameters:
jobCode
- Code of theY2YSyncJobModel
used for synchronizationexecutionMode
-ExecutionMode
(SYNC or ASYNC)
-
startSync
public Y2YSyncCronJobModel startSync(Y2YSyncJobModel job, SyncExecutionService.ExecutionMode executionMode)
Description copied from interface:SyncExecutionService
Starts synchronization usingY2YSyncJobModel
. This method creates instance ofY2YSyncCronJobModel
connected to a givenY2YSyncCronJobModel
under the hood each time it is called.- Specified by:
startSync
in interfaceSyncExecutionService
- Parameters:
job
- instance of theY2YSyncJobModel
used for synchronizationexecutionMode
-ExecutionMode
(SYNC or ASYNC)
-
getAllSyncJobs
public java.util.Collection<Y2YSyncJobModel> getAllSyncJobs()
Description copied from interface:SyncExecutionService
Returns collection of all sync jobs in the system.- Specified by:
getAllSyncJobs
in interfaceSyncExecutionService
-
getSyncJobsForContainer
public java.util.Collection<Y2YSyncJobModel> getSyncJobsForContainer(Y2YStreamConfigurationContainerModel container)
Description copied from interface:SyncExecutionService
Returns collection of all sync jobs for given Y2YStreamConfigurationContainer.- Specified by:
getSyncJobsForContainer
in interfaceSyncExecutionService
-
createSyncJobForDataHub
public Y2YSyncJobModel createSyncJobForDataHub(java.lang.String code, Y2YStreamConfigurationContainerModel container)
Description copied from interface:SyncExecutionService
Creates sync job configured for DataHub sync for a givencontainer
. Models are not saved.- Specified by:
createSyncJobForDataHub
in interfaceSyncExecutionService
-
createSyncJobForDataHub
public Y2YSyncJobModel createSyncJobForDataHub(java.lang.String code, Y2YStreamConfigurationContainerModel container, java.lang.String dataHubUrl)
Description copied from interface:SyncExecutionService
Creates sync job configured for DataHub sync for a givencontainer
with customdataHubUrl
. Models are not saved.- Specified by:
createSyncJobForDataHub
in interfaceSyncExecutionService
-
createSyncJobForZip
public Y2YSyncJobModel createSyncJobForZip(java.lang.String code, Y2YStreamConfigurationContainerModel container)
Description copied from interface:SyncExecutionService
Creates sync job configured for Zip sync for a givencontainer
.- Specified by:
createSyncJobForZip
in interfaceSyncExecutionService
-
setModelService
public void setModelService(ModelService modelService)
-
setCronJobService
public void setCronJobService(CronJobService cronJobService)
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
-