From cd3ccaf557a7c83b3bf7d29494e76e3b8f390f0a Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sun, 18 Aug 2024 03:43:52 +0200 Subject: [PATCH] Fixed and refactored HTML cache usage. --- src/website/federation/CrawlPage.java | 4 +- src/website/federation/LastStatsPage.java | 4 +- .../federation/PropertiesFilesPage.java | 4 +- .../PropertyAlertFederationPage.java | 4 +- .../PropertyAlertOrganizationsPage.java | 4 +- src/website/federation/PropertyAlertPage.java | 4 +- .../federation/PropertyAlertServicesPage.java | 4 +- src/website/federation/PropertyCheckPage.java | 4 +- .../PropertyStatsFederationPage.java | 4 +- .../PropertyStatsOrganizationsPage.java | 4 +- src/website/federation/PropertyStatsPage.java | 4 +- .../federation/PropertyStatsServicesPage.java | 4 +- src/website/federation/ServicesPage.java | 4 +- .../federation/SocialNetworksPage.java | 4 +- src/website/federation/StatsPage.java | 4 +- src/website/federation/UptimePage.java | 4 +- .../federation/categories/CategoryPage.java | 23 ++++----- .../federation/categories/IndexPage.java | 4 +- src/website/federation/exports/IndexPage.java | 4 +- .../federation/metrics/MetricGenericPage.java | 8 +-- .../metrics/MetricSpecificPage.java | 8 +-- .../federation/metrics/MetricSummaryPage.java | 8 +-- .../federation/metrics/MetricWebPage.java | 8 +-- .../federation/organizations/IndexPage.java | 4 +- .../organizations/organization/CrawlPage.java | 25 +++++----- .../organization/PropertyAlertPage.java | 25 +++++----- .../organization/PropertyCheckPage.java | 25 +++++----- .../organization/ServicesPage.java | 23 ++++----- .../organizations/organization/StatsPage.java | 25 +++++----- .../organization/UptimePage.java | 25 +++++----- .../metrics/MetricGenericPage.java | 29 ++++++----- .../metrics/MetricSpecificPage.java | 29 ++++++----- .../metrics/MetricSummaryPage.java | 29 ++++++----- .../organization/metrics/MetricWebPage.java | 29 ++++++----- .../services/service/CrawlPage.java | 28 +++++------ .../services/service/PropertyAlertPage.java | 28 +++++------ .../services/service/PropertyCheckPage.java | 28 +++++------ .../services/service/ServicesPage.java | 28 +++++------ .../services/service/StatsPage.java | 28 +++++------ .../services/service/UptimePage.java | 28 +++++------ .../service/metrics/MetricGenericPage.java | 32 ++++++------ .../service/metrics/MetricSpecificPage.java | 32 ++++++------ .../service/metrics/MetricSummaryPage.java | 32 ++++++------ .../service/metrics/MetricWebPage.java | 32 ++++++------ .../federation/softwares/IndexPage.java | 4 +- .../federation/softwares/SoftwarePage.java | 50 +++++++++---------- 46 files changed, 356 insertions(+), 389 deletions(-) diff --git a/src/website/federation/CrawlPage.java b/src/website/federation/CrawlPage.java index b499786..ac0df0a 100644 --- a/src/website/federation/CrawlPage.java +++ b/src/website/federation/CrawlPage.java @@ -52,7 +52,7 @@ public class CrawlPage extends HttpServlet { try { - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -73,7 +73,7 @@ public class CrawlPage extends HttpServlet trail.add("Journal", "/federation/crawl.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/LastStatsPage.java b/src/website/federation/LastStatsPage.java index 450b806..a04803e 100644 --- a/src/website/federation/LastStatsPage.java +++ b/src/website/federation/LastStatsPage.java @@ -54,7 +54,7 @@ public class LastStatsPage extends HttpServlet { logger.info("PAGE Federation > Last Stats"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -75,7 +75,7 @@ public class LastStatsPage extends HttpServlet trail.add("Chiffres", "/federation/servicesFigures.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertiesFilesPage.java b/src/website/federation/PropertiesFilesPage.java index bc41aff..ceabf6c 100644 --- a/src/website/federation/PropertiesFilesPage.java +++ b/src/website/federation/PropertiesFilesPage.java @@ -63,7 +63,7 @@ public class PropertiesFilesPage extends HttpServlet { logger.info("PAGE Federation > propertiesFiles"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -86,7 +86,7 @@ public class PropertiesFilesPage extends HttpServlet trail.add("Fichiers", "/federation/propertiesFiles.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyAlertFederationPage.java b/src/website/federation/PropertyAlertFederationPage.java index 4814859..dc3f501 100644 --- a/src/website/federation/PropertyAlertFederationPage.java +++ b/src/website/federation/PropertyAlertFederationPage.java @@ -56,7 +56,7 @@ public class PropertyAlertFederationPage extends HttpServlet { logger.info("PAGE Fédération > PropertyAlert"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -79,7 +79,7 @@ public class PropertyAlertFederationPage extends HttpServlet trail.add("Disponibilités", "/federation/uptimes.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyAlertOrganizationsPage.java b/src/website/federation/PropertyAlertOrganizationsPage.java index b5cca3c..7a5377c 100644 --- a/src/website/federation/PropertyAlertOrganizationsPage.java +++ b/src/website/federation/PropertyAlertOrganizationsPage.java @@ -57,7 +57,7 @@ public class PropertyAlertOrganizationsPage extends HttpServlet { logger.info("PAGE Fédération > PropertyAlert"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -84,7 +84,7 @@ public class PropertyAlertOrganizationsPage extends HttpServlet trail.add("Disponibilités", "/federation/uptimes.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyAlertPage.java b/src/website/federation/PropertyAlertPage.java index 1c27268..1559c6b 100644 --- a/src/website/federation/PropertyAlertPage.java +++ b/src/website/federation/PropertyAlertPage.java @@ -56,7 +56,7 @@ public class PropertyAlertPage extends HttpServlet { logger.info("PAGE Fédération > PropertyAlerts"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -79,7 +79,7 @@ public class PropertyAlertPage extends HttpServlet trail.add("Alertes", "/federation/propertyAlerts.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyAlertServicesPage.java b/src/website/federation/PropertyAlertServicesPage.java index 8bd3ace..7f49480 100644 --- a/src/website/federation/PropertyAlertServicesPage.java +++ b/src/website/federation/PropertyAlertServicesPage.java @@ -57,7 +57,7 @@ public class PropertyAlertServicesPage extends HttpServlet { logger.info("PAGE Fédération > PropertyAlert"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -84,7 +84,7 @@ public class PropertyAlertServicesPage extends HttpServlet trail.add("Disponibilités", "/federation/uptimes.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyCheckPage.java b/src/website/federation/PropertyCheckPage.java index d9115e8..6e42897 100644 --- a/src/website/federation/PropertyCheckPage.java +++ b/src/website/federation/PropertyCheckPage.java @@ -52,7 +52,7 @@ public class PropertyCheckPage extends HttpServlet { try { - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -73,7 +73,7 @@ public class PropertyCheckPage extends HttpServlet trail.add("Propriétés", "/federation/propertyCheck.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyStatsFederationPage.java b/src/website/federation/PropertyStatsFederationPage.java index 57ea73d..9508101 100644 --- a/src/website/federation/PropertyStatsFederationPage.java +++ b/src/website/federation/PropertyStatsFederationPage.java @@ -56,7 +56,7 @@ public class PropertyStatsFederationPage extends HttpServlet { logger.info("PAGE Federation > propertiesStats"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -78,7 +78,7 @@ public class PropertyStatsFederationPage extends HttpServlet trail.add("Propriétés", "/federation/propertiesStats.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyStatsOrganizationsPage.java b/src/website/federation/PropertyStatsOrganizationsPage.java index 149e9bb..50f0496 100644 --- a/src/website/federation/PropertyStatsOrganizationsPage.java +++ b/src/website/federation/PropertyStatsOrganizationsPage.java @@ -56,7 +56,7 @@ public class PropertyStatsOrganizationsPage extends HttpServlet { logger.info("PAGE Federation > propertiesStats"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -78,7 +78,7 @@ public class PropertyStatsOrganizationsPage extends HttpServlet trail.add("Propriétés", "/federation/propertiesStats.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyStatsPage.java b/src/website/federation/PropertyStatsPage.java index cd8e6ff..0344e5d 100644 --- a/src/website/federation/PropertyStatsPage.java +++ b/src/website/federation/PropertyStatsPage.java @@ -57,7 +57,7 @@ public class PropertyStatsPage extends HttpServlet { logger.info("PAGE Federation > propertiesStats"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -80,7 +80,7 @@ public class PropertyStatsPage extends HttpServlet trail.add("Propriétés", "/federation/propertiesStats.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/PropertyStatsServicesPage.java b/src/website/federation/PropertyStatsServicesPage.java index 2407df8..ddb42ef 100644 --- a/src/website/federation/PropertyStatsServicesPage.java +++ b/src/website/federation/PropertyStatsServicesPage.java @@ -56,7 +56,7 @@ public class PropertyStatsServicesPage extends HttpServlet { logger.info("PAGE Federation > propertiesStats"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -78,7 +78,7 @@ public class PropertyStatsServicesPage extends HttpServlet trail.add("Propriétés", "/federation/propertiesStats.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/ServicesPage.java b/src/website/federation/ServicesPage.java index 035449e..bd83454 100644 --- a/src/website/federation/ServicesPage.java +++ b/src/website/federation/ServicesPage.java @@ -54,7 +54,7 @@ public class ServicesPage extends HttpServlet { logger.info("PAGE Federation > services"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -75,7 +75,7 @@ public class ServicesPage extends HttpServlet trail.add("Services", "/federation/services.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/SocialNetworksPage.java b/src/website/federation/SocialNetworksPage.java index a0230cf..8cb5615 100644 --- a/src/website/federation/SocialNetworksPage.java +++ b/src/website/federation/SocialNetworksPage.java @@ -62,7 +62,7 @@ public class SocialNetworksPage extends HttpServlet { logger.info("PAGE Federation > SocialNetworks"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -85,7 +85,7 @@ public class SocialNetworksPage extends HttpServlet trail.add("Réseaux sociaux", "/federation/socialNetworks.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/StatsPage.java b/src/website/federation/StatsPage.java index 023ec9b..2f4097f 100644 --- a/src/website/federation/StatsPage.java +++ b/src/website/federation/StatsPage.java @@ -63,7 +63,7 @@ public class StatsPage extends HttpServlet { logger.info("PAGE Federation > Stats"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -85,7 +85,7 @@ public class StatsPage extends HttpServlet trail.add("Stats", "/federation/stats.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/UptimePage.java b/src/website/federation/UptimePage.java index 6b53b22..d351756 100644 --- a/src/website/federation/UptimePage.java +++ b/src/website/federation/UptimePage.java @@ -54,7 +54,7 @@ public class UptimePage extends HttpServlet { logger.info("PAGE Fédération > Uptimes"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -75,7 +75,7 @@ public class UptimePage extends HttpServlet trail.add("Disponibilités", "/federation/uptimes.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/categories/CategoryPage.java b/src/website/federation/categories/CategoryPage.java index cbb4193..b80fe87 100644 --- a/src/website/federation/categories/CategoryPage.java +++ b/src/website/federation/categories/CategoryPage.java @@ -64,19 +64,18 @@ public class CategoryPage extends HttpServlet { logger.info("PAGE Federation > Categories > Category"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Federation federation = StatoolInfosWeb.instance().getFederation(); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - Category category = StatoolInfosWeb.instance().getCategoryFromPathinfo(request.getPathInfo()); - - String key = this.getClass().getCanonicalName() + "?category=" + category.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Category category = StatoolInfosWeb.instance().getCategoryFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Federation federation = StatoolInfosWeb.instance().getFederation(); + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + // Send response. // ============== String headerView = FederationHeaderView.htmlize(federation, uptimes); @@ -90,7 +89,7 @@ public class CategoryPage extends HttpServlet trail.add(category.getName(), "/federation/categories/" + category.getTechnicalName() + ".xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(key, html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/categories/IndexPage.java b/src/website/federation/categories/IndexPage.java index 3e35258..bcf1c74 100644 --- a/src/website/federation/categories/IndexPage.java +++ b/src/website/federation/categories/IndexPage.java @@ -64,7 +64,7 @@ public class IndexPage extends HttpServlet { logger.info("PAGE Federation > Categories"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -88,7 +88,7 @@ public class IndexPage extends HttpServlet trail.add("Catégories", "/federation/categories/"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/exports/IndexPage.java b/src/website/federation/exports/IndexPage.java index eb985b9..7894724 100644 --- a/src/website/federation/exports/IndexPage.java +++ b/src/website/federation/exports/IndexPage.java @@ -57,7 +57,7 @@ public class IndexPage extends HttpServlet { logger.info("PAGE Fédération > Exports"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -78,7 +78,7 @@ public class IndexPage extends HttpServlet trail.add(StatoolInfosWeb.instance().getFederation().getName(), "/federation/organizations/"); trail.add("Exports", "/federation/exports/"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/metrics/MetricGenericPage.java b/src/website/federation/metrics/MetricGenericPage.java index f944640..bbd4c62 100644 --- a/src/website/federation/metrics/MetricGenericPage.java +++ b/src/website/federation/metrics/MetricGenericPage.java @@ -65,18 +65,18 @@ public class MetricGenericPage extends HttpServlet { logger.info("PAGE Federation > Metrics > Generic"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Use parameters. // =============== Federation federation = StatoolInfosWeb.instance().getFederation(); UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Send response. // ============== @@ -89,7 +89,7 @@ public class MetricGenericPage extends HttpServlet trail.add("Génériques", "/federation/metrics/generic.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/metrics/MetricSpecificPage.java b/src/website/federation/metrics/MetricSpecificPage.java index 2c1f862..163d72c 100644 --- a/src/website/federation/metrics/MetricSpecificPage.java +++ b/src/website/federation/metrics/MetricSpecificPage.java @@ -65,18 +65,18 @@ public class MetricSpecificPage extends HttpServlet { logger.info("PAGE Federation > Metrics > Specific"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Use parameters. // =============== Federation federation = StatoolInfosWeb.instance().getFederation(); UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Send response. // ============== @@ -89,7 +89,7 @@ public class MetricSpecificPage extends HttpServlet trail.add("Spécifiques", "/federation/metrics/specific.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/metrics/MetricSummaryPage.java b/src/website/federation/metrics/MetricSummaryPage.java index 7e6082c..b0d05c3 100644 --- a/src/website/federation/metrics/MetricSummaryPage.java +++ b/src/website/federation/metrics/MetricSummaryPage.java @@ -66,18 +66,18 @@ public class MetricSummaryPage extends HttpServlet { logger.info("PAGE Federation > Metrics > Summary"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Use parameters. // =============== Federation federation = StatoolInfosWeb.instance().getFederation(); UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Send response. // ============== @@ -90,7 +90,7 @@ public class MetricSummaryPage extends HttpServlet trail.add("Résumé", "/federation/metrics/summary.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/metrics/MetricWebPage.java b/src/website/federation/metrics/MetricWebPage.java index 12a6451..fb9920f 100644 --- a/src/website/federation/metrics/MetricWebPage.java +++ b/src/website/federation/metrics/MetricWebPage.java @@ -65,18 +65,18 @@ public class MetricWebPage extends HttpServlet { logger.info("PAGE Federation > Metrics > Web"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Use parameters. // =============== Federation federation = StatoolInfosWeb.instance().getFederation(); UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); // Send response. // ============== @@ -89,7 +89,7 @@ public class MetricWebPage extends HttpServlet trail.add("Web", "/federation/metrics/web.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/IndexPage.java b/src/website/federation/organizations/IndexPage.java index 6902603..5e2bd81 100644 --- a/src/website/federation/organizations/IndexPage.java +++ b/src/website/federation/organizations/IndexPage.java @@ -52,7 +52,7 @@ public class IndexPage extends HttpServlet { try { - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -73,7 +73,7 @@ public class IndexPage extends HttpServlet trail.add("Organisations", "/federation/organizations/"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/CrawlPage.java b/src/website/federation/organizations/organization/CrawlPage.java index 50f2ad9..060ec25 100644 --- a/src/website/federation/organizations/organization/CrawlPage.java +++ b/src/website/federation/organizations/organization/CrawlPage.java @@ -56,20 +56,19 @@ public class CrawlPage extends HttpServlet { logger.info("PAGE Organization > Crawl"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = CrawlView.htmlize(organization.getCrawlJournal()); @@ -80,7 +79,7 @@ public class CrawlPage extends HttpServlet trail.add("Journal", "/federation/organizations/" + organization.getTechnicalName() + "/crawl.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(key, html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/PropertyAlertPage.java b/src/website/federation/organizations/organization/PropertyAlertPage.java index eeca89e..70055d5 100644 --- a/src/website/federation/organizations/organization/PropertyAlertPage.java +++ b/src/website/federation/organizations/organization/PropertyAlertPage.java @@ -56,20 +56,19 @@ public class PropertyAlertPage extends HttpServlet { logger.info("PAGE Organization > PropertyAlert"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = PropertyAlertView.htmlize(organization.getInputChecksAll().getAlertLines()); @@ -80,7 +79,7 @@ public class PropertyAlertPage extends HttpServlet trail.add("Alertes", "/federation/organizations/" + organization.getTechnicalName() + "/propertyAlert.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(key, html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/PropertyCheckPage.java b/src/website/federation/organizations/organization/PropertyCheckPage.java index 6927f8a..1201ce0 100644 --- a/src/website/federation/organizations/organization/PropertyCheckPage.java +++ b/src/website/federation/organizations/organization/PropertyCheckPage.java @@ -56,20 +56,19 @@ public class PropertyCheckPage extends HttpServlet { logger.info("PAGE Organization > PropertyCheck"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = PropertyCheckView.htmlize(organization.getInputChecks()); @@ -80,7 +79,7 @@ public class PropertyCheckPage extends HttpServlet trail.add("Propriétés", "/federation/organizations/" + organization.getTechnicalName() + "/propertyCheck.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/ServicesPage.java b/src/website/federation/organizations/organization/ServicesPage.java index 63a0fe4..05eb1cc 100644 --- a/src/website/federation/organizations/organization/ServicesPage.java +++ b/src/website/federation/organizations/organization/ServicesPage.java @@ -56,19 +56,18 @@ public class ServicesPage extends HttpServlet { logger.info("PAGE Organization > Services"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + + // Use parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + + // Send response. + // ============== UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = ServiceListView.htmlize(organization.getServices()); @@ -80,7 +79,7 @@ public class ServicesPage extends HttpServlet trail.add("Services", "/federation/organizations/" + organization.getTechnicalName() + "/services.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/StatsPage.java b/src/website/federation/organizations/organization/StatsPage.java index 0d7c0d5..ee7d1d3 100644 --- a/src/website/federation/organizations/organization/StatsPage.java +++ b/src/website/federation/organizations/organization/StatsPage.java @@ -64,20 +64,19 @@ public class StatsPage extends HttpServlet { logger.info("PAGE Organization > Stats"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = htmlize(organization); @@ -88,7 +87,7 @@ public class StatsPage extends HttpServlet trail.add("Stats", "/federation/organizations/" + organization.getTechnicalName() + "/stats.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/UptimePage.java b/src/website/federation/organizations/organization/UptimePage.java index b0e2e19..acace22 100644 --- a/src/website/federation/organizations/organization/UptimePage.java +++ b/src/website/federation/organizations/organization/UptimePage.java @@ -56,20 +56,19 @@ public class UptimePage extends HttpServlet { logger.info("PAGE Organization > Uptime"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + + // Use parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = UptimeView.htmlize(organization.getServices(), uptimes); @@ -80,7 +79,7 @@ public class UptimePage extends HttpServlet trail.add("Disponibilité", "/federation/organizations/" + organization.getTechnicalName() + "/uptime.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/metrics/MetricGenericPage.java b/src/website/federation/organizations/organization/metrics/MetricGenericPage.java index aff789b..cdc7617 100644 --- a/src/website/federation/organizations/organization/metrics/MetricGenericPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricGenericPage.java @@ -66,22 +66,21 @@ public class MetricGenericPage extends HttpServlet { logger.info("PAGE Organization > Metrics > Summary"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = htmlize(organization, viewMenu, periodMenu); @@ -93,7 +92,7 @@ public class MetricGenericPage extends HttpServlet trail.add("Génériques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/generic.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java b/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java index c396f56..471c5e4 100644 --- a/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java @@ -64,22 +64,21 @@ public class MetricSpecificPage extends HttpServlet { logger.info("PAGE Organization > Metrics > Specific"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = htmlize(organization, viewMenu, periodMenu); @@ -91,7 +90,7 @@ public class MetricSpecificPage extends HttpServlet trail.add("Spécifiques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/specific.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java b/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java index 032c8fb..7852ba7 100644 --- a/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java @@ -66,22 +66,21 @@ public class MetricSummaryPage extends HttpServlet { logger.info("PAGE Organization > Metrics > Summary"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = htmlize(organization, viewMenu, periodMenu); @@ -93,7 +92,7 @@ public class MetricSummaryPage extends HttpServlet trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/summary.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/metrics/MetricWebPage.java b/src/website/federation/organizations/organization/metrics/MetricWebPage.java index abd137d..2bc898c 100644 --- a/src/website/federation/organizations/organization/metrics/MetricWebPage.java +++ b/src/website/federation/organizations/organization/metrics/MetricWebPage.java @@ -65,22 +65,21 @@ public class MetricWebPage extends HttpServlet { logger.info("PAGE Organization > Metrics > Web"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Organization organization = StatoolInfosWeb.instance().getOrganizationFromPathinfo(request.getPathInfo()); + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = OrganizationHeaderView.htmlize(organization, uptimes); String contentView = htmlize(organization, viewMenu, periodMenu); @@ -92,7 +91,7 @@ public class MetricWebPage extends HttpServlet trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/web.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/CrawlPage.java b/src/website/federation/organizations/organization/services/service/CrawlPage.java index 5d63648..d45694c 100644 --- a/src/website/federation/organizations/organization/services/service/CrawlPage.java +++ b/src/website/federation/organizations/organization/services/service/CrawlPage.java @@ -57,22 +57,20 @@ public class CrawlPage extends HttpServlet { logger.info("PAGE Service > Crawl"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = CrawlView.htmlize(service.getCrawlJournal()); @@ -87,7 +85,7 @@ public class CrawlPage extends HttpServlet "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/crawl.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java b/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java index 322c9a1..ca4633c 100644 --- a/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java +++ b/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java @@ -57,22 +57,20 @@ public class PropertyAlertPage extends HttpServlet { logger.info("PAGE Service > PropertyAlert"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = PropertyAlertView.htmlize(service.getInputChecksAll().getAlertLines()); @@ -87,7 +85,7 @@ public class PropertyAlertPage extends HttpServlet + "/propertyAlert.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java b/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java index b63b7ed..4e3cbda 100644 --- a/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java +++ b/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java @@ -57,22 +57,20 @@ public class PropertyCheckPage extends HttpServlet { logger.info("PAGE Service > PropertyCheck"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = PropertyCheckView.htmlize(service.getInputChecks()); @@ -87,7 +85,7 @@ public class PropertyCheckPage extends HttpServlet + "/propertyCheck.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/ServicesPage.java b/src/website/federation/organizations/organization/services/service/ServicesPage.java index 321bc17..9ad634a 100644 --- a/src/website/federation/organizations/organization/services/service/ServicesPage.java +++ b/src/website/federation/organizations/organization/services/service/ServicesPage.java @@ -58,22 +58,20 @@ public class ServicesPage extends HttpServlet { logger.info("PAGE Service > Services"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = ServiceListView.htmlize(new Services(service)); @@ -88,7 +86,7 @@ public class ServicesPage extends HttpServlet + "/services.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/StatsPage.java b/src/website/federation/organizations/organization/services/service/StatsPage.java index 914852e..75a75fb 100644 --- a/src/website/federation/organizations/organization/services/service/StatsPage.java +++ b/src/website/federation/organizations/organization/services/service/StatsPage.java @@ -65,22 +65,20 @@ public class StatsPage extends HttpServlet { logger.info("PAGE Service > Stats"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = htmlize(service); @@ -95,7 +93,7 @@ public class StatsPage extends HttpServlet "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/stats.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/UptimePage.java b/src/website/federation/organizations/organization/services/service/UptimePage.java index 9245636..ef75c5b 100644 --- a/src/website/federation/organizations/organization/services/service/UptimePage.java +++ b/src/website/federation/organizations/organization/services/service/UptimePage.java @@ -58,22 +58,20 @@ public class UptimePage extends HttpServlet { logger.info("PAGE Service > Uptime"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = UptimeView.htmlize(new Services(service), uptimeJournal); @@ -88,7 +86,7 @@ public class UptimePage extends HttpServlet "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName() + "/uptime.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java index 331f6c4..13a5f69 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java @@ -67,24 +67,22 @@ public class MetricGenericPage extends HttpServlet { logger.info("PAGE Service > MetricGenericPage"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = htmlize(service, viewMenu, periodMenu); @@ -101,7 +99,7 @@ public class MetricGenericPage extends HttpServlet + "/metrics/generic.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java index 562e642..a2e07a1 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java @@ -67,24 +67,22 @@ public class MetricSpecificPage extends HttpServlet { logger.info("PAGE Service > MetricGenericPage"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString()); + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = htmlize(service, viewMenu, periodMenu); @@ -101,7 +99,7 @@ public class MetricSpecificPage extends HttpServlet + "/metrics/specific.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java index a7773c8..1e191a1 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java @@ -67,24 +67,22 @@ public class MetricSummaryPage extends HttpServlet { logger.info("PAGE Service > MetricSummaryPage"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = htmlize(service, viewMenu, periodMenu); @@ -101,7 +99,7 @@ public class MetricSummaryPage extends HttpServlet + "/metrics/summary.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java b/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java index eb9a4d1..01e3b99 100644 --- a/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java +++ b/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java @@ -67,24 +67,22 @@ public class MetricWebPage extends HttpServlet { logger.info("PAGE Service > MetricGenericPage"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo()); - Organization organization = service.getOrganization(); - UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); - ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); - PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); - - // Send response. - // ============== - String key = this.getClass().getCanonicalName() + "?organization=" + organization.getTechnicalName() + "&service=" - + service.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { + // Get parameters. + // =============== + ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view")); + PeriodMenu periodMenu = PeriodMenu.valueFrom(request.getParameter("period")); + + // Use parameters. + // =============== + Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString()); + Organization organization = service.getOrganization(); + UptimeJournal uptimeJournal = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== String headerView = ServiceHeaderView.htmlize(service, uptimeJournal); String contentView = htmlize(service, viewMenu, periodMenu); @@ -101,7 +99,7 @@ public class MetricWebPage extends HttpServlet + "/metrics/web.xhtml"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/softwares/IndexPage.java b/src/website/federation/softwares/IndexPage.java index a697822..87b517f 100644 --- a/src/website/federation/softwares/IndexPage.java +++ b/src/website/federation/softwares/IndexPage.java @@ -66,7 +66,7 @@ public class IndexPage extends HttpServlet { logger.info("PAGE Federation > Softwares"); - String html = StatoolInfosWeb.instance().getHtmlCache().get(this.getClass().getCanonicalName()); + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); if (html == null) { // Get parameters. @@ -90,7 +90,7 @@ public class IndexPage extends HttpServlet trail.add("Logiciels", "/federation/softwares/"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(this.getClass().getCanonicalName(), html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } // Display page. diff --git a/src/website/federation/softwares/SoftwarePage.java b/src/website/federation/softwares/SoftwarePage.java index 8e9874b..3cd8723 100644 --- a/src/website/federation/softwares/SoftwarePage.java +++ b/src/website/federation/softwares/SoftwarePage.java @@ -64,28 +64,27 @@ public class SoftwarePage extends HttpServlet { logger.info("PAGE Federation > Softwares > Software"); - // Get parameters. - // =============== - - // Use parameters. - // =============== - Federation federation = StatoolInfosWeb.instance().getFederation(); - UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); - Software software = StatoolInfosWeb.instance().getSoftwareFromPathinfo(request.getPathInfo()); - - // Send response. - // ============== - String headerView = FederationHeaderView.htmlize(federation, uptimes); - - if (software == null) + String html = StatoolInfosWeb.instance().getHtmlCache().get(request); + if (html == null) { - throw new StatoolInfosWebException("Illegal software name."); - } - else - { - String key = this.getClass().getCanonicalName() + "?software=" + software.getTechnicalName(); - String html = StatoolInfosWeb.instance().getHtmlCache().get(key); - if (html == null) + // Get parameters. + // =============== + Software software = StatoolInfosWeb.instance().getSoftwareFromPathinfo(request.getPathInfo()); + + // Use parameters. + // =============== + Federation federation = StatoolInfosWeb.instance().getFederation(); + UptimeJournal uptimes = StatoolInfosWeb.instance().getUptimeJournal(); + + // Send response. + // ============== + String headerView = FederationHeaderView.htmlize(federation, uptimes); + + if (software == null) + { + throw new StatoolInfosWebException("Illegal software name."); + } + else { Services services = federation.getServices().getBy(software); String contentView = htmlize(software, services); @@ -95,13 +94,12 @@ public class SoftwarePage extends HttpServlet trail.add("Logiciels", "/federation/softwares/"); html = WebCharterView.build(headerView, contentView, trail); - StatoolInfosWeb.instance().getHtmlCache().put(key, html); + StatoolInfosWeb.instance().getHtmlCache().put(request, html); } - - // Display page. - response.setContentType("application/xhtml+xml; charset=UTF-8"); - response.getWriter().println(html); } + // Display page. + response.setContentType("application/xhtml+xml; charset=UTF-8"); + response.getWriter().println(html); } catch (StatoolInfosWebException exception) {