|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.service.impl.AbstractEpServiceImpl com.elasticpath.service.rules.impl.EpRuleEngineImpl
public class EpRuleEngineImpl
Executes rules-engine rules on objects passed as parameters to this class. This rules engine is implemented using Drools Rules 3.0.
Constructor Summary | |
---|---|
EpRuleEngineImpl()
Default Constructor. |
Method Summary | |
---|---|
void |
fireCatalogPromotionRules(java.util.Collection products,
ShoppingCart shoppingCart)
Executes promotion rules for the given products. |
void |
fireCatalogPromotionRules(Product product,
ShoppingCart shoppingCart)
Executes promotion rules for the specified product. |
void |
fireOrderPromotionRules(ShoppingCart shoppingCart)
Executes order promotion rules on the specified shopping cart. |
TimeService |
getTimeService()
Returns the time service. |
void |
recompileRuleBase()
Regenerates the rule base using a new set of rules retrieved from the persistence layer. |
void |
setPromotionRuleDelegate(PromotionRuleDelegate promotionRuleDelegate)
Set the promotion rule helper that will be passed into the working memory. |
void |
setPropertiesDao(PropertiesDao propertiesDao)
Set the DAO used to load properties. |
void |
setRuleSetService(RuleSetService ruleSetService)
Set the rule set service that will provide rules. |
void |
setTimeService(TimeService timeService)
Sets the time service. |
void |
setUtility(Utility utility)
Set the utility class. |
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.service.EpService |
---|
getElasticPath, setElasticPath |
Constructor Detail |
---|
public EpRuleEngineImpl()
Method Detail |
---|
public void fireCatalogPromotionRules(java.util.Collection products, ShoppingCart shoppingCart)
fireCatalogPromotionRules
in interface EpRuleEngine
products
- the product list whose promotion price is to be computedshoppingCart
- the customer's shopping cart, which can affect the product promotion appliedpublic void fireCatalogPromotionRules(Product product, ShoppingCart shoppingCart)
fireCatalogPromotionRules
in interface EpRuleEngine
product
- the product whose promotion price is to be computedshoppingCart
- the customer's shopping cart, which can affect the product promotion applied set to null if no cart is availablepublic void fireOrderPromotionRules(ShoppingCart shoppingCart)
fireOrderPromotionRules
in interface EpRuleEngine
shoppingCart
- the cart to which promotion rules are to be applied.public TimeService getTimeService()
public void recompileRuleBase()
recompileRuleBase
in interface EpRuleEngine
public void setPromotionRuleDelegate(PromotionRuleDelegate promotionRuleDelegate)
setPromotionRuleDelegate
in interface EpRuleEngine
promotionRuleDelegate
- the PromotionRuleDelegate
public void setPropertiesDao(PropertiesDao propertiesDao)
propertiesDao
- the DAO used to load properties.public void setRuleSetService(RuleSetService ruleSetService)
setRuleSetService
in interface EpRuleEngine
ruleSetService
- the RuleSetService
public void setTimeService(TimeService timeService)
timeService
- the time servicepublic void setUtility(Utility utility)
utility
- the utility class
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |