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 GroupingTranslatorprotected PhraseTranslatorstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendExpression(String phrase, RuleBuilderFieldService fieldService, DataDTO parentDTO, List<ExpressionDTO> myCriteriaList) protected BooleancheckForInvalidSubGroup(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 DataDTOcreateRuleDataDTO(DataDTO parentDTO, Group group, RuleBuilderFieldService fieldService) protected booleanisBetweenInclusiveOperator(ExpressionDTO prev, ExpressionDTO temp) protected booleanisBetweenOperator(ExpressionDTO prev, ExpressionDTO temp) protected BooleanisExpressionDTO(DataDTO rules) booleanisProjection(Object value) protected voidpostProcessCriteria(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
-