/** * Make fields from definitions and look up the location in the structure * * @param structureHierarchy the structure hierarchy * @param fields the fields * @return the list of configurations */ private List<TemplateFieldConfiguration> makeFields( final CoveringStructureHierarchy structureHierarchy, Collection<TemplateFieldDefinition> definitions) { List<TemplateFieldConfiguration> fields = new ArrayList<>(); for (TemplateFieldDefinition templateFieldDefinition : definitions) { String fieldPath = structureHierarchy.generatePath(templateFieldDefinition).toString(); TemplateFieldConfiguration field = makeField(templateFieldDefinition, fieldPath); fields.add(field); } return fields; }