public class CatalogVersionSyncCopyContext extends GenericCatalogCopyContext
GenericCatalogCopyContext.AbstractParentResolver, GenericCatalogCopyContext.ReferenceParentResolverLEGACY_MODE_FLAG, PARTIAL_COLLECTION_TRANSLATION_ALLOWEDctx| Constructor and Description |
|---|
CatalogVersionSyncCopyContext(CatalogVersionSyncJob job,
CatalogVersionSyncCronJob cronjob,
CatalogVersionSyncWorker worker) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterCopying(Item copy,
CatalogItemCopyCreator icc) |
protected boolean |
canBeTranslatedPartially(AttributeCopyCreator attributeCopyCreator) |
protected Item |
copy(ItemCopyCreator parent,
Item original,
Item copyToUpdate,
ItemSyncTimestamp itemSyncTimestamp)
Overwritten to lock item to copy.
|
protected ItemSyncTimestamp |
createSyncTimestamp(CatalogVersionSyncCronJob owningCronJob,
int currentTurn,
Item source,
ItemCopyCreator icc)
Creates a new ItemSyncTimestamp based on the current context and parameters.
|
void |
delete(Item original)
Delegates delete to
SynchronizationPersistenceAdapter.remove(Object) Throws two
kind of exceptions
SynchronizationPersistenceException - which is unrecoverable and it is propagated to upper layer
RecoverableSynchronizationPersistenceException - which can be temporary issue and after rerun can vanish
|
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry |
getCopy(Item source)
Overwritten to use limited item cache besides super type logic.
|
protected java.util.Set |
getCopyCreatorBlacklist(Item original,
Item toUpdate) |
protected java.util.Map |
getCopyCreatorPresetValues(Item original,
Item copyToupdate)
|
protected java.util.Set<java.lang.String> |
getCopyCreatorWhitelist(Item original,
Item toUpdate)
Builds a white list based upon the SyncItemJob.attributeDescriptors set.
|
protected SyncSchedule |
getCurrentSchedule() |
protected int |
getCurrentTurn() |
protected java.util.Set<java.lang.String> |
getNonCopyableOneToManyAttributes(Item original,
ComposedType composedType,
boolean forUpdate) |
protected SyncAttributeDescriptorData |
getSyncAttributeDescriptorData(AttributeCopyCreator attributeCopyCreator) |
protected CatalogVersion |
getTargetVersionForQueryCatalogItemCopy(Item sourceItem) |
protected CatalogVersionSyncWorker |
getWorker() |
protected boolean |
hasSchedule(CatalogItemCopyCreator icc) |
protected boolean |
hasSchedule(PK srcPK) |
boolean |
isFromSourceVersion(Item item)
Returns true if the item is from *this* source version or it is a source version item of a dependantJob (or
dependsOnJob)
|
protected boolean |
isPartOf(AttributeDescriptor attributeDescriptor)
Used by
AbstractItemCopyContext.splitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute holds partOf
values. |
protected boolean |
isPotentiallyNonCopyableOneToManyAttribute(AttributeDescriptor attributeDescriptor,
boolean forUpdate) |
protected boolean |
isUntranslatablePartOfItem(AttributeCopyCreator acc,
Item original)
Overwritten to switch off translation if configured so in
SyncAttributeDescriptorConfig. |
protected boolean |
mustBeTranslated(AttributeCopyCreator acc,
Item original)
Makes sure each catalog items must always be translated.
|
protected boolean |
mustDump(CatalogItemCopyCreator icc) |
protected void |
writeDumpRecord(CatalogItemCopyCreator icc) |
protected void |
writeDumpRecord(PK srcPK,
PK tgtPK,
PK timestampPK,
java.util.Set<java.lang.String> pendingAttributes,
java.util.Map<PK,PK> parentMappings,
boolean isDeadlockVictim) |
addCreationAttribute, afterCreate, beforeCopying, cleanup, collectPartOfItemsToCopy, computeDependentItemResolvers, computeIsCopyOnDemand, computeParentResolvers, copy, copy, copy, copyMediaData, copyPartOfValues, createAttributeCopyCreator, createCreator, finishedCopying, forceCopy, getCatalogKeyAttributesCache, getCatalogVersion, getCatalogVersionAttribute, getCatalogVersionAttributeCache, getContainedCatalogItemTypes, getCopiedItemCache, getCopyCacheHits, getCopyCacheMisses, getCopyCacheSize, getCopyOnDemandCache, getCounterpartItem, getCreationAttributes, getCronjob, getCurrentlyCopying, getDependentItemResolverCache, getDependentItemTypes, getIsCatalogTypeCache, getJob, getNonCatalogItemUniqueAttributes, getNonCatalogKeyAttributesCache, getRootCatalogType, getRootCatalogTypeCache, getRootUniqueItemType, getSourceVersion, getTargetLanguages, getTargetVersion, getUniqueKeyAttributes, initPersistenceAdapter, isCatalogItem, isCatalogItemType, isCopyOnDemand, isCopyOnDemandCatalogItemType, isCurrentlyCopying, isDependentFromSourceVersion, isExclusiveMode, isForceUpdate, isPartialCollectionTranslationEnabledGlobally, isRequiredForCreation, isSavePrevousValues, isStarted, isUntranslatableProductFeature, logSavedValues, mayBeCatalogItemDependent, mayBeCatalogItemDependent, mustBeTranslated, popCurrentlyCopying, processQueryResult, pushCurrentlyCopying, queryCatalogItemCopy, queryCopy, queryExistingSyncTimestamp, queryNonCatalogItemCopy, registerCopy, setCategoryOptions, setCopyCacheHits, setCopyCacheMisses, setCopyCacheSize, setSavePrevousValues, setTargetLanguages, setTimestamp, translate, translateAD, translateItemValue, translateValue, updateSyncTimestampallItems, createCopyDescriptor, createSession, debug, error, getCatalogManager, getCtx, getFlexibleSearch, getSession, getTypeCopyDescriptor, ignoreAttribute, info, isAtomic, isAtomic, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, safeToString, splitDescriptors, toItem, toItems, toString, valuesToString, warnpublic CatalogVersionSyncCopyContext(CatalogVersionSyncJob job, CatalogVersionSyncCronJob cronjob, CatalogVersionSyncWorker worker)
protected CatalogVersionSyncWorker getWorker()
protected SyncSchedule getCurrentSchedule()
protected boolean hasSchedule(CatalogItemCopyCreator icc)
protected boolean hasSchedule(PK srcPK)
protected int getCurrentTurn()
getCurrentTurn in class GenericCatalogCopyContextprotected void afterCopying(Item copy, CatalogItemCopyCreator icc)
afterCopying in class GenericCatalogCopyContextprotected boolean mustDump(CatalogItemCopyCreator icc)
protected void writeDumpRecord(CatalogItemCopyCreator icc)
protected void writeDumpRecord(PK srcPK, PK tgtPK, PK timestampPK, java.util.Set<java.lang.String> pendingAttributes, java.util.Map<PK,PK> parentMappings, boolean isDeadlockVictim)
protected java.util.Set<java.lang.String> getCopyCreatorWhitelist(Item original, Item toUpdate)
This applies to catalog items only. Any other item which is copied as partOf value is copied completely.
getCopyCreatorWhitelist in class GenericCatalogCopyContextprotected java.util.Set getCopyCreatorBlacklist(Item original, Item toUpdate)
getCopyCreatorBlacklist in class GenericCatalogCopyContextprotected java.util.Set<java.lang.String> getNonCopyableOneToManyAttributes(Item original, ComposedType composedType, boolean forUpdate)
protected boolean isPotentiallyNonCopyableOneToManyAttribute(AttributeDescriptor attributeDescriptor, boolean forUpdate)
protected java.util.Map getCopyCreatorPresetValues(Item original, Item copyToupdate)
GenericCatalogCopyContextgetCopyCreatorPresetValues in class GenericCatalogCopyContextprotected boolean isUntranslatablePartOfItem(AttributeCopyCreator acc, Item original)
SyncAttributeDescriptorConfig.isUntranslatablePartOfItem in class GenericCatalogCopyContextprotected boolean mustBeTranslated(AttributeCopyCreator acc, Item original)
GenericCatalogCopyContextprotected boolean canBeTranslatedPartially(AttributeCopyCreator attributeCopyCreator)
canBeTranslatedPartially in class GenericCatalogCopyContextprotected boolean isPartOf(AttributeDescriptor attributeDescriptor)
AbstractItemCopyContextAbstractItemCopyContext.splitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute holds partOf
values. These values are always copied (created or translated if already existing) when the original item is being
copied.isPartOf in class AbstractItemCopyContextprotected SyncAttributeDescriptorData getSyncAttributeDescriptorData(AttributeCopyCreator attributeCopyCreator)
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry getCopy(Item source)
getCopy in class GenericCatalogCopyContextprotected ItemSyncTimestamp createSyncTimestamp(CatalogVersionSyncCronJob owningCronJob, int currentTurn, Item source, ItemCopyCreator icc)
GenericCatalogCopyContextcreateSyncTimestamp in class GenericCatalogCopyContextpublic void delete(Item original) throws SynchronizationPersistenceException, RecoverableSynchronizationPersistenceException
SynchronizationPersistenceAdapter.remove(Object) Throws two
kind of exceptions
protected Item copy(ItemCopyCreator parent, Item original, Item copyToUpdate, ItemSyncTimestamp itemSyncTimestamp)
copy in class GenericCatalogCopyContextpublic boolean isFromSourceVersion(Item item) throws JaloInvalidParameterException
isFromSourceVersion in class GenericCatalogCopyContextitem - the item to checkJaloInvalidParameterException - if the item is no catalog itemprotected CatalogVersion getTargetVersionForQueryCatalogItemCopy(Item sourceItem)
getTargetVersionForQueryCatalogItemCopy in class GenericCatalogCopyContextCopyright © 2018 SAP SE. All Rights Reserved.