public interface Promotion extends XMLizable
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
static java.text.SimpleDateFormat | DATEFORMAT
Formatter for all time related objects
|
static int | PROMOTION_EXCLUSIVE_AT_GLOBAL_LEVEL
Value of the exclusiveness setting of a promotion to indicate that it can not be combined with any other promotions.
|
static int | PROMOTION_EXCLUSIVE_AT_GROUP_LEVEL
Value of the exclusiveness setting of a promotion to indicate that it can not be combined with any other promotions in the same promotion group.
|
static int | PROMOTION_EXCLUSIVE_NONE
Value of the exclusiveness setting of a promotion to indicate that it may be combined with any other promotions.
|
static int | PROMOTION_EXCLUSIVE_RBD_ORDERDISCOUNT_COMPATIBLE
Promotion exclusiveness settings, this is created for backward compatibility reason.
|
static int | PROMOTION_EXCLUSIVE_STACKABLE_AT_GROUP_LEVEL
Value of the exclusiveness setting of a promotion to indicate that it may be combined with any other promotions and it can also apply on items that have already been targeted by other promotions of the same promotion group.
|
static int | PROMOTION_STATE_ACTIVATING
Value of the state of a promotion used to indicate that it is activating.
|
static int | PROMOTION_STATE_ACTIVE
Value of the state of a promotion used to indicate that it is active.
|
static int | PROMOTION_STATE_ARCHIVED
Value of the state of a promotion used to indicate that it is archived.
|
static int | PROMOTION_STATE_DELETED
Value of the state of a promotion used to indicate that it has been marked for deletion.
|
static int | PROMOTION_STATE_INACTIVE
Value of the state of a promotion used to indicate that it is inactive.
|
static int | PROMOTION_STATE_OBSOLETE
Value of the state of a promotion used to indicate that it is obsolete.
|
static int | PROMOTION_STATE_SUSPENDED
Value of the state of a promotion used to indicate that it has been suspended.
|
static int | PROMOTION_TYPE_PRIVATE
Value of the promotion type setting of a promotion to indicate that it is applicable only to those to whom it has been explicitly granted, that is, this promotion is a coupon promotion.
|
static int | PROMOTION_TYPE_TARGETED
Value of the promotion type setting of a promotion to indicate that it is applicable to customers who belong to one or more of the targeted customer profiles.
|
Modifier and Type | Method and Description |
---|---|
void | addCustomCondition(Condition restriction)
Appends a custom condition to the list of custom conditions.
|
void | addExemptedPolicy(PromotionPolicyKey key)
Appends a policy to the list of policies from which this promotion is explicitly exempted.
|
void | addExplicitlyAppliedPolicy(PromotionPolicyKey key)
Adds a promotion policy to the list of policies that are explicitly marked as applicable to a promotion.
|
boolean | checkTargetingConditionAtRuntime()
Returns the flag value which controls if targeting conditions should be checked at runtime or not
|
boolean | evaluate(PromotionContext context)
Evaluates if this promotion is applicable to the current order which is part of the context object being passed to this method.
|
CampaignKey | getCampaignKey()
Returns the campaign key associated with the promotion.
|
java.lang.String | getCode()
Returns the visualCue.
|
java.lang.String | getCorrespondingRBDTypeName()
Deprecated.
Introduced for backward compatibility reasons. This method will be removed in the next release
|
com.ibm.commerce.marketing.promotion.CouponAttribute | getCouponAttribute()
Returns the coupon attributes associated with the promotion.
|
java.lang.String | getCurrency()
Returns the currency in which all monetary values in this promotion are defined.
|
java.util.Iterator | getCustomConditions()
Returns all custom conditions in an iterator.
|
java.lang.String | getDescription(java.util.Locale locale, int type)
Returns the specified type of the description of the promotion in a particular locale.
|
int | getExclusiveLevel()
Returns the exclusive level of a promotion.
|
java.util.Iterator | getExemptedPolicies()
Returns a list of explicitly exempted promotion policies.
|
java.util.Iterator | getExplicitlyAppliedPolicies()
Returns an iterator of all the promotion policies that are explicitly marked as applicable to this promotion.
|
com.ibm.commerce.marketing.promotion.group.PromotionGroupKey | getGroupKey()
Returns the promotion group key of the promotion.
|
PromotionKey | getKey()
Returns the key of this promotion.
|
java.util.Date | getLastUpdate()
Returns the last updated time of the promotion.
|
CustomerKey | getLastUpdateBy()
Returns the person who is the last one updates this promotion.
|
java.lang.String | getName()
Returns the name of the promotion.
|
int | getPerOrderLimit()
Returns the perOrderLimit.
|
int | getPerShopperLimit()
Returns the perShopperLimit.
|
java.lang.Integer | getPriority()
Returns the priority of the promotion.
|
Condition | getPromotionCodeCondition()
Returns the promotion code condition associated with the promotion.
|
Condition | getPurchaseCondition()
Returns the purchaseCondition.
|
int | getRevision()
Returns the revision.
|
Schedule | getSchedule()
Returns the schedule associated with this promotion.
|
int | getStatus()
Returns the status of this promotion.
|
Condition | getTargetingCondition()
Returns the targeting condition associated with the promotion.
|
java.math.BigDecimal | getTargetSales()
Returns the target sales figure
|
int | getTotalApplicationCountLimit()
Returns the totalApplicationCountLimit.
|
int | getType()
Returns the type of the promotion.
|
int | getVersion()
Returns the version of this promotion.
|
boolean | ignoreTargettingConditionUponProperPromotionCodeEntry()
Returns whether the targeting condition should be checked at proper promotion code entry.
|
boolean | isPromotionCodeRequired()
Return whether promotion code is required for this promotion or not.
|
void | removeExemptedPolicy(PromotionPolicyKey key)
Removes a promotion policy from the exempted list.
|
void | removeExplicitlyAppliedPolicy(PromotionPolicyKey key)
Removes a promotion policy from the list of policies explicitly marked as applicable to this promotion.
|
void | setCampaignKey(CampaignKey campaignkey)
Sets the campaign key associated with the promotion.
|
void | setCheckTargetingConditionAtRuntime(boolean value)
Sets the flag if targeting condition will be checked at runtime.
|
void | setCode(java.lang.String code)
Sets the visualCue.
|
void | setCorrespondingRBDTypeName(java.lang.String newName)
Deprecated.
Introduced for backward compatibility reasons. this method will be removed in the next release
|
void | setCouponAttribute(com.ibm.commerce.marketing.promotion.CouponAttribute attrs)
Sets the coupon attributes associated with the promotion.
|
void | setCurrency(java.lang.String currency)
Sets the currency in which all monetary values in this promotion will be defined.
|
void | setCustomConditions(java.util.Vector otherRestrictions)
Sets the other restrictions that may be added.
|
void | setDescription(java.util.Locale locale, int type, java.lang.String description)
Sets the specified type of the description of the promotion in a particular locale.
|
void | setExclusiveLevel(int exclusive)
Sets the exclusive level of the promotion.
|
void | setGroupKey(com.ibm.commerce.marketing.promotion.group.PromotionGroupKey key)
Sets the promotion group key of the promotion.
|
void | setIgnoreTargetingConditionUponProperPromotionCodeEntry(boolean ignore)
Sets if the targeting condition to be checked at runtime based on promotion code entry.
|
void | setKey(PromotionKey key)
Sets the key of the promotion.
|
void | setLastUpdate(java.util.Date lastUpdate)
Sets the last update date for the promotion.
|
void | setLastUpdateBy(CustomerKey lastUpdateBy)
Sets the customer key for the promotion that is last updated.
|
void | setPerOrderLimit(int perOrderLimit)
Sets the per order redemption limit.
|
void | setPerShopperLimit(int perShopperLimit)
Sets the the maximum number of times a promotion can be applied to any shopper.
|
void | setPriority(java.lang.Integer priority)
Sets the priority of the promotion.
|
void | setPromotionCodeCondition(Condition promotionCodeCondition)
Sets the promotion code condition of the promotion.
|
void | setPromotionCodeRequired(boolean aPromotionCodeRequired)
Sets the promotion code required flag.
|
void | setPurchaseCondition(Condition condition)
Sets the purchaseCondition.
|
void | setSchedule(Schedule schedule)
Sets the schedule of the promotion.
|
void | setStatus(int status)
Sets the status of the promotion.
|
void | setTargetingCondition(Condition targetingCondition)
Sets the targeting condition of the promotion.
|
void | setTargetSales(java.math.BigDecimal sales)
Sets the target sales figure, null is allowed
|
void | setTotalApplicationCountLimit(int totalApplicationCountLimit)
Sets the limit of how many times a promotion can be redeemed overall.
|
void | setType(int type)
Sets the type of promotion.
|
static final java.text.SimpleDateFormat DATEFORMAT
static final java.lang.String COPYRIGHT
static final int PROMOTION_STATE_INACTIVE
static final int PROMOTION_STATE_ACTIVE
static final int PROMOTION_STATE_DELETED
static final int PROMOTION_STATE_SUSPENDED
static final int PROMOTION_STATE_OBSOLETE
static final int PROMOTION_STATE_ACTIVATING
static final int PROMOTION_STATE_ARCHIVED
static final int PROMOTION_EXCLUSIVE_NONE
static final int PROMOTION_EXCLUSIVE_AT_GROUP_LEVEL
static final int PROMOTION_EXCLUSIVE_AT_GLOBAL_LEVEL
static final int PROMOTION_EXCLUSIVE_STACKABLE_AT_GROUP_LEVEL
static final int PROMOTION_EXCLUSIVE_RBD_ORDERDISCOUNT_COMPATIBLE
static final int PROMOTION_TYPE_TARGETED
static final int PROMOTION_TYPE_PRIVATE
java.lang.String getCurrency()
void setCurrency(java.lang.String currency)
PromotionKey getKey()
java.lang.String getDescription(java.util.Locale locale, int type)
int getExclusiveLevel()
java.util.Date getLastUpdate()
CustomerKey getLastUpdateBy()
java.lang.String getName()
java.lang.Integer getPriority()
Schedule getSchedule()
int getStatus()
void setDescription(java.util.Locale locale, int type, java.lang.String description)
void setExclusiveLevel(int exclusive)
void setKey(PromotionKey key)
void setLastUpdate(java.util.Date lastUpdate)
void setLastUpdateBy(CustomerKey lastUpdateBy)
void setPriority(java.lang.Integer priority)
void setSchedule(Schedule schedule)
void setStatus(int status)
boolean isPromotionCodeRequired()
Condition getPromotionCodeCondition()
Condition getTargetingCondition()
void setPromotionCodeCondition(Condition promotionCodeCondition)
void setTargetingCondition(Condition targetingCondition)
boolean ignoreTargettingConditionUponProperPromotionCodeEntry()
boolean checkTargetingConditionAtRuntime()
void setCheckTargetingConditionAtRuntime(boolean value)
void setIgnoreTargetingConditionUponProperPromotionCodeEntry(boolean ignore)
void addCustomCondition(Condition restriction)
java.util.Iterator getCustomConditions()
com.ibm.commerce.marketing.promotion.group.PromotionGroupKey getGroupKey()
void setGroupKey(com.ibm.commerce.marketing.promotion.group.PromotionGroupKey key)
int getPerOrderLimit()
int getPerShopperLimit()
int getTotalApplicationCountLimit()
void setCustomConditions(java.util.Vector otherRestrictions)
void setPerOrderLimit(int perOrderLimit)
void setPerShopperLimit(int perShopperLimit)
void setTotalApplicationCountLimit(int totalApplicationCountLimit)
CampaignKey getCampaignKey()
void setCampaignKey(CampaignKey campaignkey)
int getRevision()
int getType()
int getVersion()
void setType(int type)
java.lang.String getCode()
void setCode(java.lang.String code)
Condition getPurchaseCondition()
void setPurchaseCondition(Condition condition)
void addExemptedPolicy(PromotionPolicyKey key)
void removeExemptedPolicy(PromotionPolicyKey key)
java.util.Iterator getExemptedPolicies()
void addExplicitlyAppliedPolicy(PromotionPolicyKey key)
void removeExplicitlyAppliedPolicy(PromotionPolicyKey key)
java.util.Iterator getExplicitlyAppliedPolicies()
com.ibm.commerce.marketing.promotion.CouponAttribute getCouponAttribute()
void setCouponAttribute(com.ibm.commerce.marketing.promotion.CouponAttribute attrs)
java.math.BigDecimal getTargetSales()
void setTargetSales(java.math.BigDecimal sales)
java.lang.String getCorrespondingRBDTypeName()
void setCorrespondingRBDTypeName(java.lang.String newName)
boolean evaluate(PromotionContext context) throws PromotionRuntimeException
void setPromotionCodeRequired(boolean aPromotionCodeRequired)