Migrating template processing code to FreeMarkerUtil.