Interface SynchronizationService

  • All Known Implementing Classes:
    SynchronizationServiceImpl

    public interface SynchronizationService
    Contains all necessary method declarations responsible for synchronization activity
    • Method Detail

      • performSynchronization

        java.util.Collection<TypedObject> performSynchronization​(java.util.Collection<? extends java.lang.Object> items,
                                                                 java.util.List<java.lang.String> syncJobPk,
                                                                 CatalogVersionModel targetCatalogVersion,
                                                                 java.lang.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​(java.util.List<TypedObject> targetItems)
      • isObjectSynchronized

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

        int getPullSyncStatus​(TypedObject product)
      • getTargetCatalogVersions

        java.util.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

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

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

        java.util.List<java.lang.String> getSynchronizationStatuses​(java.util.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​(java.util.Collection<CatalogVersionModel> data,
                                                  java.util.List<java.lang.String> syncRulePkList,
                                                  CatalogVersionModel targetCatalogVersion,
                                                  java.lang.String qualifier)
        Perform catalog version synchronization
      • isVersionSynchronizedAtLeastOnce

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

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

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

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

        java.util.Collection<TypedObject> getSyncSourcesAndTargets​(TypedObject object)