Class RuleTargetCustomersConditionTranslator
- java.lang.Object
-
- de.hybris.platform.ruledefinitions.conditions.AbstractRuleConditionTranslator
-
- de.hybris.platform.ruledefinitions.conditions.RuleTargetCustomersConditionTranslator
-
- All Implemented Interfaces:
RuleConditionTranslator
public class RuleTargetCustomersConditionTranslator extends AbstractRuleConditionTranslator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCART_RAO_USER_ATTRIBUTEstatic java.lang.StringCUSTOMER_GROUPS_OPERATOR_PARAMstatic java.lang.StringCUSTOMER_GROUPS_PARAMstatic java.lang.StringCUSTOMERS_PARAMstatic java.lang.StringEXCLUDED_CUSTOMER_GROUPS_PARAMstatic java.lang.StringEXCLUDED_USERS_PARAMstatic java.lang.StringUSER_GROUP_RAO_ID_ATTRIBUTEstatic java.lang.StringUSER_RAO_GROUPS_ATTRIBUTEstatic java.lang.StringUSER_RAO_ID_ATTRIBUTEstatic java.lang.StringUSER_RAO_PK_ATTRIBUTE-
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, CATEGORIES_OPERATOR_PARAM, CATEGORIES_PARAM, OPERATOR_PARAM, ORDER_ENTRY_RAO_BASE_PRICE_ATTRIBUTE, ORDER_ENTRY_RAO_CATEGORY_CODES_ATTRIBUTE, ORDER_ENTRY_RAO_PRODUCT_CODE_ATTRIBUTE, PRODUCT_CONSUMED_RAO_ENTRY_ATTRIBUTE, PRODUCTS_PARAM, QUANTITY_PARAM, VALUE_PARAM
-
-
Constructor Summary
Constructors Constructor Description RuleTargetCustomersConditionTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddContainsAllCustomerGroupConditions(RuleCompilerContext context, CollectionOperator customerGroupsOperator, java.util.List<java.lang.String> customerGroups, java.util.List<RuleIrCondition> irCustomerGroupsConditions)protected voidaddExcludedCustomersAndCustomerGroupsConditions(RuleCompilerContext context, RuleParameterData excludedCustomerGroupsParameter, RuleParameterData excludedCustomersParameter, RuleIrGroupCondition irTargetCustomersCondition)protected voidaddTargetCustomersConditions(RuleCompilerContext context, CollectionOperator customerGroupsOperator, java.util.List<java.lang.String> customerGroups, java.util.List<java.lang.String> customers, RuleIrGroupCondition irTargetCustomersCondition)protected RuleIrAttributeConditiongetCustomerConditions(RuleCompilerContext context, java.util.List<java.lang.String> customers)protected RuleIrGroupConditiongetCustomerGroupConditions(RuleCompilerContext context, CollectionOperator customerGroupsOperator, java.util.List<java.lang.String> customerGroups)protected java.lang.StringgetUserRAOAttribute()protected booleanisUsePk()voidsetUsePk(boolean usePk)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
-
-
-
-
Field Detail
-
CUSTOMER_GROUPS_OPERATOR_PARAM
public static final java.lang.String CUSTOMER_GROUPS_OPERATOR_PARAM
- See Also:
- Constant Field Values
-
CUSTOMER_GROUPS_PARAM
public static final java.lang.String CUSTOMER_GROUPS_PARAM
- See Also:
- Constant Field Values
-
CUSTOMERS_PARAM
public static final java.lang.String CUSTOMERS_PARAM
- See Also:
- Constant Field Values
-
EXCLUDED_CUSTOMER_GROUPS_PARAM
public static final java.lang.String EXCLUDED_CUSTOMER_GROUPS_PARAM
- See Also:
- Constant Field Values
-
EXCLUDED_USERS_PARAM
public static final java.lang.String EXCLUDED_USERS_PARAM
- See Also:
- Constant Field Values
-
USER_GROUP_RAO_ID_ATTRIBUTE
public static final java.lang.String USER_GROUP_RAO_ID_ATTRIBUTE
- See Also:
- Constant Field Values
-
USER_RAO_ID_ATTRIBUTE
public static final java.lang.String USER_RAO_ID_ATTRIBUTE
- See Also:
- Constant Field Values
-
USER_RAO_PK_ATTRIBUTE
public static final java.lang.String USER_RAO_PK_ATTRIBUTE
- See Also:
- Constant Field Values
-
USER_RAO_GROUPS_ATTRIBUTE
public static final java.lang.String USER_RAO_GROUPS_ATTRIBUTE
- See Also:
- Constant Field Values
-
CART_RAO_USER_ATTRIBUTE
public static final java.lang.String CART_RAO_USER_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
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
-
addTargetCustomersConditions
protected void addTargetCustomersConditions(RuleCompilerContext context, CollectionOperator customerGroupsOperator, java.util.List<java.lang.String> customerGroups, java.util.List<java.lang.String> customers, RuleIrGroupCondition irTargetCustomersCondition)
-
getCustomerGroupConditions
protected RuleIrGroupCondition getCustomerGroupConditions(RuleCompilerContext context, CollectionOperator customerGroupsOperator, java.util.List<java.lang.String> customerGroups)
-
addContainsAllCustomerGroupConditions
protected void addContainsAllCustomerGroupConditions(RuleCompilerContext context, CollectionOperator customerGroupsOperator, java.util.List<java.lang.String> customerGroups, java.util.List<RuleIrCondition> irCustomerGroupsConditions)
-
getCustomerConditions
protected RuleIrAttributeCondition getCustomerConditions(RuleCompilerContext context, java.util.List<java.lang.String> customers)
-
addExcludedCustomersAndCustomerGroupsConditions
protected void addExcludedCustomersAndCustomerGroupsConditions(RuleCompilerContext context, RuleParameterData excludedCustomerGroupsParameter, RuleParameterData excludedCustomersParameter, RuleIrGroupCondition irTargetCustomersCondition)
-
getUserRAOAttribute
protected java.lang.String getUserRAOAttribute()
-
isUsePk
protected boolean isUsePk()
-
setUsePk
public void setUsePk(boolean usePk)
-
-