use of org.broadleafcommerce.openadmin.web.rulebuilder.statement.Expression in project BroadleafCommerce by BroadleafCommerce.
the class MVELToDataWrapperTranslator method appendExpression.
public void appendExpression(String phrase, RuleBuilderFieldService fieldService, DataDTO parentDTO, List<ExpressionDTO> myCriteriaList) throws MVELTranslationException {
Expression expression = phraseTranslator.createExpression(phrase);
FieldDTO field = fieldService.getField(expression.getField());
if (field == null) {
throw new MVELTranslationException(MVELTranslationException.SPECIFIED_FIELD_NOT_FOUND, "MVEL phrase is not " + "compatible with the RuleBuilderFieldService associated with the current rules builder. " + "Unable to find the field specified: (" + expression.getField() + ")");
}
SupportedFieldType type = fieldService.getSupportedFieldType(expression.getField());
ExpressionDTO expressionDTO = createExpressionDTO(expression);
postProcessCriteria(parentDTO, myCriteriaList, expressionDTO, type);
}
Aggregations