Class ItemCopyContext
java.lang.Object
de.hybris.platform.catalog.jalo.copy.ItemCopyContext
- Direct Known Subclasses:
GenericCatalogCopyContext
Deprecated.
since ages
ItemCopyContext
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionItemCopyContext(SessionContext ctx, org.apache.log4j.Level logLevel, boolean forceUpdate) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddCopiedItem(PK source, PK copy) Deprecated.Adds a source - to - target item mapping without processing pending references.protected final voidaddCreationAttribute(AttributeDescriptor attributeDescriptor) Deprecated.protected final CollectionallItems(AttributeCopyCreator acc, Object value) Deprecated.protected final CollectionallItems(AttributeCopyCreator acc, Object value, Collection valuesSoFar, boolean localized) Deprecated.protected voidDeprecated.protected final voidcheckPendingReferences(PK key) Deprecated.voidcleanup()Deprecated.Deprecated.protected Itemcopy(ItemCopyCreator parent, Item original) Deprecated.protected Itemcopy(ItemCopyCreator parent, Item original, Item copyToUpdate) Deprecated.Deprecated.Deprecated.protected voidcopyMediaData(Media src, Media tgt) Deprecated.Deprecated.protected AttributeCopyCreatorcreateAttributeCopyCreator(ItemCopyCreator icc, AttributeCopyDescriptor acd, boolean ispreset, Object sourceValue) Deprecated.protected TypeCopyDescriptorcreateCopyDescriptor(ComposedType composedType) Deprecated.Creates a new type copy descriptor instance.voidDeprecated.voidDeprecated.protected ItemfindExistingCopyToUpdate(ItemCopyCreator parentCreator, Item original, boolean asPartOf) Deprecated.This method is called every time a newItemCopyCreatoris instantiated.protected voidDeprecated.booleanforceCopy(AttributeDescriptor attributeDescriptor) Deprecated.protected ItemDeprecated.Retrieves Items, PKs and Strings from cache and translated them into items again.protected SetgetCopyCreatorBlacklist(Item original, Item toUpdate) Deprecated.protected MapgetCopyCreatorPresetValues(Item original, Item copyToUpdate) Deprecated.protected SetgetCopyCreatorWhitelist(Item original, Item toUpdate) Deprecated.protected Set<AttributeDescriptor>Deprecated.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.CATALOGVERSIONCatalogConstants.Attributes.Category.CATALOGVERSIONGeneratedCatalogConstants.Attributes.Media.CATALOGVERSIONGeneratedKeyword.CATALOGVERSIONGeneratedCatalogConstants.Attributes.Product.VARIANTTYPEGeneratedVariantProduct.BASEPRODUCTGeneratedProduct.UNITOverride or calladdCreationAttribute(AttributeDescriptor)to add own creation attributes.final SessionContextgetCtx()Deprecated.protected final intDeprecated.final TypeCopyDescriptorDeprecated.Returns a (cached) type copy descriptor for a given composed type.protected final booleanDeprecated.protected booleanignoreAttribute(AttributeDescriptor attributeDescriptor, String qualifier) Deprecated.Used bysplitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute may be ignored or not.voidDeprecated.final booleanisAlreadyCopied(Item src) Deprecated.protected booleanisAtomic(AttributeDescriptor attributeDescriptor) Deprecated.Used bysplitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute holds just atomic values.protected final booleanDeprecated.Traverses collection and map types to find any non-atomic type within.protected final booleanisCurrentlyCopying(PK original) Deprecated.protected final booleanisCurrentlyCopying(Item original) Deprecated.since agesbooleanDeprecated.booleanDeprecated.booleanDeprecated.protected booleanisPartOf(AttributeDescriptor attributeDescriptor) Deprecated.Used bysplitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute holds partOf values.protected booleanisRequiredForCreation(AttributeDescriptor attributeDescriptor) Deprecated.Determines whether or not a attribute is required for the creation of a item copy.booleanDeprecated.protected booleanisUntranslatable(AttributeCopyCreator acc, Item original) Deprecated.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.booleanDeprecated.protected voidDeprecated.Default log implementation using a Log4J appender.protected booleanmustBeTranslated(AttributeCopyCreator acc, Item original) Deprecated.Tells whether a original item should be translated into its copied counterpart.protected final voidDeprecated.voidDeprecated.protected final voidDeprecated.protected final voidregisterCopy(PK source, PK copy) Deprecated.protected final voidregisterPendingReference(AttributeCopyCreator acc, Item waitingFor) Deprecated.protected StringsafeToString(Object attributeValue) Deprecated.protected voidsetSavePrevousValues(boolean setSaveOn) Deprecated.protected final Set<AttributeCopyDescriptor>[]splitDescriptors(TypeCopyDescriptor tcd, ComposedType composedType) Deprecated.Called during the creation of aTypeCopyDescriptor.final booleanstarted()Deprecated.protected final ItemtoItem(long lpk) Deprecated.protected final ItemDeprecated.protected StringtoString(AttributeDescriptor attributeDescriptor) Deprecated.protected final PKtransformCacheKey(Object object) Deprecated.transformCacheKeys(Set objects) Deprecated.protected ObjectDeprecated.protected final StringtranslateAD(AttributeDescriptor attributeDescriptor) Deprecated.protected ItemtranslateValue(AttributeCopyCreator acc, Item original, Map<Item, Item> partOfMappings) Deprecated.protected final ObjecttranslateValue(AttributeCopyCreator acc, Object original, Map<Item, Item> partOfMappings, boolean localized) Deprecated.protected StringvaluesToString(Map attributeValues) Deprecated.voidDeprecated.
-
Field Details
-
UNIQUE_PREFIX
Deprecated.- See Also:
-
-
Constructor Details
-
ItemCopyContext
Deprecated.
-
-
Method Details
-
toItem
Deprecated. -
toItem
Deprecated. -
getMediaTypeCode
protected final int getMediaTypeCode()Deprecated. -
setSavePrevousValues
protected void setSavePrevousValues(boolean setSaveOn) Deprecated. -
isSavePrevousValues
public boolean isSavePrevousValues()Deprecated. -
log
Deprecated.Default log implementation using a Log4J appender. -
debug
Deprecated. -
info
Deprecated. -
warn
Deprecated. -
error
Deprecated. -
isDebugEnabled
public boolean isDebugEnabled()Deprecated. -
isInfoEnabled
public boolean isInfoEnabled()Deprecated. -
isWarnEnabled
public boolean isWarnEnabled()Deprecated. -
isErrorEnabled
public boolean isErrorEnabled()Deprecated. -
getCtx
Deprecated. -
getCreationAttributes
Deprecated.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.CATALOGVERSIONCatalogConstants.Attributes.Category.CATALOGVERSIONGeneratedCatalogConstants.Attributes.Media.CATALOGVERSIONGeneratedKeyword.CATALOGVERSIONGeneratedCatalogConstants.Attributes.Product.VARIANTTYPEGeneratedVariantProduct.BASEPRODUCTGeneratedProduct.UNIT
addCreationAttribute(AttributeDescriptor)to add own creation attributes. -
translateAD
Deprecated. -
addCreationAttribute
Deprecated. -
started
public final boolean started()Deprecated.- Returns:
- true if at least one item was copied or is currently being copied.
-
processPendingReferences
public void processPendingReferences()Deprecated. -
transformCacheKey
Deprecated. -
transformCacheKeys
Deprecated. -
createAttributeCopyCreator
protected AttributeCopyCreator createAttributeCopyCreator(ItemCopyCreator icc, AttributeCopyDescriptor acd, boolean ispreset, Object sourceValue) Deprecated. -
translate
Deprecated. -
collectPartOfItemsToCopy
Deprecated. -
copyPartOfValues
Deprecated. -
allItems
Deprecated. -
allItems
protected final Collection allItems(AttributeCopyCreator acc, Object value, Collection valuesSoFar, boolean localized) Deprecated. -
isUntranslatable
Deprecated. -
isUpToDate
Deprecated.Tells whether a item pair is up to date and must not be updated right now.- Parameters:
original-copy-- Returns:
- true if item is up to date
-
mustBeTranslated
Deprecated.Tells whether a original item should be translated into its copied counterpart. By default this applies to all items which are currently being copied ( means all parent items of a partOf item ) and all previously copied items.- Parameters:
acc-original-- Returns:
- a boolean
-
translateValue
protected final Object translateValue(AttributeCopyCreator acc, Object original, Map<Item, Item> partOfMappings, boolean localized) Deprecated. -
translateValue
protected Item translateValue(AttributeCopyCreator acc, Item original, Map<Item, Item> partOfMappings) Deprecated. -
registerPendingReference
Deprecated. -
isCurrentlyCopying
@Deprecated(since="ages", forRemoval=false) protected final boolean isCurrentlyCopying(Item original) Deprecated.since ages -
isCurrentlyCopying
Deprecated. -
pushCurrentlyCopying
Deprecated. -
popCurrentlyCopying
Deprecated. -
getCopy
Deprecated.Retrieves Items, PKs and Strings from cache and translated them into items again. -
hasCopy
Deprecated. -
isAlreadyCopied
Deprecated. -
addCopiedItem
Deprecated.Adds a source - to - target item mapping without processing pending references. These items are considered as being copied before.Use this method to pre-fill a copy context with already copied items.
- Parameters:
source- the source item as either Item, PK or PK Stringcopy- the target item as either Item, PK or PK String
-
registerCopy
Deprecated. -
checkPendingReferences
Deprecated. -
beforeCopying
Deprecated. -
finishedCopying
Deprecated. -
copyMediaData
Deprecated. -
copy
Deprecated. -
copy
Deprecated. -
copy
Deprecated. -
copy
Deprecated. -
getCopyCreatorPresetValues
Deprecated. -
getCopyCreatorBlacklist
Deprecated. -
getCopyCreatorWhitelist
Deprecated. -
findExistingCopyToUpdate
protected Item findExistingCopyToUpdate(ItemCopyCreator parentCreator, Item original, boolean asPartOf) Deprecated.This 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.- Parameters:
parentCreator-original-asPartOf-- Returns:
- the copyitem
-
getTypeCopyDescriptor
Deprecated.Returns a (cached) type copy descriptor for a given composed type. -
createCopyDescriptor
Deprecated.Creates a new type copy descriptor instance. By default this will create aTypeCopyDescriptor. Called bygetTypeCopyDescriptor(ComposedType).- Parameters:
composedType-
-
ignoreAttribute
Deprecated.Used bysplitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute may be ignored or not. By default this will apply toItem.TYPEonly. Override to define own ignored attributes.- Parameters:
attributeDescriptor-qualifier-- Returns:
- true if the attribute should not be included in type copy informations (so it cannot be copied)
-
isPartOf
Deprecated.Used bysplitDescriptors(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. -
forceCopy
Deprecated. -
isAtomic
Deprecated.Used bysplitDescriptors(TypeCopyDescriptor, ComposedType)to determine whether an attribute holds just atomic values. This will callisAtomic(Type, boolean)for analyzing the real attribute type. -
isAtomic
Deprecated.Traverses collection and map types to find any non-atomic type within. If localized is true and the attribute type is a map type it ignores the argument type - however nested map types are fully searched subsequently.- Parameters:
attributeType- the argument type to checklocalized- whether or not the attribute is localized- Returns:
- true if the argument type is a atomic type or a collection or map type containing atomic types only
-
isRequiredForCreation
Deprecated.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.
- Parameters:
attributeDescriptor- the attribute descriptor to determine creation status for- Returns:
- true if the attribute is required for item creation
-
splitDescriptors
protected final Set<AttributeCopyDescriptor>[] splitDescriptors(TypeCopyDescriptor tcd, ComposedType composedType) Deprecated.Called during the creation of aTypeCopyDescriptor. It must split all attribute descriptors into 4 different sets:- initial writable only
- initial
- partOf attributes
- other (mostly reference) attributes
- Parameters:
tcd- the newly created type copy descriptorcomposedType- the actual composed type- Returns:
- an array of 4 sets holding
AttributeCopyDescriptors.
-
toString
Deprecated. -
valuesToString
Deprecated. -
safeToString
Deprecated. -
cleanup
public void cleanup()Deprecated.
-