String resourceName = resource.getName();
entityNames.add(resourceName);
pluralizedEntityNames.add(inflector.pluralize(resourceName));
}
MetadataFacet metadata = project.getFacet(MetadataFacet.class);
Map<String, Object> dataModel = new HashMap<>();
dataModel.put("entityNames", entityNames);
dataModel.put("pluralizedEntityNames", pluralizedEntityNames);
dataModel.put("projectId", StringUtils.camelCase(metadata.getProjectName()));
dataModel.put("projectTitle", StringUtils.uncamelCase(metadata.getProjectName()));
dataModel.put("targetDir", targetDir);
ProcessingStrategy strategy = new ProcessTemplateStrategy(web, resourceFactory, project, templateFactory, dataModel);
for (ScaffoldResource scaffoldResource : getGlobalTemplates(targetDir, strategy)) {
result.add(scaffoldResource.generate());