public class FreeGiftSpecification extends java.lang.Object implements RewardSpecification
<p> <RewardSpecification impl="com.ibm.commerce.marketing.promotion.choice.gift.FreeGiftSpecification"> <MaxQuantity>3</MaxQuantity> <GiftItem impl="com.ibm.commerce.marketing.promotion.choice.gift.CatalogEntryGiftItem"> <Quantity>3</Quantity> <CatalogEntryKey> <SKU>SKU-20101099</SKU> <DN>o=Root Organization</DN> </CatalogEntryKey> </GiftItem> </RewardSpecification> </p>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String |
TAG_MAX_QUANTITY
XML tag - MaxQuantity
|
ATTRIBUTE_NAME_IMPL, TAG_REWARD_SPECIFICATION
Constructor and Description |
---|
FreeGiftSpecification() |
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.Integer |
getMaxQuantity()
Gets the allowed maximum quantity of gift items.
|
void |
setMaxQuantity(java.lang.Integer maxQuantity)
Sets the allowed maximum quantity of gift items.
|
java.lang.String |
toXML()
Please note that this implementation will cache the result XML after
first call to this method.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String TAG_MAX_QUANTITY
public java.util.List getGiftItems()
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
XMLizable
fromXML
in interface XMLizable
anXMLNode
- The node that represents an XMLizable objectDeXMLizationException
- when this process failsXMLizable.fromXML(org.w3c.dom.Node)
public java.lang.String toXML() throws XMLizationException
toXML
in interface XMLizable
XMLizationException
- when this process failsXMLizable.toXML()
public java.lang.Integer getMaxQuantity()
public void setMaxQuantity(java.lang.Integer maxQuantity)
maxQuantity
- The quantity to set.