Class AbstractPromotionRestriction

    • Constructor Detail

      • AbstractPromotionRestriction

        public AbstractPromotionRestriction()
    • Method Detail

      • toString

        public java.lang.String toString()
        Description copied from class: Item
        Returns the String representation of this item. This is by default the representation of the primary key of this item.
        Overrides:
        toString in class Item
        Returns:
        the String representation of this item.
      • getDescriptionPatternArguments

        protected java.lang.Object[] getDescriptionPatternArguments​(SessionContext ctx)
      • buildDataUniqueKey

        protected void buildDataUniqueKey​(SessionContext ctx,
                                          java.lang.StringBuilder builder)
        Build a unique data driven key. Build a unique key that is data driven. This will uniquely identify the rules used in this action and will form the immutable key for stored promotions.
        Parameters:
        ctx - The hybris context
        builder - A StringBuilder used to build up the immutable key
      • deepClone

        protected AbstractPromotionRestriction deepClone​(SessionContext ctx)
        Deep clone this restriction instance. Promotions must be deep cloned, therefore promotion restrictions must also support deep cloning.
        Parameters:
        ctx - The hybris context
        Returns:
        a clone of this instance
      • deepCloneAttributes

        protected void deepCloneAttributes​(SessionContext ctx,
                                           java.util.Map values)
        Called to deep clone attributes of this instance The values map contains all the attributes defined on this instance. The map will be used to initialize a new instance of the Action that is a clone of this instance. This method can remove, replace or add to the Map of attributes.
        Parameters:
        ctx - The hybris context
        values - The map to write into