Interface SynchronizationService

All Known Implementing Classes:
CMSSynchronizationService, SynchronizationServiceImpl

public interface SynchronizationService
Contains all necessary method declarations responsible for synchronization activity
  • Field Details

  • Method Details

    • performSynchronization

      Collection<TypedObject> performSynchronization(Collection<? extends Object> items, List<String> syncJobPk, CatalogVersionModel targetCatalogVersion, String qualifier)
      Method that runs particular synchronization
      Parameters:
      items - - products passed for synchronizations
      Returns:
      the collection of typed objects which were affected by the sync, i.e. which may need to be updated
    • performPullSynchronization

      void performPullSynchronization(List<TypedObject> targetItems)
    • isObjectSynchronized

      int isObjectSynchronized(TypedObject object)
      Checks whether particular item needs synchronization
    • getPullSyncStatus

      int getPullSyncStatus(TypedObject product)
    • getTargetCatalogVersions

      List<SyncItemJobModel>[] getTargetCatalogVersions(TypedObject particularProduct)
      Methods retrieves all matching catalog version (at first position - all accessible, at second position - all forbidden)
    • getCatalogVersionForItem

      CatalogVersionModel getCatalogVersionForItem(TypedObject item)
      Retrieves source catalog version for given item
      Parameters:
      item - - passed item
    • getAllSynchronizationRules

      Map<String,String>[] getAllSynchronizationRules(Collection items)
      Retrieves all matching synchronization rules (at first position - all accessible, at second position - all forbidden)
    • hasMultipleRules

      boolean hasMultipleRules(Collection items)
      Check whether some of passed items has ambigous synchronization rule
      Parameters:
      items - - passed items
    • getSynchronizationStatuses

      List<String> getSynchronizationStatuses(List<SyncItemJobModel> synchRules, TypedObject item)
      Retrieves synchronization statuses for given item
      Parameters:
      synchRules - - accessible synch rules
      item - - current checked object
      Returns:
      list of primary keys
    • performCatalogVersionSynchronization

      void performCatalogVersionSynchronization(Collection<CatalogVersionModel> data, List<String> syncRulePkList, CatalogVersionModel targetCatalogVersion, String qualifier)
      Perform catalog version synchronization
    • isVersionSynchronizedAtLeastOnce

      boolean isVersionSynchronizedAtLeastOnce(List list)
      Checks whether particular product version was synchronized at least once
    • getSyncJobs

      List<SyncItemJobModel>[] getSyncJobs(ItemModel sourceCatalogVersion, ObjectType objectType)
      Methods retrieves all matching catalog version (at first position - all accessible, at second position - all forbidden)
    • getSyncSources

      Collection<TypedObject> getSyncSources(TypedObject object)
      Gets the all sync source objects.
      Parameters:
      object - the object
      Returns:
      the sync sources
    • getSyncTargets

      Collection<TypedObject> getSyncTargets(TypedObject object)
      Gets the all sync targets.
      Parameters:
      object - the object
      Returns:
      the sync targets
    • getSyncSourcesAndTargets

      Collection<TypedObject> getSyncSourcesAndTargets(TypedObject object)
    • getSyncContext

    • getSyncContext

      SynchronizationService.SyncContext getSyncContext(TypedObject product, boolean pullSync)