Search in sources :

Example 1 with RuleBuilderFieldService

use of org.broadleafcommerce.openadmin.web.rulebuilder.service.RuleBuilderFieldService in project BroadleafCommerce by BroadleafCommerce.

the class AdminFieldBuilderProcessor method populateModelVariables.

@Override
public Map<String, Object> populateModelVariables(String tagName, Map<String, String> tagAttributes, BroadleafTemplateContext context) {
    FieldWrapper fieldWrapper = new FieldWrapper();
    String fieldBuilder = context.parseExpression(tagAttributes.get("fieldBuilder"));
    String ceilingEntity = context.parseExpression(tagAttributes.get("ceilingEntity"));
    if (fieldBuilder != null) {
        RuleBuilderFieldService ruleBuilderFieldService = ruleBuilderFieldServiceFactory.createInstance(fieldBuilder);
        if (ruleBuilderFieldService != null) {
            fieldWrapper = ruleBuilderFieldService.buildFields();
        }
    }
    if (extensionManager != null) {
        extensionManager.getProxy().modifyRuleBuilderFields(fieldBuilder, ceilingEntity, fieldWrapper);
    }
    return ImmutableMap.of("fieldWrapper", (Object) fieldWrapper);
}
Also used : RuleBuilderFieldService(org.broadleafcommerce.openadmin.web.rulebuilder.service.RuleBuilderFieldService) FieldWrapper(org.broadleafcommerce.openadmin.web.rulebuilder.dto.FieldWrapper)

Aggregations

FieldWrapper (org.broadleafcommerce.openadmin.web.rulebuilder.dto.FieldWrapper)1 RuleBuilderFieldService (org.broadleafcommerce.openadmin.web.rulebuilder.service.RuleBuilderFieldService)1