Class GenericCatalogCopyContext
- java.lang.Object
-
- de.hybris.platform.catalog.jalo.synchronization.AbstractItemCopyContext
-
- de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext
-
- Direct Known Subclasses:
CatalogVersionSyncCopyContext
,GenericCatalogCopyContextTest.TestGenericCatalogCopyContext
public abstract class GenericCatalogCopyContext extends AbstractItemCopyContext
- Since:
- 3.1-u6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GenericCatalogCopyContext.AbstractParentResolver
class
GenericCatalogCopyContext.ReferenceParentResolver
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LEGACY_MODE_FLAG
static java.lang.String
PARTIAL_COLLECTION_TRANSLATION_ALLOWED
-
Fields inherited from class de.hybris.platform.catalog.jalo.synchronization.AbstractItemCopyContext
ctx
-
-
Constructor Summary
Constructors Constructor Description GenericCatalogCopyContext(SessionContext ctx, CatalogVersionSyncJob job, CatalogVersionSyncCronJob cronJob, org.apache.log4j.Level logLevel, boolean forceUpdate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addCreationAttribute(AttributeDescriptor attributeDescriptor)
protected void
afterCopying(Item copy, CatalogItemCopyCreator icc)
protected void
afterCreate(ItemCopyCreator icc, Item ret)
Called duringItemCopyCreator.copy(GenericCatalogCopyContext)
right after a new item has been created but before it's partOf items or references have been processed!protected void
beforeCopying(CatalogItemCopyCreator icc)
protected boolean
canBeTranslatedPartially(AttributeCopyCreator attributeCopyCreator)
void
cleanup()
protected java.util.Set<Item>
collectPartOfItemsToCopy(AttributeCopyCreator acc)
protected YLongToObjectMap<java.util.Set<de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ParentResolver>>
computeDependentItemResolvers()
protected boolean
computeIsCopyOnDemand(AttributeDescriptor attributeDescriptor)
protected java.util.Collection<de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ParentResolver>
computeParentResolvers(ComposedType parentType, java.util.Set<ComposedType> ctControlSet, java.util.Set<AttributeDescriptor> adControlSet)
protected Item
copy(ItemCopyCreator parent, Item original)
protected Item
copy(ItemCopyCreator parent, Item original, Item copyToUpdate, ItemSyncTimestamp itemSyncTimestamp)
Item
copy(Item original)
Item
copy(Item original, Item existingCopy, ItemSyncTimestamp itemSyncTimestamp)
protected void
copyMediaData(Media src, Media tgt)
protected java.util.Map<Item,Item>
copyPartOfValues(AttributeCopyCreator acc)
Tries to copy all items fromAttributeCopyCreator.getPartOfItemsToCopy()
.protected AttributeCopyCreator
createAttributeCopyCreator(ItemCopyCreator icc, AttributeCopyDescriptor acd, boolean ispreset, java.lang.Object sourceValue)
protected CatalogItemCopyCreator
createCreator(ItemCopyCreator parent, Item source, Item target, ItemSyncTimestamp itemSyncTimestamp, java.util.Collection<java.lang.String> blacklist, java.util.Collection<java.lang.String> whiteList, java.util.Map<java.lang.String,java.lang.Object> presetValues)
protected ItemSyncTimestamp
createSyncTimestamp(CatalogVersionSyncCronJob owningCronJob, int currentTurn, Item source, ItemCopyCreator icc)
Creates a new ItemSyncTimestamp based on the current context and parameters.protected void
finishedCopying(ItemCopyCreator icc)
Superclass method overridden to callsetTimestamp(CatalogVersionSyncCronJob, int, CatalogItemCopyCreator)
for each copied item.boolean
forceCopy(AttributeDescriptor attributeDescriptor)
protected YLongToObjectMap<java.util.Set<java.lang.String>>
getCatalogKeyAttributesCache()
protected CatalogVersion
getCatalogVersion(Item item)
Returns theCatalogVersion
for the given Item.protected java.lang.String
getCatalogVersionAttribute(ComposedType composedType)
protected YLongToObjectMap<java.lang.String>
getCatalogVersionAttributeCache()
protected java.util.Set<ComposedType>
getContainedCatalogItemTypes(AttributeDescriptor attributeDescriptor)
protected java.util.Map<PK,de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry>
getCopiedItemCache(boolean create)
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry
getCopy(Item source)
long
getCopyCacheHits()
long
getCopyCacheMisses()
int
getCopyCacheSize()
protected java.util.Set
getCopyCreatorBlacklist(Item original, Item toUpdate)
protected java.util.Map
getCopyCreatorPresetValues(Item original, Item copyToupdate)
protected java.util.Set
getCopyCreatorWhitelist(Item original, Item toUpdate)
protected YLongToByteMap
getCopyOnDemandCache()
protected Item
getCounterpartItem(Item original)
protected java.util.Set<AttributeDescriptor>
getCreationAttributes()
Makes sure the following attribute are set during item creation although they are item references (normally item references are translated and set after creating the copy):GeneratedCatalogConstants.Attributes.Product.CATALOGVERSION
CatalogConstants.Attributes.Category.CATALOGVERSION
GeneratedCatalogConstants.Attributes.Media.CATALOGVERSION
GeneratedKeyword.CATALOGVERSION
GeneratedCatalogConstants.Attributes.Product.VARIANTTYPE
GeneratedVariantProduct.BASEPRODUCT
GeneratedProduct.UNIT
protected CatalogVersionSyncCronJob
getCronjob()
protected CatalogItemCopyCreator
getCurrentlyCopying(Item original)
protected abstract int
getCurrentTurn()
protected YLongToObjectMap<java.util.Set<de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ParentResolver>>
getDependentItemResolverCache()
java.util.Set<ComposedType>
getDependentItemTypes()
protected YLongToByteMap
getIsCatalogTypeCache()
protected CatalogVersionSyncJob
getJob()
protected java.util.Set<java.lang.String>
getNonCatalogItemUniqueAttributes(ComposedType composedType)
protected YLongToObjectMap<java.util.Set<java.lang.String>>
getNonCatalogKeyAttributesCache()
protected java.lang.String
getRootCatalogType(ComposedType composedType)
protected YLongToObjectMap<java.lang.String>
getRootCatalogTypeCache()
protected java.lang.String
getRootUniqueItemType(ComposedType composedType, java.util.Set<java.lang.String> uniqueAttributes)
CatalogVersion
getSourceVersion()
protected java.util.Set<Language>
getTargetLanguages()
CatalogVersion
getTargetVersion()
protected CatalogVersion
getTargetVersionForQueryCatalogItemCopy(Item sourceItem)
protected java.util.Set<java.lang.String>
getUniqueKeyAttributes(ComposedType composedType)
protected SynchronizationPersistenceAdapter
initPersistenceAdapter()
protected boolean
isCatalogItem(Item item)
protected boolean
isCatalogItemType(ComposedType composedType)
protected boolean
isCopyOnDemand(AttributeDescriptor attributeDescriptor)
protected boolean
isCopyOnDemandCatalogItemType(ComposedType catalogItemType, java.lang.Class jaloClass)
protected boolean
isCurrentlyCopying(Item original)
boolean
isDependentFromSourceVersion(Item dependentItem)
boolean
isExclusiveMode()
If true the syncjob is added to theItemSyncTimestamp
protected boolean
isForceUpdate()
boolean
isFromSourceVersion(Item item)
Determines whether or not an item belongs to this contexts source version.protected boolean
isPartialCollectionTranslationEnabledGlobally()
protected boolean
isRequiredForCreation(AttributeDescriptor attributeDescriptor)
Determines whether or not a attribute is required for the creation of a item copy.boolean
isSavePrevousValues()
boolean
isStarted()
protected boolean
isUntranslatablePartOfItem(AttributeCopyCreator acc, Item original)
Superclass method overridden to avoid copying catalog items which do not originate from the source version.protected boolean
isUntranslatableProductFeature(ProductFeature productFeature)
protected void
logSavedValues(ItemCopyCreator icc)
protected boolean
mayBeCatalogItemDependent(Item item)
protected boolean
mayBeCatalogItemDependent(ComposedType composedType)
protected boolean
mustBeTranslated(AttributeCopyCreator acc, Item original)
Makes sure each catalog items must always be translated.protected boolean
mustBeTranslated(java.lang.String attributeQualifier, Item original)
protected void
popCurrentlyCopying(CatalogItemCopyCreator icc)
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry
processQueryResult(Item sourceItem, java.util.List<Item> rows, java.util.List<java.lang.Object> keys)
protected void
pushCurrentlyCopying(CatalogItemCopyCreator icc)
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry
queryCatalogItemCopy(Item sourceItem)
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry
queryCopy(Item source)
protected ItemSyncTimestamp
queryExistingSyncTimestamp(Item src, PK tgtPK)
Returns the ItemSyncTimestamp which has the given Item as source and the given PK as targetPK.protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry
queryNonCatalogItemCopy(Item source)
protected void
registerCopy(de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry copyInfo)
void
setCategoryOptions(boolean copyProducts, boolean copySubcategories)
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 wellvoid
setCopyCacheHits(long copyCacheHits)
void
setCopyCacheMisses(long copyCacheMisses)
void
setCopyCacheSize(int copyCacheSize)
protected void
setSavePrevousValues(boolean setSaveToOn)
protected void
setTargetLanguages(java.util.Collection<Language> languages)
protected ItemSyncTimestamp
setTimestamp(CatalogVersionSyncCronJob owningCronJob, int currentTurn, CatalogItemCopyCreator icc)
Registers the source item's modification time stamp inside aItemSyncTimestamp
instance to allow checking for modifications later.protected java.lang.Object
translate(AttributeCopyCreator acc)
Filters localized attribute values by available catalog languages.protected java.lang.String
translateAD(AttributeDescriptor attributeDescriptor)
protected Item
translateItemValue(AttributeCopyCreator acc, Item original, java.util.Map<Item,Item> partOfItemsToBeCopied)
protected java.lang.Object
translateValue(AttributeCopyCreator acc, java.lang.Object original, java.util.Map<Item,Item> partOfItemsToBeCopied, boolean localized)
protected void
updateSyncTimestamp(ItemSyncTimestamp itemSyncTimestamp, CatalogVersionSyncCronJob owningCronJob, int currentTurn, Item source, ItemCopyCreator icc)
Updates the given ItemSyncTimestamp based on the given parameters.-
Methods inherited from class de.hybris.platform.catalog.jalo.synchronization.AbstractItemCopyContext
allItems, createCopyDescriptor, createSession, debug, debug, error, error, getCatalogManager, getCtx, getFlexibleSearch, getSession, getTypeCopyDescriptor, ignoreAttribute, info, info, isAtomic, isAtomic, isDebugEnabled, isErrorEnabled, isInfoEnabled, isPartOf, isWarnEnabled, log, log, safeToString, splitDescriptors, toItem, toItems, toString, valuesToString, warn, warn
-
-
-
-
Field Detail
-
LEGACY_MODE_FLAG
public static final java.lang.String LEGACY_MODE_FLAG
- See Also:
- Constant Field Values
-
PARTIAL_COLLECTION_TRANSLATION_ALLOWED
public static final java.lang.String PARTIAL_COLLECTION_TRANSLATION_ALLOWED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GenericCatalogCopyContext
public GenericCatalogCopyContext(SessionContext ctx, CatalogVersionSyncJob job, CatalogVersionSyncCronJob cronJob, org.apache.log4j.Level logLevel, boolean forceUpdate)
- Parameters:
ctx
-
-
-
Method Detail
-
initPersistenceAdapter
protected SynchronizationPersistenceAdapter initPersistenceAdapter()
-
setTargetLanguages
protected void setTargetLanguages(java.util.Collection<Language> languages)
-
getIsCatalogTypeCache
protected YLongToByteMap getIsCatalogTypeCache()
-
getDependentItemTypes
public java.util.Set<ComposedType> getDependentItemTypes()
-
getDependentItemResolverCache
protected YLongToObjectMap<java.util.Set<de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ParentResolver>> getDependentItemResolverCache()
-
mayBeCatalogItemDependent
protected boolean mayBeCatalogItemDependent(Item item)
-
mayBeCatalogItemDependent
protected boolean mayBeCatalogItemDependent(ComposedType composedType)
-
isCatalogItem
protected boolean isCatalogItem(Item item)
-
isCatalogItemType
protected boolean isCatalogItemType(ComposedType composedType)
-
setCategoryOptions
public void setCategoryOptions(boolean copyProducts, boolean copySubcategories)
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()
- Returns:
- the source for the copy action
-
getTargetVersion
public final CatalogVersion getTargetVersion()
- Returns:
- the target for the copy action
-
getJob
protected CatalogVersionSyncJob getJob()
- Returns:
- the job
-
isExclusiveMode
public boolean isExclusiveMode()
If true the syncjob is added to theItemSyncTimestamp
- Returns:
- the exclusiveMode
-
getCronjob
protected CatalogVersionSyncCronJob getCronjob()
- Returns:
- the cronjob
-
getCurrentTurn
protected abstract int getCurrentTurn()
-
isFromSourceVersion
public boolean isFromSourceVersion(Item item) throws JaloInvalidParameterException
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
-
getCatalogVersion
protected CatalogVersion getCatalogVersion(Item item) throws JaloInvalidParameterException
Returns theCatalogVersion
for the given Item.- Returns:
- null if item is not a catalog aware item or no catalogversion is set.
- Throws:
JaloInvalidParameterException
-
translate
protected java.lang.Object translate(AttributeCopyCreator acc)
Filters localized attribute values by available catalog languages. Besides it adds {language->null} entries for each missing language within the map.
-
finishedCopying
protected void finishedCopying(ItemCopyCreator icc)
Superclass method overridden to callsetTimestamp(CatalogVersionSyncCronJob, int, CatalogItemCopyCreator)
for each copied item.
-
createCreator
protected CatalogItemCopyCreator createCreator(ItemCopyCreator parent, Item source, Item target, ItemSyncTimestamp itemSyncTimestamp, java.util.Collection<java.lang.String> blacklist, java.util.Collection<java.lang.String> whiteList, java.util.Map<java.lang.String,java.lang.Object> presetValues)
-
setTimestamp
protected ItemSyncTimestamp setTimestamp(CatalogVersionSyncCronJob owningCronJob, int currentTurn, CatalogItemCopyCreator icc)
Registers the source item's modification time stamp inside aItemSyncTimestamp
instance to allow checking for modifications later.- Parameters:
icc
- the finished copy created
-
updateSyncTimestamp
protected void updateSyncTimestamp(ItemSyncTimestamp itemSyncTimestamp, CatalogVersionSyncCronJob owningCronJob, int currentTurn, Item source, ItemCopyCreator icc)
Updates the given ItemSyncTimestamp based on the given parameters.
-
createSyncTimestamp
protected ItemSyncTimestamp createSyncTimestamp(CatalogVersionSyncCronJob owningCronJob, int currentTurn, Item source, ItemCopyCreator icc)
Creates a new ItemSyncTimestamp based on the current context and parameters.
-
queryExistingSyncTimestamp
protected ItemSyncTimestamp queryExistingSyncTimestamp(Item src, PK tgtPK)
Returns the ItemSyncTimestamp which has the given Item as source and the given PK as targetPK. An error is reported if more than one timestamp was found.- Returns:
- null if nothing was found.
-
mustBeTranslated
protected boolean mustBeTranslated(AttributeCopyCreator acc, Item original)
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.
-
mustBeTranslated
protected boolean mustBeTranslated(java.lang.String attributeQualifier, Item original)
-
computeDependentItemResolvers
protected YLongToObjectMap<java.util.Set<de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ParentResolver>> computeDependentItemResolvers()
-
computeParentResolvers
protected java.util.Collection<de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ParentResolver> computeParentResolvers(ComposedType parentType, java.util.Set<ComposedType> ctControlSet, java.util.Set<AttributeDescriptor> adControlSet)
-
isDependentFromSourceVersion
public boolean isDependentFromSourceVersion(Item dependentItem)
-
getCopyCreatorPresetValues
protected java.util.Map getCopyCreatorPresetValues(Item original, Item copyToupdate)
-
getRootCatalogTypeCache
protected YLongToObjectMap<java.lang.String> getRootCatalogTypeCache()
-
getCatalogVersionAttributeCache
protected YLongToObjectMap<java.lang.String> getCatalogVersionAttributeCache()
-
getCatalogKeyAttributesCache
protected YLongToObjectMap<java.util.Set<java.lang.String>> getCatalogKeyAttributesCache()
-
getNonCatalogKeyAttributesCache
protected YLongToObjectMap<java.util.Set<java.lang.String>> getNonCatalogKeyAttributesCache()
-
getCopyOnDemandCache
protected YLongToByteMap getCopyOnDemandCache()
-
getCatalogVersionAttribute
protected java.lang.String getCatalogVersionAttribute(ComposedType composedType)
-
getRootCatalogType
protected java.lang.String getRootCatalogType(ComposedType composedType)
-
getRootUniqueItemType
protected java.lang.String getRootUniqueItemType(ComposedType composedType, java.util.Set<java.lang.String> uniqueAttributes)
-
getUniqueKeyAttributes
protected java.util.Set<java.lang.String> getUniqueKeyAttributes(ComposedType composedType)
-
getNonCatalogItemUniqueAttributes
protected java.util.Set<java.lang.String> getNonCatalogItemUniqueAttributes(ComposedType composedType)
-
isUntranslatablePartOfItem
protected boolean isUntranslatablePartOfItem(AttributeCopyCreator acc, Item original)
Superclass method overridden to avoid copying catalog items which do not originate from the source version.
-
isUntranslatableProductFeature
protected boolean isUntranslatableProductFeature(ProductFeature productFeature)
-
isCopyOnDemand
protected final boolean isCopyOnDemand(AttributeDescriptor attributeDescriptor)
- Overrides:
isCopyOnDemand
in classAbstractItemCopyContext
-
computeIsCopyOnDemand
protected boolean computeIsCopyOnDemand(AttributeDescriptor attributeDescriptor)
-
isCopyOnDemandCatalogItemType
protected boolean isCopyOnDemandCatalogItemType(ComposedType catalogItemType, java.lang.Class jaloClass)
-
getContainedCatalogItemTypes
protected final java.util.Set<ComposedType> getContainedCatalogItemTypes(AttributeDescriptor attributeDescriptor)
-
getCopiedItemCache
protected final java.util.Map<PK,de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry> getCopiedItemCache(boolean create)
-
getCopy
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry getCopy(Item source)
-
queryCopy
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry queryCopy(Item source)
-
queryCatalogItemCopy
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry queryCatalogItemCopy(Item sourceItem)
-
queryNonCatalogItemCopy
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry queryNonCatalogItemCopy(Item source)
-
processQueryResult
protected de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry processQueryResult(Item sourceItem, java.util.List<Item> rows, java.util.List<java.lang.Object> keys)
-
setSavePrevousValues
protected void setSavePrevousValues(boolean setSaveToOn)
-
isSavePrevousValues
public boolean isSavePrevousValues()
-
getCreationAttributes
protected java.util.Set<AttributeDescriptor> getCreationAttributes()
Makes sure the following attribute are set during item creation although they are item references (normally item references are translated and set after creating the copy):GeneratedCatalogConstants.Attributes.Product.CATALOGVERSION
CatalogConstants.Attributes.Category.CATALOGVERSION
GeneratedCatalogConstants.Attributes.Media.CATALOGVERSION
GeneratedKeyword.CATALOGVERSION
GeneratedCatalogConstants.Attributes.Product.VARIANTTYPE
GeneratedVariantProduct.BASEPRODUCT
GeneratedProduct.UNIT
-
translateAD
protected final java.lang.String translateAD(AttributeDescriptor attributeDescriptor)
-
addCreationAttribute
protected final void addCreationAttribute(AttributeDescriptor attributeDescriptor)
-
isStarted
public final boolean isStarted()
- Returns:
- true if at least one item was copied or is currently being copied.
-
createAttributeCopyCreator
protected AttributeCopyCreator createAttributeCopyCreator(ItemCopyCreator icc, AttributeCopyDescriptor acd, boolean ispreset, java.lang.Object sourceValue)
-
collectPartOfItemsToCopy
protected java.util.Set<Item> collectPartOfItemsToCopy(AttributeCopyCreator acc)
-
copyPartOfValues
protected java.util.Map<Item,Item> copyPartOfValues(AttributeCopyCreator acc)
Tries to copy all items fromAttributeCopyCreator.getPartOfItemsToCopy()
. The returned map contains each partOf item and (if successfully copied) the associated copy. Please note that some attribute value items may been untranslatable - they don't turn up in the result map!- Parameters:
acc
- the attribute copy creator
-
translateValue
protected final java.lang.Object translateValue(AttributeCopyCreator acc, java.lang.Object original, java.util.Map<Item,Item> partOfItemsToBeCopied, boolean localized)
-
translateItemValue
protected Item translateItemValue(AttributeCopyCreator acc, Item original, java.util.Map<Item,Item> partOfItemsToBeCopied)
-
getCurrentlyCopying
protected final CatalogItemCopyCreator getCurrentlyCopying(Item original)
-
isCurrentlyCopying
protected final boolean isCurrentlyCopying(Item original)
-
pushCurrentlyCopying
protected final void pushCurrentlyCopying(CatalogItemCopyCreator icc)
-
popCurrentlyCopying
protected final void popCurrentlyCopying(CatalogItemCopyCreator icc)
-
registerCopy
protected final void registerCopy(de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext.ItemCopyCacheEntry copyInfo)
-
beforeCopying
protected void beforeCopying(CatalogItemCopyCreator icc)
-
afterCopying
protected void afterCopying(Item copy, CatalogItemCopyCreator icc)
-
logSavedValues
protected void logSavedValues(ItemCopyCreator icc)
-
copy
public Item copy(Item original, Item existingCopy, ItemSyncTimestamp itemSyncTimestamp)
-
copy
protected Item copy(ItemCopyCreator parent, Item original)
-
copy
protected Item copy(ItemCopyCreator parent, Item original, Item copyToUpdate, ItemSyncTimestamp itemSyncTimestamp)
-
getCopyCreatorBlacklist
protected java.util.Set getCopyCreatorBlacklist(Item original, Item toUpdate)
-
getCopyCreatorWhitelist
protected java.util.Set getCopyCreatorWhitelist(Item original, Item toUpdate)
-
forceCopy
public boolean forceCopy(AttributeDescriptor attributeDescriptor)
-
isRequiredForCreation
protected boolean isRequiredForCreation(AttributeDescriptor attributeDescriptor)
Description copied from class:AbstractItemCopyContext
Determines whether or not a attribute is required for the creation of a item copy. These attributes cannot be delayed, which requires that all values must be translatable or preset.If no item is actually created but an existing copy is updated these attributes are set alltogether before all partOf references and other attributes. Delaying is neither allowed here.
- Overrides:
isRequiredForCreation
in classAbstractItemCopyContext
- Parameters:
attributeDescriptor
- the attribute descriptor to determine creation status for- Returns:
- true if the attribute is required for item creation
-
cleanup
public void cleanup()
- Overrides:
cleanup
in classAbstractItemCopyContext
-
isForceUpdate
protected boolean isForceUpdate()
-
getCopyCacheSize
public int getCopyCacheSize()
- Returns:
- the copyCacheSize
-
setCopyCacheSize
public void setCopyCacheSize(int copyCacheSize)
- Parameters:
copyCacheSize
- the copyCacheSize to set
-
getTargetLanguages
protected java.util.Set<Language> getTargetLanguages()
- Returns:
- the targetLanguages
-
afterCreate
protected void afterCreate(ItemCopyCreator icc, Item ret)
Called duringItemCopyCreator.copy(GenericCatalogCopyContext)
right after a new item has been created but before it's partOf items or references have been processed!- Parameters:
icc
-ret
-
-
getCopyCacheHits
public long getCopyCacheHits()
- Returns:
- the copyCacheHits
-
setCopyCacheHits
public void setCopyCacheHits(long copyCacheHits)
- Parameters:
copyCacheHits
- the copyCacheHits to set
-
getCopyCacheMisses
public long getCopyCacheMisses()
- Returns:
- the copyCacheMisses
-
setCopyCacheMisses
public void setCopyCacheMisses(long copyCacheMisses)
- Parameters:
copyCacheMisses
- the copyCacheMisses to set
-
getTargetVersionForQueryCatalogItemCopy
protected CatalogVersion getTargetVersionForQueryCatalogItemCopy(Item sourceItem)
-
canBeTranslatedPartially
protected boolean canBeTranslatedPartially(AttributeCopyCreator attributeCopyCreator)
-
isPartialCollectionTranslationEnabledGlobally
protected boolean isPartialCollectionTranslationEnabledGlobally()
-
-