com.ibm.commerce.marketing.promotion.condition

Class ShippingModeFilter

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.condition.ShippingModeFilter
  • All Implemented Interfaces:
    Filter, XMLizable, java.io.Serializable


    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>
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ShippingModeFilter()
      Constructor for ShippingModeFilter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 NameDN.
      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.
      • 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

      • ShippingModeFilter

        public ShippingModeFilter()
        Constructor for ShippingModeFilter.
    • Method Detail

      • getCarrier

        public java.lang.String getCarrier()
        This method gets the shipping carrier.
        Returns:
        The shipping carrier
      • getShippingCode

        public java.lang.String getShippingCode()
        This method gets the shipping Code.
        Returns:
        The shipping code
      • getDN

        public java.lang.String getDN()
        This method gets the DN.
        Returns:
        The Distinguished Name.
      • getStoreIdentifier

        public java.lang.String getStoreIdentifier()
        This method gets the Store Identifier.
        Returns:
        The StoreIdentifier
      • getAdjustmentToWholeOrder

        public boolean getAdjustmentToWholeOrder()
        This method checks if the shipping adjustment is for whole order.
        Returns:
        true if the shipping adjustment is for whole order. false if not , this is the default value.
      • setAdjustmentToWholeOrder

        public void setAdjustmentToWholeOrder(boolean aAdjustmentToWholeOrder)
        Set the flag if the shipping adjustment is for whole order.
        Parameters:
        aAdjustmentToWholeOrder - Set to true if the shipping adjustment is for whole order.
      • setCarrier

        public void setCarrier(java.lang.String aCarrier)
        This method sets the shipping carrier.
        Parameters:
        aCarrier - The carrier to set.
      • setShippingCode

        public void setShippingCode(java.lang.String aShippingCode)
        This method sets the shipping code.
        Parameters:
        aShippingCode - The shipping code to set.
      • setDN

        public void setDN(java.lang.String aDN)
        This method sets the Distinguished NameDN.
        Parameters:
        aDN - The Distinguished Name to set.
      • setStoreIdentifier

        public void setStoreIdentifier(java.lang.String aStoreIdentifier)
        This method sets the Store Identifier.
        Parameters:
        aStoreIdentifier - The store identifier to set.
      • filter

        public LineItemSet filter(LineItemSet input,
                                  PromotionContext context)
        Description copied from interface: Filter
        This method performs the business logic to filter the input LineItemSet and return a subset of the original LineItemSet. An empty LineItemSet may be returned if no line item matches the filtering condition.
        Specified by:
        filter in interface Filter
        Parameters:
        input - LineItemSet
        context - PromotionContext
        Returns:
        the filtered LineItemSet
        See Also:
        Filter.filter(LineItemSet, PromotionContext)