Class ItemModelCloneCreator.CopyAttribute

  • Enclosing class:
    ItemModelCloneCreator

    public static class ItemModelCloneCreator.CopyAttribute
    extends java.lang.Object
    A wrapper for each item attribute to be stored while creating a copy. It hold the original and translated attribute value and keeps track on whether this attribute has been consumed (written) yet or not.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CopyAttribute​(ItemModelCloneCreator.CopyItem item, AttributeDescriptorModel attributeDescriptor, java.util.Set<de.hybris.platform.servicelayer.internal.model.impl.ItemModelCloneCreator.ModifiersFlag> modifiers, java.lang.Object value)
      Creates new copy attribute and initialize attributes
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ItemModelCloneCreator.CopyItem getItem()
      Returns owning item wrapper.
      java.lang.Object getOriginalValue()
      Returns the original attribute value.
      java.lang.String getQualifier()
      Returns attribute qualifier.
      java.lang.Object getTranslatedValue()
      Returns translated attribute value.
      boolean isConsumed()
      Tells whether the attribute has been consumed yet.
      boolean isLocalized()
      Returns whether or not the attribute is marked as partOf.
      boolean isPartOf()
      Returns whether or not the attribute is marked as partOf.
      boolean isRequiredForCreation()
      Tells whether or not the attribute is required for item creation.
      boolean isTranslated()
      Tells whether or not the attribute has been translated yet.
      protected void setConsumed​(boolean consumed)
      Marks wrapper as consumed.
      protected void setTranslatedValue​(java.lang.Object translatedValue)
      Registers translated value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CopyAttribute

        protected CopyAttribute​(ItemModelCloneCreator.CopyItem item,
                                AttributeDescriptorModel attributeDescriptor,
                                java.util.Set<de.hybris.platform.servicelayer.internal.model.impl.ItemModelCloneCreator.ModifiersFlag> modifiers,
                                java.lang.Object value)
        Creates new copy attribute and initialize attributes
    • Method Detail

      • isPartOf

        public boolean isPartOf()
        Returns whether or not the attribute is marked as partOf.
      • isLocalized

        public boolean isLocalized()
        Returns whether or not the attribute is marked as partOf.
      • isRequiredForCreation

        public boolean isRequiredForCreation()
        Tells whether or not the attribute is required for item creation.
      • getTranslatedValue

        public java.lang.Object getTranslatedValue()
        Returns translated attribute value.
        Throws:
        java.lang.IllegalStateException - if the attribute has not been translated yet
      • setTranslatedValue

        protected void setTranslatedValue​(java.lang.Object translatedValue)
        Registers translated value.
      • getQualifier

        public java.lang.String getQualifier()
        Returns attribute qualifier.
      • getOriginalValue

        public java.lang.Object getOriginalValue()
        Returns the original attribute value.
      • isTranslated

        public boolean isTranslated()
        Tells whether or not the attribute has been translated yet.
      • isConsumed

        public boolean isConsumed()
        Tells whether the attribute has been consumed yet. Consumed means that the attribute value has been translated and it has been stored in copied item.
      • setConsumed

        protected void setConsumed​(boolean consumed)
        Marks wrapper as consumed.
      • toString

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