public class ShippingModeFilter extends java.lang.Object implements Filter
ShippingModeFilter
class filters LineItemSet based on the
Shipping Mode to which LineItems (of the LineItemSet) belong to. It returns
all the LineItems having shipping mode same as that of filter. This class
implements Filter
interface.
AdjustmentType for wholeOrder is an optional value. Only used when shipping
adjustment is targeting to entire order. If the AdjustmentType is set to
"wholeOrder", the filter will return all the items passed in. Basically do
nothing. Otherwise the filter will return only affected items. The default
behavior is only return the affected items. XML Snippet for this type of
Filter
.
<Filter impl="com.ibm.commerce.marketing.promotion.condition.ShippingModeFilter"> <DN>o=Root Organization</DN> <StoreIdentifier>BlueMall Store 201</StoreIdentifier> <Carrier>LLOYD PROMOTERS</Carrier> <ShippingCode>ab0067</ShippingCode> <AdjustmentType>wholeOrder</AdjustmentType> </Filter>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
ShippingModeFilter()
Constructor for ShippingModeFilter.
|
Modifier and Type | Method and Description |
---|---|
LineItemSet |
filter(LineItemSet input,
PromotionContext context)
This method performs the business logic to filter the input LineItemSet
and return a subset of the original LineItemSet.
|
void |
fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
boolean |
getAdjustmentToWholeOrder()
This method checks if the shipping adjustment is for whole order.
|
java.lang.String |
getCarrier()
This method gets the shipping carrier.
|
java.lang.String |
getDN()
This method gets the
DN . |
java.lang.String |
getShippingCode()
This method gets the shipping Code.
|
java.lang.String |
getStoreIdentifier()
This method gets the Store Identifier.
|
void |
setAdjustmentToWholeOrder(boolean aAdjustmentToWholeOrder)
Set the flag if the shipping adjustment is for whole order.
|
void |
setCarrier(java.lang.String aCarrier)
This method sets the shipping carrier.
|
void |
setDN(java.lang.String aDN)
This method sets the Distinguished Name
DN . |
void |
setShippingCode(java.lang.String aShippingCode)
This method sets the shipping code.
|
void |
setStoreIdentifier(java.lang.String aStoreIdentifier)
This method sets the Store Identifier.
|
java.lang.String |
toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public ShippingModeFilter()
public java.lang.String getCarrier()
public java.lang.String getShippingCode()
public java.lang.String getDN()
DN
.public java.lang.String getStoreIdentifier()
public boolean getAdjustmentToWholeOrder()
public void setAdjustmentToWholeOrder(boolean aAdjustmentToWholeOrder)
aAdjustmentToWholeOrder
- Set to true if the shipping adjustment is for whole order.public void setCarrier(java.lang.String aCarrier)
aCarrier
- The carrier to set.public void setShippingCode(java.lang.String aShippingCode)
aShippingCode
- The shipping code to set.public void setDN(java.lang.String aDN)
DN
.aDN
- The Distinguished Name to set.public void setStoreIdentifier(java.lang.String aStoreIdentifier)
aStoreIdentifier
- The store identifier to set.public LineItemSet filter(LineItemSet input, PromotionContext context)
Filter
filter
in interface Filter
input
- LineItemSet
context
- PromotionContext
LineItemSet
Filter.filter(LineItemSet,
PromotionContext)
public java.lang.String toXML() throws XMLizationException
XMLizable
toXML
in interface XMLizable
XMLizationException
- when this process failsXMLizable.toXML()
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(Node)