diff --git a/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java b/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java index 63f56c0..f9efc6e 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import fr.devinsy.catgenerator.core.CatGenerator; import fr.devinsy.statoolinfos.HtmlizerContext; +import fr.devinsy.statoolinfos.checker.PropertyCheck; import fr.devinsy.statoolinfos.checker.PropertyChecker; import fr.devinsy.statoolinfos.checker.PropertyChecks; import fr.devinsy.statoolinfos.core.Organization; @@ -72,6 +73,35 @@ public class OrganizationPage logger.info("Htmlize organization page: {}.", organization.getName()); String page = OrganizationPage.htmlize(organization); FileUtils.write(new File(htmlizeDirectory, organization.getTechnicalName() + ".xhtml"), page, StandardCharsets.UTF_8); + + { + try + { + PropertyChecker checker = new PropertyChecker(); + PropertyChecks checks = checker.checkOrganization(organization.getInputFile()); + for (PropertyCheck check : checks) + { + check.setFileName(organization.getLocalFileName()); + } + + for (Service service : organization.getServices()) + { + PropertyChecks subChecks = checker.checkService(service.getInputFile()); + for (PropertyCheck check : subChecks) + { + check.setFileName(service.getLocalFileName()); + } + checks.addAll(subChecks); + } + + page = PropertyFilesCheckPage.htmlize(organization.getName(), checks.getAlertLines()); + FileUtils.write(new File(htmlizeDirectory, "alertChecks-" + organization.getTechnicalName() + ".xhtml"), page, StandardCharsets.UTF_8); + } + catch (IOException exception) + { + exception.printStackTrace(); + } + } } /** @@ -147,6 +177,8 @@ public class OrganizationPage data.setContent("errorCount", checks.getErrorCount()); data.setContent("warningCount", checks.getWarningCount()); data.setContent("voidCount", checks.getVoidCount()); + + data.setAttribute("alertLink", "href", "alertChecks-" + organization.getTechnicalName() + ".xhtml"); } catch (IOException exception) { diff --git a/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java b/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java index 11088bd..f2f616a 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/PropertyFileCheckPage.java @@ -155,7 +155,6 @@ public class PropertyFileCheckPage { for (PropertyCheck check : checks) { - // data.setContent("line", index, "lineIndex", check.getIndex()); data.setEscapedContent("line", index, "lineComment", check.getComment()); data.setEscapedContent("line", index, "lineContent", check.getLine()); @@ -176,7 +175,6 @@ public class PropertyFileCheckPage { for (PropertyCheck check : subchecks) { - // data.setContent("shrunkLine", index, "shrunkLineIndex", check.getIndex()); data.setEscapedContent("shrunkLine", index, "shrunkLineContent", check.getLine()); data.setEscapedContent("shrunkLine", index, "shrunkLineComment", check.getComment()); @@ -197,7 +195,6 @@ public class PropertyFileCheckPage { for (PropertyCheck check : subchecks) { - // data.setContent("alertLine", index, "alertLineIndex", check.getIndex()); data.setEscapedContent("alertLine", index, "alertLineContent", check.getLine()); data.setEscapedContent("alertLine", index, "alertLineComment", check.getComment()); diff --git a/src/fr/devinsy/statoolinfos/htmlize/PropertyFilesCheckPage.java b/src/fr/devinsy/statoolinfos/htmlize/PropertyFilesCheckPage.java index 8be30ff..e57a9b1 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/PropertyFilesCheckPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/PropertyFilesCheckPage.java @@ -58,8 +58,8 @@ public class PropertyFilesCheckPage TagDataManager data = new TagDataManager(); data.setContent("lineCount", checks.size()); - data.setContent("warningCount", checks.getWarningCount()); data.setContent("errorCount", checks.getErrorCount()); + data.setContent("warningCount", checks.getWarningCount()); data.setContent("voidCount", checks.getVoidCount()); // diff --git a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml index ed0a7c6..3da2113 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml @@ -35,9 +35,11 @@