com.ibm.commerce.marketing.promotion.runtime

Class PromotionExecutionAgenda

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.runtime.PromotionExecutionAgenda
  • All Implemented Interfaces:
    java.io.Serializable


    public class PromotionExecutionAgenda
    extends java.lang.Object
    implements java.io.Serializable
    This is basically a map between promotions and policies. The agenda gives you two relationships: 1. Given any promotion, a list of policies applicable to this promotion 2. Given any policy, a list of promotions that are governed by this policy
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addGroup(com.ibm.commerce.marketing.promotion.group.PromotionGroup group)
      Add a promotion group to this agenda.
      void addPromotionPromotionPolicyRelation(Promotion promotion, PromotionPolicy policy)
      Adds a relationship element which is made up of a dual (promotion, promotion policy).
      java.util.Enumeration getApplicablePolicies(Promotion aPromotion)
      Returns all the promotion policies applicable to a promotion.
      com.ibm.commerce.marketing.promotion.group.PromotionGroup[] getGroups()
      Returns all the groups that will be evaluated in this agenda.
      java.sql.Timestamp getLastUpdate()
      Returns the last time anything associated with this agenda has changed.
      java.util.Enumeration getPromotionsGovernedByPolicy(PromotionPolicy aPromotionPolicy)
      Returns all the promotions governed by a promotion policy
      boolean isPricePresent()
      Indicates if price is calculated when this template is invoked.
      boolean isShippingChargePresent()
      Indicates if shipping charge is calculated when this template is invoked.
      boolean isShippingTaxPresent()
      Indicates if shipping tax is calculated when this template is invoked.
      boolean isTaxPresent()
      Indicates if tax is calculated when this template is invoked.
      java.util.Enumeration listPromotionPolicies()
      Return all the promotion policies in this agenda.
      java.util.Enumeration listPromotions()
      Return all the promotions in this agenda
      void removePromotionPromotionPolicyRelation(Promotion promotion, PromotionPolicy policy)
      Removes a relationship element of (promotion, promotion policy) dual.
      void setLastUpdate(java.sql.Timestamp timestamp)
      Sets the last time anything associated with this agenda has changed.
      void setPricePresent(boolean b)
      Sets the flag value that tells whether or not price is calculated at the time this template is invoked.
      void setShippingChargePresent(boolean b)
      Sets the flag value that tells whether or not shipping charge is calculated at the time this template is invoked.
      void setShippingTaxPresent(boolean b)
      Sets the flag value that tells whether or not shipping tax is calculated at the time this template is invoked.
      void setTaxPresent(boolean b)
      Sets the flag value that tells whether or not tax is calculated at the time this template is invoked.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

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

      • PromotionExecutionAgenda

        public PromotionExecutionAgenda()
        Constructor
    • Method Detail

      • getApplicablePolicies

        public java.util.Enumeration getApplicablePolicies(Promotion aPromotion)
        Returns all the promotion policies applicable to a promotion.
        Parameters:
        aPromotion - the promotion
        Returns:
        an enumeration of all promotion policies applicable to this promotion.
      • getPromotionsGovernedByPolicy

        public java.util.Enumeration getPromotionsGovernedByPolicy(PromotionPolicy aPromotionPolicy)
        Returns all the promotions governed by a promotion policy
        Parameters:
        aPromotionPolicy - the policy
        Returns:
        an enumeration of all the promotions governed by this policy
      • listPromotions

        public java.util.Enumeration listPromotions()
        Return all the promotions in this agenda
        Returns:
        an enumeration of all the promotions in this agenda.
      • listPromotionPolicies

        public java.util.Enumeration listPromotionPolicies()
        Return all the promotion policies in this agenda.
        Returns:
        an enumeration of all the promotion policies in this agenda.
      • addPromotionPromotionPolicyRelation

        public void addPromotionPromotionPolicyRelation(Promotion promotion,
                                                        PromotionPolicy policy)
        Adds a relationship element which is made up of a dual (promotion, promotion policy). It means this promotion is governed by this policy and this policy is applicable to this promotion.
        Parameters:
        promotion - the promotion
        policy - the policy
      • removePromotionPromotionPolicyRelation

        public void removePromotionPromotionPolicyRelation(Promotion promotion,
                                                           PromotionPolicy policy)
        Removes a relationship element of (promotion, promotion policy) dual.
        Parameters:
        promotion - the promotion
        policy - the policy
      • getGroups

        public com.ibm.commerce.marketing.promotion.group.PromotionGroup[] getGroups()
        Returns all the groups that will be evaluated in this agenda.
        Returns:
        an array of groups that will be evaluated.
      • addGroup

        public void addGroup(com.ibm.commerce.marketing.promotion.group.PromotionGroup group)
        Add a promotion group to this agenda.
        Parameters:
        group - the group to be added.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • isPricePresent

        public boolean isPricePresent()
        Indicates if price is calculated when this template is invoked.
        Returns:
        true if price is already calculated, false otherwise.
      • isShippingChargePresent

        public boolean isShippingChargePresent()
        Indicates if shipping charge is calculated when this template is invoked.
        Returns:
        true if shipping charge is already calculated, false otherwise.
      • isShippingTaxPresent

        public boolean isShippingTaxPresent()
        Indicates if shipping tax is calculated when this template is invoked.
        Returns:
        true if shipping tax is already calculated, false otherwise.
      • isTaxPresent

        public boolean isTaxPresent()
        Indicates if tax is calculated when this template is invoked.
        Returns:
        true if tax is already calculated, false otherwise.
      • setPricePresent

        public void setPricePresent(boolean b)
        Sets the flag value that tells whether or not price is calculated at the time this template is invoked.
        Parameters:
        b - the flag value, true if price is already calculated, false otherwise.
      • setShippingChargePresent

        public void setShippingChargePresent(boolean b)
        Sets the flag value that tells whether or not shipping charge is calculated at the time this template is invoked.
        Parameters:
        b - the flag value, true if shipping charge is already calculated, false otherwise.
      • setShippingTaxPresent

        public void setShippingTaxPresent(boolean b)
        Sets the flag value that tells whether or not shipping tax is calculated at the time this template is invoked.
        Parameters:
        b - the flag value, true if shipping tax is already calculated, false otherwise.
      • setTaxPresent

        public void setTaxPresent(boolean b)
        Sets the flag value that tells whether or not tax is calculated at the time this template is invoked.
        Parameters:
        b - the flag value, true if tax is already calculated, false otherwise.
      • getLastUpdate

        public java.sql.Timestamp getLastUpdate()
        Returns the last time anything associated with this agenda has changed. This helps agenda builders to determine whether a new agenda needs to be created or a cached one can be used.
        Returns:
        last time anything this agenda depends on has changed.
      • setLastUpdate

        public void setLastUpdate(java.sql.Timestamp timestamp)
        Sets the last time anything associated with this agenda has changed.
        Parameters:
        timestamp - time of change