Package de.hybris.platform.catalog.jalo
Class SyncItemJob.SyncItemCopyContext
- java.lang.Object
-
- de.hybris.platform.catalog.jalo.copy.ItemCopyContext
-
- de.hybris.platform.catalog.jalo.copy.GenericCatalogCopyContext
-
- de.hybris.platform.catalog.jalo.SyncItemJob.SyncItemCopyContext
-
- Enclosing class:
- SyncItemJob
public class SyncItemJob.SyncItemCopyContext extends GenericCatalogCopyContext
Own copy context from inside the job.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.catalog.jalo.copy.ItemCopyContext
UNIQUE_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SyncItemCopyContext(SyncItemCronJob cronjob, SyncItemJob job, CatalogVersion srcV, CatalogVersion tgtV, java.util.Map<PK,PK> finishedSynchronizedItems)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finishedCopying(ItemCopyCreator icc)
Superclass method overridden to register a copied item permanently viaSyncItemJob.registerSynchronizedItem(SyncItemCronJob, Item, Item, String)
.protected SyncItemJob.SyncAttributeDescriptorConfigData
getAttributeConfig(AttributeDescriptor attributeDescriptor)
protected SyncItemJob.SyncAttributeDescriptorConfigData
getAttributeConfig(ComposedType type, AttributeDescriptor attributeDescriptor)
protected java.util.Set<java.lang.String>
getCopyCreatorWhitelist(Item original, Item toUpdate)
Builds a white list based upon the SyncItemJob.attributeDescriptors set.protected SyncItemCronJob
getCronjob()
Redirecting logs to cronjob log mechanismboolean
isDebugEnabled()
Redirecting logs to cronjob log mechanismboolean
isErrorEnabled()
Redirecting logs to cronjob log mechanismboolean
isInfoEnabled()
Redirecting logs to cronjob log mechanismprotected boolean
isPartOf(AttributeDescriptor attributeDescriptor)
Overwritten to optionally treat any attribute as partOf if configured so inSyncAttributeDescriptorConfig
.protected boolean
isUntranslatable(AttributeCopyCreator acc, Item original)
Overwritten to switch off translation if configured so inSyncAttributeDescriptorConfig
.boolean
isWarnEnabled()
Redirecting logs to cronjob log mechanismprotected void
log(java.lang.String message, org.apache.log4j.Level level)
Redirecting logs to cronjob log mechanism-
Methods inherited from class de.hybris.platform.catalog.jalo.copy.GenericCatalogCopyContext
findExistingCopyToUpdate, getContainedCatalogItems, getContainedCatalogItemTypes, getCopy, getCopyCreatorPresetValues, getCounterpartItem, getJob, getSourceVersion, getTargetLanguages, getTargetVersion, isFromSourceVersion, isUpToDate, mustBeTranslated, setCategoryOptions, setTargetLanguages, setTimestamp, translate
-
Methods inherited from class de.hybris.platform.catalog.jalo.copy.ItemCopyContext
addCopiedItem, addCreationAttribute, allItems, allItems, beforeCopying, checkPendingReferences, cleanup, collectPartOfItemsToCopy, copy, copy, copy, copy, copyMediaData, copyPartOfValues, createAttributeCopyCreator, createCopyDescriptor, debug, error, forceCopy, getCopyCreatorBlacklist, getCreationAttributes, getCtx, getMediaTypeCode, getTypeCopyDescriptor, hasCopy, ignoreAttribute, info, isAlreadyCopied, isAtomic, isAtomic, isCurrentlyCopying, isCurrentlyCopying, isRequiredForCreation, isSavePrevousValues, popCurrentlyCopying, processPendingReferences, pushCurrentlyCopying, registerCopy, registerPendingReference, safeToString, setSavePrevousValues, splitDescriptors, started, toItem, toItem, toString, transformCacheKey, transformCacheKeys, translateAD, translateValue, translateValue, valuesToString, warn
-
-
-
-
Constructor Detail
-
SyncItemCopyContext
public SyncItemCopyContext(SyncItemCronJob cronjob, SyncItemJob job, CatalogVersion srcV, CatalogVersion tgtV, java.util.Map<PK,PK> finishedSynchronizedItems)
-
-
Method Detail
-
getCopyCreatorWhitelist
protected java.util.Set<java.lang.String> getCopyCreatorWhitelist(Item original, Item toUpdate)
Builds a white list based upon the SyncItemJob.attributeDescriptors set. Only attributes which belong to this set are copied to the target item.This applies to catalog items only. Any other item which is copied as partOf value is copied completely.
- Overrides:
getCopyCreatorWhitelist
in classItemCopyContext
-
isUntranslatable
protected boolean isUntranslatable(AttributeCopyCreator acc, Item original)
Overwritten to switch off translation if configured so inSyncAttributeDescriptorConfig
.- Overrides:
isUntranslatable
in classGenericCatalogCopyContext
-
isPartOf
protected boolean isPartOf(AttributeDescriptor attributeDescriptor)
Overwritten to optionally treat any attribute as partOf if configured so inSyncAttributeDescriptorConfig
.- Overrides:
isPartOf
in classGenericCatalogCopyContext
-
getAttributeConfig
protected SyncItemJob.SyncAttributeDescriptorConfigData getAttributeConfig(AttributeDescriptor attributeDescriptor)
-
getAttributeConfig
protected SyncItemJob.SyncAttributeDescriptorConfigData getAttributeConfig(ComposedType type, AttributeDescriptor attributeDescriptor)
-
log
protected void log(java.lang.String message, org.apache.log4j.Level level)
Redirecting logs to cronjob log mechanism- Overrides:
log
in classItemCopyContext
-
isDebugEnabled
public boolean isDebugEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isDebugEnabled
in classItemCopyContext
-
isInfoEnabled
public boolean isInfoEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isInfoEnabled
in classItemCopyContext
-
isWarnEnabled
public boolean isWarnEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isWarnEnabled
in classItemCopyContext
-
isErrorEnabled
public boolean isErrorEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isErrorEnabled
in classItemCopyContext
-
getCronjob
protected SyncItemCronJob getCronjob()
Redirecting logs to cronjob log mechanism
-
finishedCopying
protected void finishedCopying(ItemCopyCreator icc)
Superclass method overridden to register a copied item permanently viaSyncItemJob.registerSynchronizedItem(SyncItemCronJob, Item, Item, String)
.- Overrides:
finishedCopying
in classGenericCatalogCopyContext
-
-