com.elasticpath.domain.rules.impl
Class PromotionRuleImpl
java.lang.Object
com.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractPersistenceImpl
com.elasticpath.domain.impl.AbstractEntityImpl
com.elasticpath.domain.rules.impl.AbstractRuleImpl
com.elasticpath.domain.rules.impl.PromotionRuleImpl
- All Implemented Interfaces:
- Entity, EpDomain, Persistence, Rule, java.io.Serializable
public class PromotionRuleImpl
- extends AbstractRuleImpl
Represents a rules engine rule that involves product promotions. Conditions and actions of promotion rules will have the following objects
available: -delegate -cart -product
- See Also:
- Serialized Form
Method Summary |
java.lang.String |
getPromoCode()
Get the promoCode of this rule. |
java.lang.String |
getRuleCode()
Returns the Drools code corresponding to this rule. |
boolean |
isSingleUse()
True if this promoCode is only for single use. |
void |
setPromoCode(java.lang.String promoCode)
Set the promoCode of the rule. |
void |
setSingleUse(boolean singleUse)
Sets whether this promoCode is for single use. |
Methods inherited from class com.elasticpath.domain.rules.impl.AbstractRuleImpl |
addAction, addCondition, addEligibility, getActions, getConditionOperator, getConditions, getEligibilities, getEligibilityOperator, getEndDate, getName, getRuleSet, getStartDate, setActions, setConditionOperator, setConditions, setDefaultValues, setEligibilities, setEligibilityOperator, setEndDate, setName, setRuleSet, setStartDate, validate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- Serial version id.
- See Also:
- Constant Field Values
PromotionRuleImpl
public PromotionRuleImpl()
getPromoCode
public java.lang.String getPromoCode()
- Get the promoCode of this rule.
- Returns:
- the promoCode of the rule
getRuleCode
public java.lang.String getRuleCode()
throws EpDomainException
- Returns the Drools code corresponding to this rule.
- Specified by:
getRuleCode
in interface Rule
- Specified by:
getRuleCode
in class AbstractRuleImpl
- Returns:
- the rule code.
- Throws:
EpDomainException
- if the rule is not well formed
isSingleUse
public boolean isSingleUse()
- True if this promoCode is only for single use.
- Returns:
- True if this promoCode is only for single use.
setPromoCode
public void setPromoCode(java.lang.String promoCode)
- Set the promoCode of the rule.
- Parameters:
promoCode
- the promoCode of the rule
setSingleUse
public void setSingleUse(boolean singleUse)
- Sets whether this promoCode is for single use.
- Parameters:
singleUse
- set to True if this promoCode is only for single use.