Class ItemCopyCreator

java.lang.Object
de.hybris.platform.catalog.jalo.synchronization.ItemCopyCreator
Direct Known Subclasses:
CatalogItemCopyCreator

public class ItemCopyCreator extends Object
Manages the copying process of the assigned item.
Since:
3.1-u6
  • Constructor Details

  • Method Details

    • copy

      protected <T> T copy()
    • notifyCallback

      protected void notifyCallback()
    • getAfterItemCopiedCallback

      public ItemCopyCreator.AfterItemCopiedCallback getAfterItemCopiedCallback()
      Returns:
      the beforeTxCommitCallback
    • setAfterItemCopiedCallback

      public void setAfterItemCopiedCallback(ItemCopyCreator.AfterItemCopiedCallback callback)
      Parameters:
      callback - the beforeTxCommitCallback to set
    • copy

      @Deprecated(since="5.0.1", forRemoval=false) protected Item copy(GenericCatalogCopyContext genericCatalogCopyContext)
      Deprecated.
      since 5.0.1 use copy() instead.
      Parameters:
      genericCatalogCopyContext -
      Returns:
      copied Item.
    • getStoredValues

      public Map<String,Object> getStoredValues()
    • getModifiedValues

      public Map<String,Object>[] getModifiedValues()
      Returns:
      [ {previousValues}, {storedValues} ]
    • resetStoredValues

      public void resetStoredValues()
    • addToStoredValues

      protected void addToStoredValues(Map<String,Object> attributes)
    • getCopyContext

      protected GenericCatalogCopyContext getCopyContext()
    • setPartOfReferences

      protected void setPartOfReferences()
    • setOtherReferences

      protected void setOtherReferences()
    • setReferenceAttributesWaitingOnDelay

      protected void setReferenceAttributesWaitingOnDelay(Set<AttributeCopyCreator> attributeCopyCreators)
    • encounteredOptimisticLockException

      public boolean encounteredOptimisticLockException()
    • getOptimisticLockException

      public Exception getOptimisticLockException()
    • isTransactionRolledBack

      public boolean isTransactionRolledBack()
    • setReferenceAttribute

      protected ItemCopyCreator.ReferenceAttributeResult setReferenceAttribute(AttributeCopyCreator acc)
    • getSourceItem

      public final Item getSourceItem()
    • getTargetItem

      public final Item getTargetItem()
    • isUpdate

      public final boolean isUpdate()
    • isPartOf

      public final boolean isPartOf()
    • getTargetType

      public final ComposedType getTargetType()
    • getParent

      protected ItemCopyCreator getParent()
    • getEnclosingCreatorFor

      protected final ItemCopyCreator getEnclosingCreatorFor(Item item)
      Finds the parent creator which actually copies the given item value. This method is used for translating references from partOf items to their enclosing items.
      Parameters:
      item - the item reference value
      Returns:
      the parent copy creator which copies the item, or null no such creator exists
    • readNonInitialAttributes

      protected void readNonInitialAttributes()
    • readInitialAttributes

      protected void readInitialAttributes()
    • readSourceValues

      protected final void readSourceValues(Item targetItem)
      Reads all copyable attribute values of the source item which are not blocked by the blacklist or already defined by the preset value map.
    • isEmpty

      protected boolean isEmpty(Object translatedValue, boolean localized)
    • hasPartOfItems

      protected final boolean hasPartOfItems()
    • hasPendingAttributes

      public final boolean hasPendingAttributes()
    • getPartOfAttributeCreators

      protected final Set<AttributeCopyCreator> getPartOfAttributeCreators()
    • getInitialAttributeCreators

      protected final Set<AttributeCopyCreator> getInitialAttributeCreators()
    • getOtherAttributeCreators

      protected final Set<AttributeCopyCreator> getOtherAttributeCreators()
    • getPendingAttributes

      public final Set<AttributeCopyCreator> getPendingAttributes()
    • getFailedAttributes

      public final Set<AttributeCopyCreator> getFailedAttributes()
    • getPendingAttributeQualifiers

      public final Set<String> getPendingAttributeQualifiers()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getReport

      public String getReport()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object