.getFieldManager(), populateValueRequest.getProperty(), populateValueRequest.getPersistenceManager());
if (valueType == null) {
throw new IllegalAccessException("Unable to determine the valueType for the rule field (" +
populateValueRequest.getProperty().getName() + ")");
}
DataDTOToMVELTranslator translator = new DataDTOToMVELTranslator();
Collection<QuantityBasedRule> rules;
try {
rules = (Collection<QuantityBasedRule>) populateValueRequest.getFieldManager().getFieldValue
(instance, populateValueRequest.getProperty().getName());
} catch (FieldNotAvailableException e) {
throw new IllegalArgumentException(e);
}
//AntiSamy HTML encodes the rule JSON - pass the unHTMLEncoded version
dirty = populateQuantityBaseRuleCollection(
populateValueRequest.getPersistenceManager().getDynamicEntityDao().getStandardEntityManager(),
translator, RuleIdentifier.ENTITY_KEY_MAP.get
(populateValueRequest.getMetadata().getRuleIdentifier()),
populateValueRequest.getMetadata().getRuleIdentifier(),
populateValueRequest.getProperty().getUnHtmlEncodedValue(), rules, valueType);
break;
}
case RULE_SIMPLE:{
DataDTOToMVELTranslator translator = new DataDTOToMVELTranslator();
//AntiSamy HTML encodes the rule JSON - pass the unHTMLEncoded version
DataWrapper dw = convertJsonToDataWrapper(populateValueRequest.getProperty().getUnHtmlEncodedValue());
if (dw == null || StringUtils.isEmpty(dw.getError())) {
String mvel = convertMatchRuleJsonToMvel(translator, RuleIdentifier.ENTITY_KEY_MAP.get(populateValueRequest.getMetadata().getRuleIdentifier()),
populateValueRequest.getMetadata().getRuleIdentifier(), dw);