Class MVELToDataWrapperTranslator
java.lang.Object
org.broadleafcommerce.openadmin.web.rulebuilder.MVELToDataWrapperTranslator
Utility class to convert an MVEL string into a DataWrapper object
which can then be serialized on your view.
- Author:
- Elbert Bautista (elbertbautista)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GroupingTranslator
protected PhraseTranslator
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendExpression
(String phrase, RuleBuilderFieldService fieldService, DataDTO parentDTO, List<ExpressionDTO> myCriteriaList) protected Boolean
checkForInvalidSubGroup
(DataDTO dataDTO) createExpressionDTO
(Expression expression) createRuleData
(Entity[] entities, String mvelProperty, String quantityProperty, String idProperty, String containedProperty, RuleBuilderFieldService fieldService) createRuleData
(Entity[] entities, String mvelProperty, String quantityProperty, String idProperty, RuleBuilderFieldService fieldService) protected DataDTO
createRuleDataDTO
(DataDTO parentDTO, Group group, RuleBuilderFieldService fieldService) protected boolean
isBetweenInclusiveOperator
(ExpressionDTO prev, ExpressionDTO temp) protected boolean
isBetweenOperator
(ExpressionDTO prev, ExpressionDTO temp) protected Boolean
isExpressionDTO
(DataDTO rules) boolean
isProjection
(Object value) protected void
postProcessCriteria
(DataDTO parentDTO, List<ExpressionDTO> myCriteriaList, ExpressionDTO temp, SupportedFieldType type)
-
Field Details
-
SUB_GROUP_MESSAGE
- See Also:
-
groupingTranslator
-
phraseTranslator
-
-
Constructor Details
-
MVELToDataWrapperTranslator
public MVELToDataWrapperTranslator()
-
-
Method Details
-
createRuleData
public DataWrapper createRuleData(Entity[] entities, String mvelProperty, String quantityProperty, String idProperty, RuleBuilderFieldService fieldService) -
createRuleData
public DataWrapper createRuleData(Entity[] entities, String mvelProperty, String quantityProperty, String idProperty, String containedProperty, RuleBuilderFieldService fieldService) -
checkForInvalidSubGroup
-
isExpressionDTO
-
createRuleDataDTO
protected DataDTO createRuleDataDTO(DataDTO parentDTO, Group group, RuleBuilderFieldService fieldService) throws MVELTranslationException - Throws:
MVELTranslationException
-
appendExpression
public void appendExpression(String phrase, RuleBuilderFieldService fieldService, DataDTO parentDTO, List<ExpressionDTO> myCriteriaList) throws MVELTranslationException - Throws:
MVELTranslationException
-
createExpressionDTO
-
isProjection
-
postProcessCriteria
protected void postProcessCriteria(DataDTO parentDTO, List<ExpressionDTO> myCriteriaList, ExpressionDTO temp, SupportedFieldType type) -
isBetweenOperator
-
isBetweenInclusiveOperator
-