Interface CatalogSynchronizationService

All Known Implementing Classes:
DefaultCatalogSynchronizationService

public interface CatalogSynchronizationService
  • Method Details

    • synchronizeFully

      void synchronizeFully(CatalogVersionModel source, CatalogVersionModel target)
      For the given catalog version pair a new CatalogVersionSyncJobModel is being created configured to sync all default catalog item types. The actual sync process is backed by a also new CatalogVersionSyncCronJobModel which is performed synchronously.
    • synchronizeFully

      void synchronizeFully(CatalogVersionModel source, CatalogVersionModel target, int numberOfThreads)
      For the given catalog version pair a new CatalogVersionSyncJobModel is being created configured to sync all default catalog item types. The actual sync process is backed by a also new CatalogVersionSyncCronJobModel which is started synchronously.
      Parameters:
      numberOfThreads - specifies the number of sync workers to be used - overrides the number configured in catalog.sync.workers
    • synchronizeFullyInBackground

      void synchronizeFullyInBackground(CatalogVersionModel source, CatalogVersionModel target)
      For the given catalog version pair a new CatalogVersionSyncJobModel is being created configured to sync all default catalog item types. The actual sync process is backed by a also new CatalogVersionSyncCronJobModel which is started asynchronously.
    • synchronize

      SyncResult synchronize(SyncItemJobModel syncJob, SyncConfig syncConfig)
      Starts synchronization for an existing SyncItemJobModel. The configuration parameter allows to configure/override a number of synchronization job settings.

      The returned SyncResult gives both access to the execution result or, in case the process was started asynchronously, to observe the running process

    • performSynchronization

      List<SyncResult> performSynchronization(List<ItemModel> givenItems, List<SyncItemJobModel> syncItemJobs, SyncConfig syncConfig)
      Performs the synchronization for given items against given sync jobs.

      Note that for each job the list of items is being filtered to schedule only the ones which are actually applicable (being compatible with the job's root type collection).

      For influencing the sync behavior a sync config object can be passed, e.g. for controlling the level of multi-threading.

    • performSynchronization

      SyncResult performSynchronization(List<ItemModel> givenItems, SyncItemJobModel syncItemJob, SyncConfig syncConfig)
      Performs the synchronization for given items.

      Note that the list of items is being filtered to schedule only the ones which are actually applicable (being compatible with the job's root type collection).

      For influencing the sync behavior a sync config object can be passed, e.g. for controlling the level of multi-threading.

    • getApplicableItems

      List<ItemModel> getApplicableItems(List<ItemModel> givenItems, SyncItemJobModel syncItemJob)
      Filters given items returning only the ones being applicable to the given sync job. Being applicable means whether or not an item is compatible to the job's root type collection and whether it belongs to the specified catalog version.
    • getSynchronizationSourceTimestampFor

      ItemSyncTimestampModel getSynchronizationSourceTimestampFor(SyncItemJobModel theSyncJob, ItemModel source)
      Returns the existing ItemSyncTimestampModel for the source item in the scope of the given sync job. In case of the item never been synchronized before NULL is returned.
    • getSynchronizationTargetTimestampFor

      ItemSyncTimestampModel getSynchronizationTargetTimestampFor(SyncItemJobModel theSyncJob, ItemModel target)
      Returns the existing ItemSyncTimestampModel for the target item in the scope of the given sync job. In case of the original source item being deleted this methods will return NULL.
    • getSynchronizationSourceFor

      <T extends ItemModel> T getSynchronizationSourceFor(SyncItemJobModel theSyncJob, ItemModel target)
      Returns the counterpart for the target item against given sync job theSyncJob.
    • getSynchronizationTargetFor

      <T extends ItemModel> T getSynchronizationTargetFor(SyncItemJobModel theSyncJob, ItemModel source)
      Returns the counterpart for the source item against given sync job theSyncJob.
    • isInProgress

      boolean isInProgress(SyncItemJobModel theSyncJob)
      Checks whether the given givenSyncJob is currently in progress.
    • lookupCurrentSynchronizations

      Collection<SyncResult> lookupCurrentSynchronizations(SyncItemJobModel theSyncJob)
      Returns the current executions for the given theSyncJob.
    • getSyncJob

      SyncItemJobModel getSyncJob(CatalogVersionModel source, CatalogVersionModel target, String qualifier)
      Returns the publication rule (as SyncItemJobModel item) between a specified source catalog version and target catalog version.
    • canSynchronize

      boolean canSynchronize(SyncItemJobModel syncJob, PrincipalModel principal)
      Returns true if the principal has sync permissions to synchronize between catalog versions from given sync job.
      Parameters:
      syncJob - the sync job
      principal - the principal
      Returns:
      a boolean