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 Details

    • SyncTask

      public SyncTask(List<? extends ItemModel> items, SyncItemJobModel syncItemJob)
      Creates items sync task
      Parameters:
      items - - items to be synchronised - see getItems() 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 Details

    • getSyncItemJob

      public SyncItemJobModel getSyncItemJob()
    • getItems

      public 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 given getSyncItemJob().
      Returns:
      list of items to sync.
    • getSyncConfig

      public SyncConfig getSyncConfig()
      Optional configuration for synchronisation SyncConfig
    • setSyncConfig

      public void setSyncConfig(SyncConfig syncConfig)
    • isCatalogVersionSync

      public boolean isCatalogVersionSync()
      Tells if sync is for entire catalog version. Checks if list of getItems() is empty or has only one catalog version.
      Returns:
      true this task should synchronize full catalog version.