use of org.drools.template.objects.ObjectDataProvider in project drools by kiegroup.
the class ObjectDataCompiler method compile.
/**
* Compile templates, substituting from a collection of maps or objects
* into the given template.
*
* @param objs objs the collection of maps or objects
* @param templateStream the template as a stream
* @return the expanded rules as a string
*/
public String compile(final Collection<?> objs, final InputStream templateStream) {
TemplateContainer tc = new DefaultTemplateContainer(templateStream);
closeStream(templateStream);
return compile(new ObjectDataProvider(tc, objs), new TemplateDataListener(tc));
}
Aggregations