public class PromotionRulePrepareInterceptor extends java.lang.Object implements PrepareInterceptor<AbstractRuleEngineRuleModel>
RuleBasedPromotions the interceptor also updates the the
AbstractRuleEngineRuleModel.getMessageFired().| Constructor and Description |
|---|
PromotionRulePrepareInterceptor() |
public void onPrepare(AbstractRuleEngineRuleModel model, InterceptorContext context) throws InterceptorException
PrepareInterceptormodelService.saveAll() method. Prepares the values of the given model.onPrepare in interface PrepareInterceptor<AbstractRuleEngineRuleModel>model - the model which values has to be preparedcontext - the InterceptorContextInterceptorException - if an error occured during the preparationprotected void doOnPrepare(AbstractRuleEngineRuleModel model, InterceptorContext context)
protected RuleBasedPromotionModel createNewPromotionAndAddToRuleModel(AbstractRuleEngineRuleModel ruleModel)
protected boolean setLocalizedMessageFired(AbstractRuleEngineRuleModel engineRule, RuleBasedPromotionModel promotion)
messageFired for all locales from given AbstractRuleEngineRuleModel to given
RuleBasedPromotionModel.engineRule - AbstractRuleEngineRuleModel to copy messageFired frompromotion - RuleBasedPromotionModel to update it's messageFiredprotected void setLocalizedDescription(AbstractRuleModel rule, RuleBasedPromotionModel promotion)
name for all locals from given AbstractRuleModel to the promotionDescription of
given RuleBasedPromotionModel.rule - AbstractRuleModel to copy name frompromotion - RuleBasedPromotionModel to update it's promotionDescriptionprotected ModelService getModelService()
public void setModelService(ModelService modelService)
protected CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
protected RuleCompilerContextFactory<DefaultRuleCompilerContext> getRuleCompilerContextFactory()
public void setRuleCompilerContextFactory(RuleCompilerContextFactory<DefaultRuleCompilerContext> ruleCompilerContextFactory)
protected RuleDao getRuleDao()
public void setRuleDao(RuleDao ruleDao)
Copyright © 2018 SAP SE. All Rights Reserved.