public class NoneZeroOrderTotalPolicy extends PromotionPolicyBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
POLICY_STATUS_ACTIVE, POLICY_STATUS_DELETED, POLICY_STATUS_INACTIVE
Constructor and Description |
---|
NoneZeroOrderTotalPolicy()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(PromotionContext context,
PromotionExecutionRecord record)
This method enforces the promotion policy.
|
fromXML, getDescription, getKey, getStatus, setKey, setStatus, toXML
public static final java.lang.String COPYRIGHT
public boolean apply(PromotionContext context, PromotionExecutionRecord record) throws PromotionPolicyApplicationException
context
parameter) is found to be greater than zero. If this
value is found to be zero or less than zero, then this policy has been
violated and the method returns false.apply
in interface PromotionPolicy
apply
in class PromotionPolicyBase
context
- PromotionContext, created and passed to this policy by the enginerecord
- the PromotionExecutionRecord
for which violation is tested.PromotionPolicyApplicationException
- when the evaluation runs into any unexpected errorPromotionPolicy.apply(com.ibm.commerce.marketing.promotion.runtime.PromotionContext,
com.ibm.commerce.marketing.promotion.runtime.PromotionExecutionRecord)