Interface SynchronizationService
-
- All Known Implementing Classes:
SynchronizationServiceImpl
public interface SynchronizationServiceContains all necessary method declarations responsible for synchronization activity
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSynchronizationService.SyncContext
-
Field Summary
Fields Modifier and Type Field Description static intINITIAL_SYNC_IS_NEEDEDstatic intSYNCHRONIZATION_NOT_AVAILABLEstatic intSYNCHRONIZATION_NOT_OKstatic intSYNCHRONIZATION_OK
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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)CatalogVersionModelgetCatalogVersionForItem(TypedObject item)Retrieves source catalog version for given itemintgetPullSyncStatus(TypedObject product)SynchronizationService.SyncContextgetSyncContext(TypedObject product)SynchronizationService.SyncContextgetSyncContext(TypedObject product, boolean pullSync)java.util.List<java.lang.String>getSynchronizationStatuses(java.util.List<SyncItemJobModel> synchRules, TypedObject item)Retrieves synchronization statuses for given itemjava.util.List<SyncItemJobModel>[]getSyncJobs(ItemModel sourceCatalogVersion, ObjectType objectType)Methods retrieves all matching catalog version (at first position - all accessible, at second position - all forbidden)java.util.Collection<TypedObject>getSyncSources(TypedObject object)Gets the all sync source objects.java.util.Collection<TypedObject>getSyncSourcesAndTargets(TypedObject object)java.util.Collection<TypedObject>getSyncTargets(TypedObject object)Gets the all sync targets.java.util.List<SyncItemJobModel>[]getTargetCatalogVersions(TypedObject particularProduct)Methods retrieves all matching catalog version (at first position - all accessible, at second position - all forbidden)booleanhasMultipleRules(java.util.Collection items)Check whether some of passed items has ambigous synchronization ruleintisObjectSynchronized(TypedObject object)Checks whether particular item needs synchronizationbooleanisVersionSynchronizedAtLeastOnce(java.util.List list)Checks whether particular product version was synchronized at least oncevoidperformCatalogVersionSynchronization(java.util.Collection<CatalogVersionModel> data, java.util.List<java.lang.String> syncRulePkList, CatalogVersionModel targetCatalogVersion, java.lang.String qualifier)Perform catalog version synchronizationvoidperformPullSynchronization(java.util.List<TypedObject> targetItems)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
-
-
-
Field Detail
-
SYNCHRONIZATION_OK
static final int SYNCHRONIZATION_OK
- See Also:
- Constant Field Values
-
SYNCHRONIZATION_NOT_AVAILABLE
static final int SYNCHRONIZATION_NOT_AVAILABLE
- See Also:
- Constant Field Values
-
SYNCHRONIZATION_NOT_OK
static final int SYNCHRONIZATION_NOT_OK
- See Also:
- Constant Field Values
-
INITIAL_SYNC_IS_NEEDED
static final int INITIAL_SYNC_IS_NEEDED
- See Also:
- Constant Field Values
-
-
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 rulesitem- - 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)
-
getSyncContext
SynchronizationService.SyncContext getSyncContext(TypedObject product)
-
getSyncContext
SynchronizationService.SyncContext getSyncContext(TypedObject product, boolean pullSync)
-
-