Class RuleCartTotalConditionTranslator
- java.lang.Object
-
- de.hybris.platform.ruledefinitions.conditions.AbstractRuleConditionTranslator
-
- de.hybris.platform.ruledefinitions.conditions.RuleCartTotalConditionTranslator
-
- All Implemented Interfaces:
RuleConditionTranslator
public class RuleCartTotalConditionTranslator extends AbstractRuleConditionTranslator
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ruledefinitions.conditions.AbstractRuleConditionTranslator
AVAILABLE_QUANTITY_PARAM, BASE_PRODUCT_CODES_ATTRIBUTE, CART_RAO_CURRENCY_ATTRIBUTE, CART_RAO_ENTRIES_ATTRIBUTE, CART_RAO_TOTAL_ATTRIBUTE, CATEGORIES_OPERATOR_PARAM, CATEGORIES_PARAM, CATEGORY_RAO_CODE_ATTRIBUTE, OPERATOR_PARAM, ORDER_ENTRY_RAO_BASE_PRICE_ATTRIBUTE, ORDER_ENTRY_RAO_CATEGORY_CODES_ATTRIBUTE, ORDER_ENTRY_RAO_PRODUCT_ATTRIBUTE, ORDER_ENTRY_RAO_PRODUCT_CODE_ATTRIBUTE, PRODUCT_CONSUMED_RAO_ENTRY_ATTRIBUTE, PRODUCT_RAO_CATEGORIES_ATTRIBUTE, PRODUCT_RAO_CODE_ATTRIBUTE, PRODUCTS_PARAM, QUANTITY_PARAM, VALUE_PARAM
-
-
Constructor Summary
Constructors Constructor Description RuleCartTotalConditionTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCartTotalConditions(RuleCompilerContext context, AmountOperator operator, java.util.Map<java.lang.String,java.math.BigDecimal> value, RuleIrGroupCondition irCartTotalCondition)protected java.lang.StringgetCartThresholdConditionAttribute()protected RuleIrGroupConditiongetCartTotalConditions(RuleCompilerContext context, AmountOperator operator, java.util.Map<java.lang.String,java.math.BigDecimal> value)voidsetCartThresholdConditionAttribute(java.lang.String cartThresholdConditionAttribute)attribute name used for the order threshold condition ("total" by default, you can redeclare this property to use e.g.RuleIrConditiontranslate(RuleCompilerContext context, RuleConditionData condition, RuleConditionDefinitionData conditionDefinition)Translates a rule condition to the intermediate representation.-
Methods inherited from class de.hybris.platform.ruledefinitions.conditions.AbstractRuleConditionTranslator
covertToNullIfEmptyCollection, covertToNullIfEmptyMap, getConsumptionSupport, setConsumptionSupport, verifyAllPresent, verifyAnyPresent
-
-
-
-
Method Detail
-
translate
public RuleIrCondition translate(RuleCompilerContext context, RuleConditionData condition, RuleConditionDefinitionData conditionDefinition)
Description copied from interface:RuleConditionTranslatorTranslates a rule condition to the intermediate representation.- Parameters:
context- - the compiler contextcondition- - the conditionconditionDefinition- - the condition definition- Returns:
- the intermediate representation for the condition
-
getCartTotalConditions
protected RuleIrGroupCondition getCartTotalConditions(RuleCompilerContext context, AmountOperator operator, java.util.Map<java.lang.String,java.math.BigDecimal> value)
-
addCartTotalConditions
protected void addCartTotalConditions(RuleCompilerContext context, AmountOperator operator, java.util.Map<java.lang.String,java.math.BigDecimal> value, RuleIrGroupCondition irCartTotalCondition)
-
getCartThresholdConditionAttribute
protected java.lang.String getCartThresholdConditionAttribute()
-
setCartThresholdConditionAttribute
public void setCartThresholdConditionAttribute(java.lang.String cartThresholdConditionAttribute)
attribute name used for the order threshold condition ("total" by default, you can redeclare this property to use e.g. "totalIncludingCharges" or "subTotal" instead)- Parameters:
orderThresholdConditionAttribute- attribute name used for the order threshold condition
-
-