Class ItemCopyCreator

  • Direct Known Subclasses:
    CatalogItemCopyCreator

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

      • ItemCopyCreator

        protected ItemCopyCreator​(GenericCatalogCopyContext genericCatalogCopyContext,
                                  ItemCopyCreator parent,
                                  Item source,
                                  Item target,
                                  java.util.Collection<java.lang.String> blackList,
                                  java.util.Collection<java.lang.String> whiteList,
                                  java.util.Map<java.lang.String,​java.lang.Object> presetedValues)
                           throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • copy

        protected <T> T copy()
      • notifyCallback

        protected void notifyCallback()
      • copy

        @Deprecated
        protected Item copy​(GenericCatalogCopyContext genericCatalogCopyContext)
        Deprecated.
        since 5.0.1 use copy() instead.
        Parameters:
        genericCatalogCopyContext -
        Returns:
        copied Item.
      • getStoredValues

        public java.util.Map<java.lang.String,​java.lang.Object> getStoredValues()
      • getModifiedValues

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

        public void resetStoredValues()
      • addToStoredValues

        protected void addToStoredValues​(java.util.Map<java.lang.String,​java.lang.Object> attributes)
      • setPartOfReferences

        protected void setPartOfReferences()
      • setOtherReferences

        protected void setOtherReferences()
      • setReferenceAttributesWaitingOnDelay

        protected void setReferenceAttributesWaitingOnDelay​(java.util.Set<AttributeCopyCreator> attributeCopyCreators)
      • encounteredOptimisticLockException

        public boolean encounteredOptimisticLockException()
      • getOptimisticLockException

        public java.lang.Exception getOptimisticLockException()
      • isTransactionRolledBack

        public boolean isTransactionRolledBack()
      • getSourceItem

        public final Item getSourceItem()
      • getTargetItem

        public final Item getTargetItem()
      • isUpdate

        public final boolean isUpdate()
      • isPartOf

        public final boolean isPartOf()
      • 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​(java.lang.Object translatedValue,
                                  boolean localized)
      • hasPartOfItems

        protected final boolean hasPartOfItems()
      • hasPendingAttributes

        public final boolean hasPendingAttributes()
      • getPartOfAttributeCreators

        protected final java.util.Set<AttributeCopyCreator> getPartOfAttributeCreators()
      • getInitialAttributeCreators

        protected final java.util.Set<AttributeCopyCreator> getInitialAttributeCreators()
      • getOtherAttributeCreators

        protected final java.util.Set<AttributeCopyCreator> getOtherAttributeCreators()
      • getPendingAttributeQualifiers

        public final java.util.Set<java.lang.String> getPendingAttributeQualifiers()
      • toString

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

        public java.lang.String getReport()
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object