Class SyncTask

  • All Implemented Interfaces:
    com.hybris.cockpitng.core.context.CockpitContext, java.io.Serializable

    public class SyncTask
    extends com.hybris.cockpitng.core.context.impl.DefaultCockpitContext
    Defines synchronization task.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<? extends ItemModel> getItems()
      Items to be synchronised.
      SyncConfig getSyncConfig()
      Optional configuration for synchronisation SyncConfig
      SyncItemJobModel getSyncItemJob()  
      boolean isCatalogVersionSync()
      Tells if sync is for entire catalog version.
      void setSyncConfig​(SyncConfig syncConfig)  
      • Methods inherited from class com.hybris.cockpitng.core.context.impl.DefaultCockpitContext

        addAllParameters, clearParameters, containsParameter, getParameter, getParameterKeys, getParameters, removeParameter, setParameter, setParameters
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.hybris.cockpitng.core.context.CockpitContext

        getParameterAsBoolean
    • Constructor Detail

      • SyncTask

        public SyncTask​(java.util.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 Detail

      • 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 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.