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 voidfinishedCopying(ItemCopyCreator icc)Superclass method overridden to register a copied item permanently viaSyncItemJob.registerSynchronizedItem(SyncItemCronJob, Item, Item, String).protected SyncItemJob.SyncAttributeDescriptorConfigDatagetAttributeConfig(AttributeDescriptor attributeDescriptor)protected SyncItemJob.SyncAttributeDescriptorConfigDatagetAttributeConfig(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 SyncItemCronJobgetCronjob()Redirecting logs to cronjob log mechanismbooleanisDebugEnabled()Redirecting logs to cronjob log mechanismbooleanisErrorEnabled()Redirecting logs to cronjob log mechanismbooleanisInfoEnabled()Redirecting logs to cronjob log mechanismprotected booleanisPartOf(AttributeDescriptor attributeDescriptor)Overwritten to optionally treat any attribute as partOf if configured so inSyncAttributeDescriptorConfig.protected booleanisUntranslatable(AttributeCopyCreator acc, Item original)Overwritten to switch off translation if configured so inSyncAttributeDescriptorConfig.booleanisWarnEnabled()Redirecting logs to cronjob log mechanismprotected voidlog(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:
getCopyCreatorWhitelistin classItemCopyContext
-
isUntranslatable
protected boolean isUntranslatable(AttributeCopyCreator acc, Item original)
Overwritten to switch off translation if configured so inSyncAttributeDescriptorConfig.- Overrides:
isUntranslatablein classGenericCatalogCopyContext
-
isPartOf
protected boolean isPartOf(AttributeDescriptor attributeDescriptor)
Overwritten to optionally treat any attribute as partOf if configured so inSyncAttributeDescriptorConfig.- Overrides:
isPartOfin 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:
login classItemCopyContext
-
isDebugEnabled
public boolean isDebugEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isDebugEnabledin classItemCopyContext
-
isInfoEnabled
public boolean isInfoEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isInfoEnabledin classItemCopyContext
-
isWarnEnabled
public boolean isWarnEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isWarnEnabledin classItemCopyContext
-
isErrorEnabled
public boolean isErrorEnabled()
Redirecting logs to cronjob log mechanism- Overrides:
isErrorEnabledin 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:
finishedCopyingin classGenericCatalogCopyContext
-
-