public interface Reward extends XMLizable
Reward
interface encapsulates all the
AdjustmentFunction
s of a Reward. A Reward
can
have many AdjustmentFunctions
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
boolean |
computeReward(PromotionContext context,
PromotionExecutionRecord record)
computeReward method applies the adjustments to the
targeted line items. |
AdjustmentFunction[] |
getAdjustmentFunctions()
Gets
AdjustmentFunction s of the Reward . |
void |
setAdjustmentFunctions(AdjustmentFunction[] adjustmentList)
Sets
AdjustmentFunction s for the Reward . |
static final java.lang.String COPYRIGHT
AdjustmentFunction[] getAdjustmentFunctions()
AdjustmentFunction
s of the Reward
.AdjustmentFunction
void setAdjustmentFunctions(AdjustmentFunction[] adjustmentList)
AdjustmentFunction
s for the Reward
.adjustmentList
- list of AdjustmentFunction
boolean computeReward(PromotionContext context, PromotionExecutionRecord record) throws PromotionRewardCalcuationException
computeReward
method applies the adjustments to the
targeted line items. It gets the targeted items from
PromotionExecutionRecord
. For each
AdjustmentFunction
, it finds affected items by applying
filters to the targetted line items.
PromotionExecutionRecord
that is passed as argument is
populated with all the adjustments and affected line items. This record
is appended to PromotionContext
.context
- PromotionContext
.record
- PromotionExecutionRecord
.PromotionRewardCalcuationException
- when the
computation encounters an unexpected error.PromotionRewardCalcuationException