Package com.hybris.backoffice.sync
Class SyncTask
java.lang.Object
com.hybris.cockpitng.core.context.impl.DefaultCockpitContext
com.hybris.backoffice.sync.SyncTask
- All Implemented Interfaces:
com.hybris.cockpitng.core.context.CockpitContext,Serializable
public class SyncTask
extends com.hybris.cockpitng.core.context.impl.DefaultCockpitContext
Defines synchronization task.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSyncTask(SyncItemJobModel syncItemJob) Creates full catalog version syncSyncTask(List<? extends ItemModel> items, SyncItemJobModel syncItemJob) Creates items sync task -
Method Summary
Modifier and TypeMethodDescriptiongetItems()Items to be synchronised.Optional configuration for synchronisationSyncConfigbooleanTells if sync is for entire catalog version.voidsetSyncConfig(SyncConfig syncConfig) Methods inherited from class com.hybris.cockpitng.core.context.impl.DefaultCockpitContext
addAllParameters, clearParameters, containsParameter, getParameter, getParameterKeys, getParameters, removeParameter, setParameter, setParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hybris.cockpitng.core.context.CockpitContext
getParameterAsBoolean, getParameterAsInt
-
Constructor Details
-
SyncTask
Creates items sync task- Parameters:
items- - items to be synchronised - seegetItems()for more details.syncItemJob- - job which will be used to perform sync.
-
SyncTask
Creates full catalog version sync- Parameters:
syncItemJob- - job which will be used to perform sync.
-
-
Method Details
-
getSyncItemJob
-
getItems
Items to be synchronised. If empty or contains only one catalog version it means that full catalog version sync should be performed for givengetSyncItemJob().- Returns:
- list of items to sync.
-
getSyncConfig
Optional configuration for synchronisationSyncConfig -
setSyncConfig
-
isCatalogVersionSync
public boolean isCatalogVersionSync()Tells if sync is for entire catalog version. Checks if list ofgetItems()is empty or has only one catalog version.- Returns:
- true this task should synchronize full catalog version.
-