public class DefaultItemSynchronizationFacade extends java.lang.Object implements ItemSynchronizationFacade
ItemSynchronizationFacade facade.
Its main purpose is to coordinate the recursive calls for the ItemSynchronizationService
respecting the maxDepth attribute (either given in the method or using the default value).
It makes usage of the ItemCollectorRegistry and ItemCollector classes
to identify item models that are directly referenced or that are shared by a given item model.| Constructor and Description |
|---|
DefaultItemSynchronizationFacade() |
public SyncItemStatusData getSynchronizationItemStatus(SyncRequestData syncRequestData, ItemSynchronizationData itemSynchronizationData)
ItemSynchronizationFacadeItemModel. In the method signature the client needs to provide
the SyncRequestData which contains the source and target catalog versions.
The implementation should provide a default maximum depth property to prevent the mechanism to crawl too many items.getSynchronizationItemStatus in interface ItemSynchronizationFacadesyncRequestData - the synchronization request containing the source and target catalog versionsitemSynchronizationData - the pair of identifier/type to retrieve the ItemModel of which we want to get the synchronization statusItemModel.public SyncItemStatusData getSynchronizationItemStatus(SyncRequestData syncRequestData, ItemSynchronizationData itemSynchronizationData, SyncItemStatusConfig config)
ItemSynchronizationFacadeItemModel. In the method signature the client needs to provide
the SyncRequestData which contains the source and target catalog versions.
This method lets the client decide what is the maximum depth level to navigate on the item's dependencies.getSynchronizationItemStatus in interface ItemSynchronizationFacadesyncRequestData - the synchronization request containing the source and target catalog versionsitemSynchronizationData - the pair of identifier/type to retrieve the ItemModel of which we want to get the synchronization statusconfig - the get status configuration. See SyncItemStatusConfig for more details.ItemModel.public void performItemSynchronization(SyncRequestData syncRequestData, SynchronizationData synchronizationData)
ItemSynchronizationFacadeItemModel. In the method signature the client needs to provide
the SyncRequestData which contains the source and target catalog versions.performItemSynchronization in interface ItemSynchronizationFacadesyncRequestData - the synchronization request containing the source and target catalog versionssynchronizationData - contains the list of ItemSynchronizationData pairs of itemId/itemType that we want to synchronizepublic void performItemSynchronization(SyncRequestData syncRequestData, SynchronizationData synchronizationData, SyncConfig config)
ItemSynchronizationFacadeItemModel. In the method signature the client needs to provide
the SyncRequestData which contains the source and target catalog versions.performItemSynchronization in interface ItemSynchronizationFacadesyncRequestData - the synchronization request containing the source and target catalog versionssynchronizationData - contains the list of pairs of ItemSynchronizationData itemId/itemType that we want to synchronizeconfig - the synchronization configuration . See SyncConfig for more details.protected java.util.List<ItemModel> getListOfItems(SynchronizationData synchronizationData)
ItemModelsynchronizationData - the list of ItemSynchronizationData candidates on which to perform synchronizationItemModel to be synchronizedprotected ItemModel getItem(ItemSynchronizationData itemSynchronizationData)
ItemModelitemSynchronizationData - the ItemSynchronizationData candidate on which to perform synchronizationItemModel to be synchronizedprotected SyncItemStatusData getSynchronizationItemStatus(SyncRequestData syncRequestData, ItemModel item, SyncItemStatusConfig config, java.lang.Integer level)
ItemSynchronizationService.getSynchronizationItemStatus(SyncRequestData, ItemModel).
It also converts the result into an instance of SyncItemStatusData that will be then post populated by recursive calls to this method.syncRequestData - the synchronization request data containing the source and target catalog versions.item - the item model currently being inspectedconfig - the configuration for getting the synchronization statuslevel - the current level on the data structure.SyncItemStatusData information about a given item model and all related items collected during execution.protected java.util.List<SyncItemStatusData> findUnavailableDependencies(SyncRequestData syncRequestData, ItemModel item, java.lang.Integer level)
syncRequestData - the synchronization request data containing the source and target catalog versions.item - the item model currently being inspectedlevel - the current level on the data structureSyncItemStatusData for never-synchronized dependent itemsprotected java.util.List<SyncItemStatusData> collectItemsAndGetSynchronizationItemStatus(SyncRequestData syncRequestData, ItemModel item, SyncItemStatusConfig config, java.lang.Integer level, ItemCollectorRegistry collectorRegistry)
getSynchronizationItemStatus(SyncRequestData, ItemModel, SyncItemStatusConfig, Integer)
from individual items that were collected.syncRequestData - the synchronization request data containing the source and target catalog versions.item - the item model currently being inspectedconfig - the configuration for getting the synchronization statuslevel - the current level on the data structure.collectorRegistry - the collector registry to get an instance of ItemCollectorSyncItemStatusData beans collected and converted recursively.protected java.util.concurrent.ForkJoinPool getForkJoinPool()
protected ItemCollectorRegistry getBasicItemCollectorRegistry()
public void setBasicItemCollectorRegistry(ItemCollectorRegistry basicItemCollectorRegistry)
protected ItemCollectorRegistry getSharedItemCollectorRegistry()
public void setSharedItemCollectorRegistry(ItemCollectorRegistry sharedItemCollectorRegistry)
protected ItemCollectorRegistry getDependentItemCollectorRegistry()
public void setDependentItemCollectorRegistry(ItemCollectorRegistry dependentItemCollectorRegistry)
public void setItemSynchronizationService(ItemSynchronizationService itemSynchronizationService)
protected ItemSynchronizationService getItemSynchronizationService()
protected Converter<SynchronizationItemDetailsData,SyncItemStatusData> getSyncItemStatusConverter()
public void setSyncItemStatusConverter(Converter<SynchronizationItemDetailsData,SyncItemStatusData> syncItemStatusConverter)
protected SyncItemStatusConfig getSyncItemStatusConfig()
public void setSyncItemStatusConfig(SyncItemStatusConfig syncItemStatusConfig)
public void setSyncConfig(SyncConfig syncConfig)
protected SyncConfig getSyncConfig()
public void setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
protected UniqueItemIdentifierService getUniqueItemIdentifierService()
Copyright © 2018 SAP SE. All Rights Reserved.