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,java.io.Serializable
public class SyncTask extends com.hybris.cockpitng.core.context.impl.DefaultCockpitContextDefines synchronization task.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SyncTask(SyncItemJobModel syncItemJob)Creates full catalog version syncSyncTask(java.util.List<? extends ItemModel> items, SyncItemJobModel syncItemJob)Creates items sync task
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<? extends ItemModel>getItems()Items to be synchronised.SyncConfiggetSyncConfig()Optional configuration for synchronisationSyncConfigSyncItemJobModelgetSyncItemJob()booleanisCatalogVersionSync()Tells 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, setParameters
-
-
-
-
Constructor Detail
-
SyncTask
public SyncTask(java.util.List<? extends ItemModel> items, SyncItemJobModel syncItemJob)
Creates items sync task- Parameters:
items- - items to be synchronised - seegetItems()for more details.syncItemJob- - job which will be used to perform sync.
-
SyncTask
public SyncTask(SyncItemJobModel syncItemJob)
Creates full catalog version sync- Parameters:
syncItemJob- - job which will be used to perform sync.
-
-
Method Detail
-
getSyncItemJob
public SyncItemJobModel getSyncItemJob()
-
getItems
public java.util.List<? extends ItemModel> 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
public SyncConfig getSyncConfig()
Optional configuration for synchronisationSyncConfig
-
setSyncConfig
public void setSyncConfig(SyncConfig syncConfig)
-
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.
-
-