public class DefaultItemSynchronizationService extends java.lang.Object implements ItemSynchronizationService
ItemSynchronizationService| Constructor and Description |
|---|
DefaultItemSynchronizationService() |
public SynchronizationItemDetailsData getSynchronizationItemStatus(SyncRequestData syncRequestData, ItemModel item)
ItemModel taking in consideration the source and target
catalog versions. Implementations should be able to provide details of the synchronization status of related items
as well.getSynchronizationItemStatus in interface ItemSynchronizationServicesyncRequestData - the synchronization request containing the source and target catalog versionsitem - the item model we are interested in getting the synchronization statusSynchronizationItemDetailsData, never null.java.lang.IllegalArgumentException - when any of the given parameters is null.protected SyncItemStatus aggregatedStatusFromRelatedItems(java.util.List<SyncItemInfo> syncInfo)
SyncItemStatus from a given list of SyncItemInfosyncInfo - the list of SyncItemInfo, including the root syncItemInfopublic void performItemSynchronization(SyncRequestData syncRequestData, java.util.List<ItemModel> items, SyncConfig config)
ItemModel taking in consideration the source and target catalog
versions. Implementations should be able to provide details of the synchronization status of related items as
well.performItemSynchronization in interface ItemSynchronizationServicesyncRequestData - the synchronization request containing the source and target catalog versionsitems - the list of item models that we want to synchronizeconfig - the synchronization configuration . See SyncConfig for more details.protected java.util.Map<java.lang.String,java.lang.Object> getItemCollectorContext(SyncItemJobModel syncItemJob)
CTX_LOCALES attribute as a collection of locales that are common for both source and target catalog versions.
It also sets VISITORS_CTX_TARGET_CATALOG_VERSION attribute as a target catalog version that is used in
synchronization process.syncItemJob - the sync item job being investigated.protected java.util.List<ItemModel> collectRelatedItems(ItemModel item, java.util.Map<java.lang.String,java.lang.Object> context)
ItemModel related to an item of which we want to get the synchronization statusitem - the item of which we want to retrieve the related items from a synchronization perspectivecontext - the configuration context in which the item collector will be executedprotected SyncItemJobModel getRelevantSyncItemJob(SyncRequestData syncRequestData, ItemModel item)
CatalogVersionModel of the ItemModel the SyncItemJobModel matching
the request synchronization directionsyncRequestData - the requested direction for the synchronization from a catalog version perspectiveitem - the catalog aware item from which a catalog version is extractedprotected boolean isOutboundSynchronization(SyncRequestData syncRequestData, ItemModel item)
CatalogVersionModel (sees SynchronizationStatusService.getOutboundSynchronizations(ItemModel) and
SynchronizationStatusService.getInboundSynchronizations(ItemModel)) An outbound synchronization is from a
non active source version to an active target version. An inbound synchronization is from an active source version
to a non active target version.syncRequestData - the requested direction for the synchronization from a catalog version perspectivejava.lang.IllegalArgumentException - if the direction could not be determined because of both catalog versions being active or inactiveprotected SynchronizationItemDetailsData buildData(SyncRequestData syncRequestData, ItemModel item, java.util.List<ItemModel> relatedItems, java.util.List<SyncItemInfo> syncInfo, SyncItemInfo rootSyncInfo)
syncRequestData - the requested direction for the synchronization from a catalog version perspectiveitem - the catalog aware item for which a synchronization status is returnedrelatedItems - the collected related items to the main itemsyncInfo - the list of SyncItemInfo for the given relatedItemsrootSyncInfo - the SyncItemInfo of the main itempublic void setModelService(ModelService modelService)
protected ModelService getModelService()
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
protected CatalogVersionService getCatalogVersionService()
public void setRelatedItemsCollector(RelatedItemsCollector relatedItemsCollector)
protected RelatedItemsCollector getRelatedItemsCollector()
public void setPlatformSynchronizationStatusService(SynchronizationStatusService platformSynchronizationStatusService)
protected SynchronizationStatusService getPlatformSynchronizationStatusService()
public void setCatalogSynchronizationService(CatalogSynchronizationService catalogSynchronizationService)
protected CatalogSynchronizationService getCatalogSynchronizationService()
public void setCatalogTypeService(CatalogTypeService catalogTypeService)
protected CatalogTypeService getCatalogTypeService()
public void setSearchRestrictionService(SearchRestrictionService searchRestrictionService)
protected SearchRestrictionService getSearchRestrictionService()
public void setSessionService(SessionService sessionService)
public SessionService getSessionService()
protected CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
protected SessionSearchRestrictionsDisabler getSessionSearchRestrictionsDisabler()
public void setSessionSearchRestrictionsDisabler(SessionSearchRestrictionsDisabler sessionSearchRestrictionsDisabler)
Copyright © 2018 SAP SE. All Rights Reserved.