Class GenericCatalogCopyContext
- java.lang.Object
-
- de.hybris.platform.catalog.jalo.copy.ItemCopyContext
-
- de.hybris.platform.catalog.jalo.copy.GenericCatalogCopyContext
-
- Direct Known Subclasses:
SyncItemJob.SyncItemCopyContext
@Deprecated(since="ages", forRemoval=false) public class GenericCatalogCopyContext extends ItemCopyContextDeprecated.since agesGenericCatalogCopyContext
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.catalog.jalo.copy.ItemCopyContext
UNIQUE_PREFIX
-
-
Constructor Summary
Constructors Constructor Description GenericCatalogCopyContext(SyncItemJob job, SessionContext ctx, org.apache.log4j.Level logLevel, boolean forceUpdate)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ItemfindExistingCopyToUpdate(ItemCopyCreator parentCreator, Item original, boolean asPartOf)Deprecated.This method is called every time a newItemCopyCreatoris instantiated.protected voidfinishedCopying(ItemCopyCreator icc)Deprecated.Superclass method overridden to callsetTimestamp(ItemCopyCreator)for each copied item.protected voidgetContainedCatalogItems(AttributeDescriptor attributeDescriptor, ComposedType composedType, java.util.Set addTo)Deprecated.Overwrite to treat more value types as pseudo-partOf.protected java.util.SetgetContainedCatalogItemTypes(AttributeDescriptor attributeDescriptor)Deprecated.protected ItemgetCopy(java.lang.Object source)Deprecated.Retrieves Items, PKs and Strings from cache and translated them into items again.protected java.util.MapgetCopyCreatorPresetValues(Item original, Item copyToupdate)Deprecated.protected ItemgetCounterpartItem(Item original)Deprecated.protected SyncItemJobgetJob()Deprecated.CatalogVersiongetSourceVersion()Deprecated.protected java.util.Set<Language>getTargetLanguages()Deprecated.CatalogVersiongetTargetVersion()Deprecated.booleanisFromSourceVersion(Item item)Deprecated.Determines whether or not an item belongs to this contexts source version.protected booleanisPartOf(AttributeDescriptor attributeDescriptor)Deprecated.Used byItemCopyContext.splitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute holds partOf values.protected booleanisUntranslatable(AttributeCopyCreator acc, Item original)Deprecated.Superclass method overridden to avoid copying catalog items which do not originate from the source version.protected booleanisUpToDate(ItemCopyCreator parentCC, Item original, Item copy)Deprecated.Tells whether a item pair is up to date and must not be updated right now.protected booleanmustBeTranslated(AttributeCopyCreator acc, Item original)Deprecated.Makes sure each catalog items must always be translated.voidsetCategoryOptions(boolean copyProducts, boolean copySubcategories)Deprecated.Sets special options for copying categories: copyProducts - all products of a explicitly copied category are copied as well copySubcategories - all sub categories of a explicitly copied category are copied as wellprotected voidsetTargetLanguages(java.util.Collection<Language> languages)Deprecated.protected voidsetTimestamp(ItemCopyCreator icc)Deprecated.Registers the source item's modification time stamp inside aItemSyncTimestampinstance to allow checking for modifications later.protected java.lang.Objecttranslate(AttributeCopyCreator acc)Deprecated.Filters localized attribute values by available catalog languages.-
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, getCopyCreatorWhitelist, getCreationAttributes, getCtx, getMediaTypeCode, getTypeCopyDescriptor, hasCopy, ignoreAttribute, info, isAlreadyCopied, isAtomic, isAtomic, isCurrentlyCopying, isCurrentlyCopying, isDebugEnabled, isErrorEnabled, isInfoEnabled, isRequiredForCreation, isSavePrevousValues, isWarnEnabled, log, popCurrentlyCopying, processPendingReferences, pushCurrentlyCopying, registerCopy, registerPendingReference, safeToString, setSavePrevousValues, splitDescriptors, started, toItem, toItem, toString, transformCacheKey, transformCacheKeys, translateAD, translateValue, translateValue, valuesToString, warn
-
-
-
-
Constructor Detail
-
GenericCatalogCopyContext
public GenericCatalogCopyContext(SyncItemJob job, SessionContext ctx, org.apache.log4j.Level logLevel, boolean forceUpdate)
Deprecated.- Parameters:
ctx-
-
-
Method Detail
-
setTargetLanguages
protected void setTargetLanguages(java.util.Collection<Language> languages)
Deprecated.
-
getTargetLanguages
protected java.util.Set<Language> getTargetLanguages()
Deprecated.
-
setCategoryOptions
public void setCategoryOptions(boolean copyProducts, boolean copySubcategories)Deprecated.Sets special options for copying categories:- copyProducts - all products of a explicitly copied category are copied as well
- copySubcategories - all sub categories of a explicitly copied category are copied as well
-
getSourceVersion
public final CatalogVersion getSourceVersion()
Deprecated.
-
getTargetVersion
public final CatalogVersion getTargetVersion()
Deprecated.
-
getJob
protected SyncItemJob getJob()
Deprecated.- Returns:
- the job
-
isUpToDate
protected boolean isUpToDate(ItemCopyCreator parentCC, Item original, Item copy)
Deprecated.Description copied from class:ItemCopyContextTells whether a item pair is up to date and must not be updated right now.- Overrides:
isUpToDatein classItemCopyContext- Returns:
- true if item is up to date
-
isFromSourceVersion
public boolean isFromSourceVersion(Item item) throws JaloInvalidParameterException
Deprecated.Determines whether or not an item belongs to this contexts source version.- Parameters:
item- the item to check- Throws:
JaloInvalidParameterException- if the item is no catalog item
-
translate
protected java.lang.Object translate(AttributeCopyCreator acc)
Deprecated.Filters localized attribute values by available catalog languages. Besides it adds {language->null} entries for each missing language within the map.- Overrides:
translatein classItemCopyContext
-
finishedCopying
protected void finishedCopying(ItemCopyCreator icc)
Deprecated.Superclass method overridden to callsetTimestamp(ItemCopyCreator)for each copied item.- Overrides:
finishedCopyingin classItemCopyContext
-
setTimestamp
protected void setTimestamp(ItemCopyCreator icc)
Deprecated.Registers the source item's modification time stamp inside aItemSyncTimestampinstance to allow checking for modifications later.- Parameters:
icc- the finished copy created
-
findExistingCopyToUpdate
protected Item findExistingCopyToUpdate(ItemCopyCreator parentCreator, Item original, boolean asPartOf)
Deprecated.Description copied from class:ItemCopyContextThis method is called every time a newItemCopyCreatoris instantiated. It allows to find automatically an existing copy of a given original item. If such one exists the copy process will update it instead of creating a new one.- Overrides:
findExistingCopyToUpdatein classItemCopyContext- Returns:
- the copyitem
- See Also:
ItemCopyContext.findExistingCopyToUpdate(ItemCopyCreator, de.hybris.platform.jalo.Item, boolean)
-
mustBeTranslated
protected boolean mustBeTranslated(AttributeCopyCreator acc, Item original)
Deprecated.Makes sure each catalog items must always be translated. This way all references to catalog items which do not exist in the target catalog are delayed until they become copied or the copy process ends.- Overrides:
mustBeTranslatedin classItemCopyContext- Returns:
- a boolean
- See Also:
ItemCopyContext.mustBeTranslated(de.hybris.platform.catalog.jalo.copy.AttributeCopyCreator, de.hybris.platform.jalo.Item)
-
getCopyCreatorPresetValues
protected java.util.Map getCopyCreatorPresetValues(Item original, Item copyToupdate)
Deprecated.- Overrides:
getCopyCreatorPresetValuesin classItemCopyContext- See Also:
ItemCopyContext.getCopyCreatorPresetValues(Item, Item)
-
isUntranslatable
protected boolean isUntranslatable(AttributeCopyCreator acc, Item original)
Deprecated.Superclass method overridden to avoid copying catalog items which do not originate from the source version.- Overrides:
isUntranslatablein classItemCopyContext
-
isPartOf
protected boolean isPartOf(AttributeDescriptor attributeDescriptor)
Deprecated.Description copied from class:ItemCopyContextUsed byItemCopyContext.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.- Overrides:
isPartOfin classItemCopyContext
-
getContainedCatalogItemTypes
protected final java.util.Set getContainedCatalogItemTypes(AttributeDescriptor attributeDescriptor)
Deprecated.
-
getContainedCatalogItems
protected void getContainedCatalogItems(AttributeDescriptor attributeDescriptor, ComposedType composedType, java.util.Set addTo)
Deprecated.Overwrite to treat more value types as pseudo-partOf. Right now only Medias and Keywords are considered as being partOf.
-
getCopy
protected Item getCopy(java.lang.Object source)
Deprecated.Description copied from class:ItemCopyContextRetrieves Items, PKs and Strings from cache and translated them into items again.- Overrides:
getCopyin classItemCopyContext- Parameters:
source- the sourceItem, itemPKor PKString
-
-