com.ibm.commerce.tools.epromotion

Class RLPromotion

  • java.lang.Object
    • com.ibm.commerce.tools.epromotion.RLPromotion
  • All Implemented Interfaces:
    RLConstants
    Direct Known Subclasses:
    RLItemLevelPromotion, RLOrderLevelPromotion, RLProductLevelPromotion


    public abstract class RLPromotion
    extends java.lang.Object
    implements RLConstants
    The promotion class is an object used to hold all of the information associated with a particular promotion created in the User Interface. It is intended to be extended by customers who wish to create and support their own promotion types.
    • Field Detail

      • COPYRIGHT

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

      • RLPromotion

        public RLPromotion()
        Default constructor of this class.
    • Method Detail

      • toXML

        public java.lang.String toXML()
        Generate the nonBlaze promotion XML representation.
        Returns:
        java.lang.String
      • fromXML

        public void fromXML(java.lang.String xml)
                     throws ParameterNotFoundException,
                            java.text.ParseException
        Populate the promotion object from a nonBlaze XML representation.
        Parameters:
        String - xml
        Throws:
        ParameterNotFoundException
        java.text.ParseException
      • getAssignedSegments

        public java.util.Vector getAssignedSegments()
        Get the assignedSegments.
        Returns:
        java.util.Vector
      • getCurrency

        public java.lang.String getCurrency()
        Get the currency.
        Returns:
        java.lang.String
      • getDayInWeek

        public java.util.Vector getDayInWeek()
        Get the daysInWeek.
        Returns:
        java.lang.String
      • getDescription

        public java.lang.String getDescription()
        Get the description.
        Returns:
        java.lang.String
      • getDescriptionLongNL

        public java.lang.String getDescriptionLongNL()
        Get the customers viewable long description.
        Returns:
        java.lang.String
      • getDescriptionNL

        public java.lang.String getDescriptionNL()
        Return the customers viewable description.
        Returns:
        java.lang.String
      • getEndTimeStamp

        public java.sql.Timestamp getEndTimeStamp()
        Get the promotion end timestamp.
        Returns:
        java.sql.Timestamp
      • getName

        public java.lang.String getName()
        Get the promotion name.
        Returns:
        java.lang.String
      • getPriority

        public int getPriority()
        Get the promotion priority.
        Returns:
        int
      • getPromotionDisplayLevel

        public abstract java.lang.Integer getPromotionDisplayLevel()
        Get the promotion display level.
        Returns:
        java.lang.Integer
      • getRLPromotionType

        public java.lang.String getRLPromotionType()
        Get promotion type.
        Returns:
        java.lang.String
      • getStartTimeStamp

        public java.sql.Timestamp getStartTimeStamp()
        Get promotion start timestamp.
        Returns:
        java.sql.Timestamp
      • getStatus

        public int getStatus()
        Get promotion status.
        Returns:
        int
      • getTargetSalesFigure

        public java.lang.String getTargetSalesFigure()
        Get promotion target sales.
        Returns:
        java.lang.String
      • getDateRanged

        public boolean getDateRanged()
        Check if the promotion is scheduled by date.
        Returns:
        boolean
      • getTimeRanged

        public boolean getTimeRanged()
        Check if the promotion is scheduled by time.
        Returns:
        boolean
      • getValidForAllCustomers

        public boolean getValidForAllCustomers()
        Check if the promotion is valid for all customers.
        Returns:
        boolean
      • populatePromotionLevelSpecificDataFrom

        public abstract void populatePromotionLevelSpecificDataFrom(java.util.Map h)
                                                             throws ParameterNotFoundException
        Populate promotion level specific data for itself from a Map. This Map is generally retrieved from Tools FrameWork GUI, and holds RLPromotion Object information. This map is passed from a controller command to the RLPromotionFactory, and the factory passes it to the class it instantiates. Each sub type of promotion will implement this method differently according to their own attributes.
        Parameters:
        h - java.util.Map
        Throws:
        ParameterNotFoundException
      • populatePromotionSpecificDataFrom

        public abstract void populatePromotionSpecificDataFrom(java.util.Map h)
                                                        throws ParameterNotFoundException
        Populate promotion specific data for itself from a Map. This Map is generally retrieved from Tools Frame Work GUI, and holds RLPromotion Object information. This map is passed from a controller command to the RLPromotionFactory, and the factory passes it to the class it instantiates. Each sub type of promotion will implement this method differently according to their own attributes.
        Parameters:
        h - java.util.Map
        Throws:
        ParameterNotFoundException
      • setDescription

        public void setDescription(java.lang.String newDesc)
        Because the description is stored in the CalcoDesc table, it has to be set outside of 'populate' method.
        Parameters:
        desc - Description of this discount.
      • setDescriptionLongNL

        public void setDescriptionLongNL(java.lang.String newDescriptionLongNL)
        Because the NL-enabled long description is stored in the CALCODEDSC table, it has to be set outside of 'populate' method.
        Parameters:
        newDescriptionLongNL - java.lang.String
      • setDescriptionNL

        public void setDescriptionNL(java.lang.String newDescNL)
        Because the NL-enabled short description is stored in the CALCODEDSC table, it has to be set outside of 'populate' method.
        Parameters:
        desc - Description of this discount.
      • setName

        public void setName(java.lang.String newDiscountName)
        Set the name of the Discount.
        Parameters:
        newDiscountName - java.lang.String
      • setTargetSalesFigure

        public void setTargetSalesFigure(java.lang.String newTargetSalesFigure)
        targetSalesFigure is not stored in the XML string, it has to be set outside of 'populate' method.
        Parameters:
        targetSalesFigure - java.lang.String
      • setAssignedSegments

        public void setAssignedSegments(java.util.Vector newAssignedSegments)
        Sets the assignedSegments.
        Parameters:
        assignedSegments - The assignedSegments to set
      • setCurrency

        public void setCurrency(java.lang.String newCurrency)
        Sets the currency.
        Parameters:
        currency - The currency to set
      • getDaysInWeek

        public java.util.Vector getDaysInWeek()
        Gets the daysInWeek.
        Returns:
        java.util.Vector
      • setDaysInWeek

        public void setDaysInWeek(java.util.Vector newDaysInWeek)
        Sets the days in week.
        Parameters:
        Vector - newDaysInWeek
      • setEndTimeStamp

        public void setEndTimeStamp(java.sql.Timestamp newEndTimeStamp)
        Sets the endTimeStamp.
        Parameters:
        endTimeStamp - The endTimeStamp to set
      • setPriority

        public void setPriority(int newPriority)
        Sets the priority.
        Parameters:
        priority - The priority to set
      • setRLPromotionType

        public void setRLPromotionType(java.lang.String newRlPromotionType)
        Sets the rlPromotionType.
        Parameters:
        rlPromotionType - The rlPromotionType to set
      • setStartTimeStamp

        public void setStartTimeStamp(java.sql.Timestamp newStartTimeStamp)
        Sets the startTimeStamp.
        Parameters:
        startTimeStamp - The startTimeStamp to set
      • setStatus

        public void setStatus(int newStatus)
        Sets the status.
        Parameters:
        newStatus - The status to set
      • getStoreId

        public java.lang.String getStoreId()
        Gets the store ID of current RLPromotion object.
        Returns:
        String storeId
      • setStoreId

        public void setStoreId(java.lang.String newStoreId)
        Sets the store ID of current RLPromotion object.
        Parameters:
        String - newStoreId
      • getLanguageId

        public java.lang.String getLanguageId()
        Gets the language ID of current RLPromotion object description.
        Returns:
        String languageId
      • setLanguageId

        public void setLanguageId(java.lang.String newLanguageId)
        Sets the language ID of current RLPromotion object description.
        Parameters:
        String - newLanguageId
      • getVersion

        public int getVersion()
        Gets the version of current RLPromotion object.
        Returns:
        int version
      • setVersion

        public void setVersion(int newVersion)
        Sets the version of current RLPromotion object. The default value is 0.
        Parameters:
        int - newVersion
      • getRevision

        public int getRevision()
        Gets the revision of current RLPromotion object.
        Returns:
        int revision
      • setRevision

        public void setRevision(int newRevision)
        Sets the revision of current RLPromotion object. The default value is 0.
        Parameters:
        int - newRevision
      • getGroupName

        public java.lang.String getGroupName()
        Gets the group name of current RLPromotion object.
        Returns:
        String groupName
      • setGroupName

        public void setGroupName(java.lang.String newGroupName)
        Sets the group name of current RLPromotion object.
        Parameters:
        String - newGroupName
      • getExclusive

        public int getExclusive()
        Gets the exclusiveness of current RLPromotion object.
        Returns:
        int exclusive
      • setExclusive

        public void setExclusive(int newExclusive)
        Sets the exclusiveness of current RLPromotion object.
         0 = not exclusive
         1 = exclusive at a group level
         2 = exclusive at a global level
         3 = combined with product promotion (order level and shipping only)
         
        Parameters:
        int - newExclusive
      • getPerOrderLimit

        public int getPerOrderLimit()
        Gets the promotion applicable limit per order.
        Returns:
        int preOrderLimit
      • setPerOrderLimit

        public void setPerOrderLimit(int newPerOrderLimit)
        Sets the promotion applicable limit per order.
        Parameters:
        int - newPerOrderLimit
      • getPerShopperLimit

        public int getPerShopperLimit()
        Gets the promotion applicable limit per customer.
        Returns:
        int perShopperLimit
      • setPerShopperLimit

        public void setPerShopperLimit(int newPerShopperLimit)
        Sets the promotion applicable limit per customer.
        Parameters:
        int - newPerShopperLimit
      • getTotalLimit

        public int getTotalLimit()
        Gets the promotion total applicable limit.
        Returns:
        int totalLimit
      • setTotalLimit

        public void setTotalLimit(int newTotalLimit)
        Sets the promotion total applicable limit.
        Parameters:
        int - newTotalLimit
      • getPromotionCode

        public java.lang.String getPromotionCode()
        Gets the promotion code of current RLPromotion object.
        Returns:
        String promotionCode
      • setPromotionCode

        public void setPromotionCode(java.lang.String newPromotionCode)
        Sets the promotion code of current RLPromotion object.
        Parameters:
        String - newPromotionCode
      • getCodeRequired

        public boolean getCodeRequired()
        Check if the promotion code is required in this promotion.
        Returns:
        boolean codeRequired
      • setCodeRequired

        public void setCodeRequired(boolean newCodeRequired)
        Sets the boolean value if the promotion code is required in this promotion.
        Parameters:
        boolean - newCodeRequired
      • getLastUpdateUserId

        public java.lang.String getLastUpdateUserId()
        Gets the user logon ID who is the last one to update the current RLPromotion object.
        Returns:
        String lastUpdateUserId
      • setLastUpdateUserId

        public void setLastUpdateUserId(java.lang.String newLastUpdateUserId)
        Sets the user logon ID who is the last one to update the current RLPromotion object.
        Parameters:
        String - newLastUpdateUserId
      • getLastUpdate

        public java.sql.Timestamp getLastUpdate()
        Gets the timestamp when the current RLPromotion object was updated at last.
        Returns:
        Timestamp
      • setLastUpdate

        public void setLastUpdate(java.sql.Timestamp newLastUpdate)
        Sets the Timestamp when the current RLPromotion object was updated at last.
        Parameters:
        Timestamp - newLastUpdate
      • getIsCoupon

        public boolean getIsCoupon()
        Check if the current RLPromotion is a coupon promotion.
        Returns:
        boolean isCoupon
      • setIsCoupon

        public void setIsCoupon(boolean newIsCoupon)
        Sets true if the current RLPromotion is a coupon promotion, otherwise false.
        Parameters:
        boolean - newIsCoupon
      • getCouponEffectiveDays

        public int getCouponEffectiveDays()
        Gets the coupon effective days.
        Returns:
        int couponeEffectiveDays
      • setCouponEffectiveDays

        public void setCouponEffectiveDays(int newCouponEffectiveDays)
        Sets the coupon effective days.
        Parameters:
        int - newCouponEffectiveDays
      • getCouponExpirationDays

        public int getCouponExpirationDays()
        Gets the coupon expiration days.
        Returns:
        int couponExpirationDays
      • setCouponExpirationDays

        public void setCouponExpirationDays(int newCouponExpirationDays)
        Sets the coupon expiration days.
        Parameters:
        int - newCouponExpirationDays
      • getAllowCouponTransfer

        public boolean getAllowCouponTransfer()
        Gets true only if this is a coupon promotion and allow this coupon promotion to be transferred.
        Returns:
        boolean allowCouponTransfer
      • setAllowCouponTransfer

        public void setAllowCouponTransfer(boolean newAllowCouponTransfer)
        Sets true only if this is a coupon promotion and allow this coupon promotion to be transferred.
        Parameters:
        boolean - newAllowCouponTransfer
      • getIsAdjustmentBasedOnStandardOfferPrice

        public boolean getIsAdjustmentBasedOnStandardOfferPrice()
        Gets true only if adjustment is based on standard offer price.
        Returns:
        boolean isAdjustmentBasedOnStandardOfferPrice
      • getAssignedSegmentIds

        public java.util.Vector getAssignedSegmentIds()
        Get the assignedSegmentIds
        Returns:
        java.util.Vector
      • setAssignedSegmentIds

        public void setAssignedSegmentIds(java.util.Vector newAssignedSegmentIds)
        Sets the assignedSegmentIds
        Parameters:
        assignedSegmentIds - The assignedSegmentIds to set