com.ibm.commerce.marketing.promotion.choice.gift

Class FreeGiftChoice

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.choice.gift.FreeGiftChoice
  • All Implemented Interfaces:
    RewardChoice, XMLizable, java.io.Serializable


    public class FreeGiftChoice
    extends java.lang.Object
    implements RewardChoice
    This class implements RewardChoice interface and it defines the free gift items selected by a shopper. XML Snippet for this RewardChoice:
     <p>
     <RewardChoice impl="com.ibm.commerce.marketing.promotion.choice.gift.FreeGiftChoice">
            <GiftItem impl="com.ibm.commerce.marketing.promotion.choice.gift.CatalogEntryGiftItem">
                    <Quantity>1</Quantity>
                    <CatalogEntryKey>
                            <SKU>SKU-20101099</SKU>
                            <DN>o=Root Organization</DN>        
                    </CatalogEntryKey>        
            </GiftItem>
     </RewardChoice>
     </p>
     
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      FreeGiftChoice() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void fromXML(org.w3c.dom.Node anXMLNode)
      Transforms the XML node into its corresponding real Object.
      java.util.List getGiftItems()
      Returns a list of GiftItem objects.
      java.lang.String toXML()
      Please note that this implementation will cache the result XML after first call to this method.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FreeGiftChoice

        public FreeGiftChoice()
    • Method Detail

      • getGiftItems

        public java.util.List getGiftItems()
        Returns a list of GiftItem objects.
        Returns:
        A list of GiftItem objects.
      • toXML

        public java.lang.String toXML()
                               throws XMLizationException
        Please note that this implementation will cache the result XML after first call to this method. It is expected that contents of this object should not be changed once this method is called. Create a new instance if change is required.
        Specified by:
        toXML in interface XMLizable
        Returns:
        The string format of the XML that represents this XMLizable object
        Throws:
        XMLizationException - when this process fails
        See Also:
        XMLizable.toXML()