diff --git a/.classpath b/.classpath
index 6c32ed5..3791c69 100644
--- a/.classpath
+++ b/.classpath
@@ -16,5 +16,10 @@
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
index 7f1aabf..58bd15c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/build/
*~
+/.apt_generated/
diff --git a/.settings/org.eclipse.jdt.apt.core.prefs b/.settings/org.eclipse.jdt.apt.core.prefs
new file mode 100644
index 0000000..fa6bcfb
--- /dev/null
+++ b/.settings/org.eclipse.jdt.apt.core.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.apt.aptEnabled=true
+org.eclipse.jdt.apt.genSrcDir=.apt_generated
+org.eclipse.jdt.apt.genTestSrcDir=.apt_generated_tests
+org.eclipse.jdt.apt.reconcileEnabled=true
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 2c0ff1c..47d1f70 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -21,6 +21,7 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
@@ -30,7 +31,7 @@ org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
org.eclipse.jdt.core.formatter.align_with_spaces=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
-org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=0
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49
@@ -356,7 +357,7 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
@@ -379,7 +380,7 @@ org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.lineSplit=200
+org.eclipse.jdt.core.formatter.lineSplit=150
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0
diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs
index 7c333a7..3f114b4 100644
--- a/.settings/org.eclipse.jdt.ui.prefs
+++ b/.settings/org.eclipse.jdt.ui.prefs
@@ -25,9 +25,9 @@ cleanup.comparison_statement=false
cleanup.controlflow_merge=false
cleanup.convert_functional_interfaces=false
cleanup.convert_to_enhanced_for_loop=false
-cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false
+cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true
cleanup.convert_to_switch_expressions=false
-cleanup.correct_indentation=true
+cleanup.correct_indentation=false
cleanup.do_while_rather_than_while=true
cleanup.double_negation=false
cleanup.else_if=false
@@ -82,7 +82,7 @@ cleanup.redundant_comparator=false
cleanup.redundant_falling_through_block_end=false
cleanup.remove_private_constructors=true
cleanup.remove_redundant_modifiers=false
-cleanup.remove_redundant_semicolons=false
+cleanup.remove_redundant_semicolons=true
cleanup.remove_redundant_type_arguments=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
@@ -139,18 +139,18 @@ cleanup.use_var=false
cleanup.useless_continue=false
cleanup.useless_return=false
cleanup.valueof_rather_than_instantiation=false
-cleanup_profile=_StaoolInfos
+cleanup_profile=_StatoolInfosWeb
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_StatoolInfos
+formatter_profile=_StatoolInfosWeb
formatter_settings_version=23
jautodoc.cleanup.add_header=false
jautodoc.cleanup.javadoc=false
jautodoc.cleanup.replace_header=false
org.eclipse.jdt.ui.exception.name=exception
org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.keywordthis=true
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.text.custom_code_templates=
sp_cleanup.add_all=false
@@ -213,7 +213,7 @@ sp_cleanup.no_string_creation=false
sp_cleanup.no_super=false
sp_cleanup.number_suffix=false
sp_cleanup.objects_equals=false
-sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false
sp_cleanup.operand_factorization=false
sp_cleanup.organize_imports=true
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 18e52a2..b784e19 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -1,23 +1,38 @@
-
-
-
-
-
-
-
-
-
- uses
-
-
- uses
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ uses
+
+
+
+
+
+ uses
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/fr/devinsy/statoolinfosweb/StatoolInfosWeb.java b/src/fr/devinsy/statoolinfosweb/StatoolInfosWeb.java
index 14c6e33..8796ef3 100644
--- a/src/fr/devinsy/statoolinfosweb/StatoolInfosWeb.java
+++ b/src/fr/devinsy/statoolinfosweb/StatoolInfosWeb.java
@@ -30,10 +30,11 @@ import org.apache.commons.lang3.exception.ExceptionUtils;
import fr.devinsy.kiss4web.EnvironmentInformation;
import fr.devinsy.kiss4web.Kiss4web;
import fr.devinsy.kiss4web.Kiss4web.Mode;
+import fr.devinsy.kiss4web.dispatcher.KissDispatcher;
import fr.devinsy.kiss4web.dispatcher.hooks.BlankHook;
import fr.devinsy.kiss4web.dispatcher.hooks.FolderHook;
+import fr.devinsy.kiss4web.dispatcher.hooks.Hook;
import fr.devinsy.kiss4web.dispatcher.hooks.HookRegister;
-import fr.devinsy.kiss4web.dispatcher.hooks.RewriteHook;
import fr.devinsy.kiss4web.dispatcher.hooks.RootHook;
import fr.devinsy.kiss4web.dispatcher.hooks.WebContentHook;
import fr.devinsy.kiss4web.dispatcher.hooks.WebInfHook;
@@ -64,6 +65,7 @@ public class StatoolInfosWeb
private static final StatoolInfosWeb instance = new StatoolInfosWeb();
}
+ private File configurationFile;
private BuildInformation buildInformation;
private StatoolInfosContext context;
@@ -91,7 +93,7 @@ public class StatoolInfosWeb
logInit(currentLog, "PASSED");
//
- File configurationFile = new EnvironmentInformation().getStatoolInfosConfigurationFile();
+ configurationFile = new EnvironmentInformation().getStatoolInfosConfigurationFile();
if (configurationFile == null)
{
throw new StatoolInfosWebException("StatoolInfos configuration file is null.");
@@ -120,62 +122,29 @@ public class StatoolInfosWeb
hooks.register(new BlankHook());
hooks.register(new RootHook());
- hooks.register(new RewriteHook("^/federation/logo.(jpg|png|gif|svg)$", "website.federation.LogoDo"));
- hooks.register(new RewriteHook("^/federation/[^./]+\\.properties$", "website.federation.PropertiesDo"));
- hooks.register(new RewriteHook("^/federation/categories/[^/]+\\.xhtml", "website.federation.categories.CategoryPage"));
- hooks.register(new RewriteHook("^/federation/exports/[^/]+\\.(csv|json|ods)", "website.federation.exports.ExportDo"));
- hooks.register(new RewriteHook("^/federation/metrics/summary.xhtml$", "website.federation.metrics.MetricSummaryPage"));
- hooks.register(new RewriteHook("^/federation/metrics/generic.xhtml$", "website.federation.metrics.MetricGenericPage"));
- hooks.register(new RewriteHook("^/federation/metrics/specific.xhtml$", "website.federation.metrics.MetricSpecificPage"));
- hooks.register(new RewriteHook("^/federation/metrics/web.xhtml$", "website.federation.metrics.MetricWebPage"));
+ hooks.register(KissDispatcher.instance().getAnnotationHooks());
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/$", "website.federation.organizations.organization.IndexPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/logo.(jpg|png|gif|svg)$", "website.federation.organizations.organization.LogoDo"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/[^./]+\\.properties$", "website.federation.organizations.organization.PropertiesDo"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/crawl.xhtml$", "website.federation.organizations.organization.CrawlPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/propertyAlert.xhtml$", "website.federation.organizations.organization.PropertyAlertPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/propertyCheck.xhtml$", "website.federation.organizations.organization.PropertyCheckPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services.xhtml$", "website.federation.organizations.organization.ServicesPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/stats.xhtml$", "website.federation.organizations.organization.StatsPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/uptime.xhtml$", "website.federation.organizations.organization.UptimePage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/softwares/", "website.federation.organizations.organization.softwares.IndexPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/softwares/[^/]+.xhtml", "website.federation.organizations.organization.softwares.SoftwarePage"));
-
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/metrics/", "website.federation.organizations.organization.metrics.IndexPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/metrics/summary.xhtml$", "website.federation.organizations.organization.metrics.MetricSummaryPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/metrics/generic.xhtml$", "website.federation.organizations.organization.metrics.MetricGenericPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/metrics/specific.xhtml$", "website.federation.organizations.organization.metrics.MetricSpecificPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/metrics/web.xhtml$", "website.federation.organizations.organization.metrics.MetricWebPage"));
-
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/$", "website.federation.organizations.organization.services.service.IndexPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/logo.(jpg|png|gif|svg)$", "website.federation.organizations.organization.services.service.LogoDo"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/[^./]+\\.properties$", "website.federation.organizations.organization.services.service.PropertiesDo"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/crawl.xhtml$", "website.federation.organizations.organization.services.service.CrawlPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/propertyAlert.xhtml$", "website.federation.organizations.organization.services.service.PropertyAlertPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/propertyCheck.xhtml$", "website.federation.organizations.organization.services.service.PropertyCheckPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/services.xhtml$", "website.federation.organizations.organization.services.service.ServicesPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/stats.xhtml$", "website.federation.organizations.organization.services.service.StatsPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/uptime.xhtml$", "website.federation.organizations.organization.services.service.UptimePage"));
-
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/metrics/", "website.federation.organizations.organization.services.service.metrics.IndexPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/metrics/summary.xhtml$",
- "website.federation.organizations.organization.services.service.metrics.MetricSummaryPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/metrics/generic.xhtml$",
- "website.federation.organizations.organization.services.service.metrics.MetricGenericPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/metrics/specific.xhtml$",
- "website.federation.organizations.organization.services.service.metrics.MetricSpecificPage"));
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/metrics/web.xhtml$",
- "website.federation.organizations.organization.services.service.metrics.MetricWebPage"));
-
- hooks.register(new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/", "website.federation.organizations.organization.services.service.softwares.IndexPage"));
- hooks.register(
- new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/", "website.federation.organizations.organization.services.service.softwares.IndexPage"));
- hooks.register(
- new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/index.xhtml", "website.federation.organizations.organization.services.service.softwares.IndexPage"));
- hooks.register(
- new RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/[^/]+.xhtml", "website.federation.organizations.organization.services.service.softwares.SoftwarePage"));
-
- hooks.register(new RewriteHook("^/federation/softwares/[^/]+\\.xhtml", "website.federation.softwares.SoftwarePage"));
+ // hooks.register(new
+ // RewriteHook("^/federation/organizations/[^/]+/softwares/",
+ // "website.federation.organizations.organization.softwares.IndexPage"));
+ // hooks.register(new
+ // RewriteHook("^/federation/organizations/[^/]+/softwares/[^/]+.xhtml",
+ // "website.federation.organizations.organization.softwares.SoftwarePage"));
+ // hooks.register(new
+ // RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/",
+ // "website.federation.organizations.organization.services.service.softwares.IndexPage"));
+ // hooks.register(
+ // new
+ // RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/",
+ // "website.federation.organizations.organization.services.service.softwares.IndexPage"));
+ // hooks.register(
+ // new
+ // RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/index.xhtml",
+ // "website.federation.organizations.organization.services.service.softwares.IndexPage"));
+ // hooks.register(
+ // new
+ // RewriteHook("^/federation/organizations/[^/]+/services/[^/]+/softwares/[^/]+.xhtml",
+ // "website.federation.organizations.organization.services.service.softwares.SoftwarePage"));
// hooks.register(new LongURLHook());
hooks.register(new FolderHook());
@@ -185,8 +154,23 @@ public class StatoolInfosWeb
hooks.register(new WebInfHook());
Kiss4web.instance().setModeCustom(hooks);
+
+ // System.out.println("AAAANNOTATION=" +
+ // website.federation.organizations.organization.IndexPage.class.isAnnotationPresent(fr.devinsy.kiss4web.dispatcher.annotation.KissServlet.class));
+ // website.federation.organizations.organization.IndexPage page =
+ // new website.federation.organizations.organization.IndexPage();
+ // System.out.println("REGEXXXXXXX=" +
+ // page.getClass().getAnnotation(KissServlet.class).value());
+
+ System.out.println("Annotation hooks:");
+ for (Hook hook : KissDispatcher.instance().getAnnotationHooks())
+ {
+ System.out.println(hook.toString());
+ }
}
- catch (Exception exception)
+ catch (
+
+ Exception exception)
{
logInit(currentLog, "FAILED");
logger.warn("StatoolInfosWeb INIT FAILED: " + exception.getMessage());
@@ -196,18 +180,10 @@ public class StatoolInfosWeb
}
/**
- * Log init.
+ * Gets the builds the information.
*
- * @param currentLogItem
- * the current log item
- * @param status
- * the status
+ * @return the builds the information
*/
- private static void logInit(final String currentLogItem, final String status)
- {
- logger.info(String.format("%s%s%s", currentLogItem, StringUtils.repeat('.', 40 - StringUtils.length(currentLogItem)), status));
- }
-
public BuildInformation getBuildInformation()
{
return this.buildInformation;
@@ -243,74 +219,6 @@ public class StatoolInfosWeb
return result;
}
- /**
- * Gets the configuration.
- *
- * @return the configuration
- */
- public Configuration getConfiguration()
- {
- Configuration result;
-
- result = this.context.getConfiguration();
-
- //
- return result;
- }
-
- /**
- * Gets the federation.
- *
- * @return the federation
- */
- public Federation getFederation()
- {
- Federation result;
-
- result = this.context.getFederation();
-
- //
- return result;
- }
-
- /**
- * Gets the organization from pathinfo.
- *
- * @param pathinfo
- * the pathinfo
- * @return the organization from pathinfo
- */
- public Organization getOrganizationFromPathinfo(String pathinfo)
- {
- Organization result;
-
- String technicalName = StatoolInfosWebUtils.unrewriteOrganizationTechnicalName(pathinfo);
-
- result = this.context.getFederation().getOrganizations().getByTechnicalName(technicalName);
-
- //
- return result;
- }
-
- /**
- * Gets the software from pathinfo.
- *
- * @param pathinfo
- * the pathinfo
- * @return the software from pathinfo
- */
- public Software getSoftwareFromPathinfo(String pathinfo)
- {
- Software result;
-
- String technicalName = StatoolInfosWebUtils.unrewriteSoftwareTechnicalName(pathinfo);
-
- result = this.context.getFederation().getSoftwares().get(technicalName);
-
- //
- return result;
- }
-
/**
* Gets the category from pathinfo.
*
@@ -331,66 +239,20 @@ public class StatoolInfosWeb
}
/**
- * Gets the service by technical name.
+ * Gets the configuration.
*
- * @param organizationTechnicalName
- * the organization technical name
- * @param serviceTechnicalName
- * the service technical name
- * @return the service by technical name
+ * @return the configuration
*/
- public Service getServiceByTechnicalName(String organizationTechnicalName, String serviceTechnicalName)
+ public Configuration getConfiguration()
{
- Service result;
+ Configuration result;
- Organization organization = this.context.getFederation().getOrganizations().getByTechnicalName(organizationTechnicalName);
- result = organization.getServices().getByTechnicalName(serviceTechnicalName);
+ result = this.context.getConfiguration();
//
return result;
}
- /**
- * Gets the service from pathinfo.
- *
- * @param pathinfo
- * the pathinfo
- * @return the service from pathinfo
- */
- public Service getServiceFromPathinfo(String pathinfo)
- {
- Service result;
-
- String[] data = StatoolInfosWebUtils.unrewriteServicePathinfo(pathinfo);
- String organizationTechnicalName = data[0];
- String serviceTechnicalName = data[1];
-
- result = getServiceByTechnicalName(organizationTechnicalName, serviceTechnicalName);
-
- //
- return result;
- }
-
- /**
- * Gets the uptime journal.
- *
- * @return the uptime journal
- */
- public UptimeJournal getUptimeJournal()
- {
- return this.context.getUptimeJournal();
- }
-
- /**
- * Instance.
- *
- * @return the manager
- */
- public static StatoolInfosWeb instance()
- {
- return SingletonHolder.instance;
- }
-
/**
* Gets the edito.
*
@@ -440,4 +302,131 @@ public class StatoolInfosWeb
//
return result;
}
+
+ /**
+ * Gets the federation.
+ *
+ * @return the federation
+ */
+ public Federation getFederation()
+ {
+ Federation result;
+
+ result = this.context.getFederation();
+
+ //
+ return result;
+ }
+
+ /**
+ * Gets the organization from pathinfo.
+ *
+ * @param pathinfo
+ * the pathinfo
+ * @return the organization from pathinfo
+ */
+ public Organization getOrganizationFromPathinfo(String pathinfo)
+ {
+ Organization result;
+
+ String technicalName = StatoolInfosWebUtils.unrewriteOrganizationTechnicalName(pathinfo);
+
+ result = this.context.getFederation().getOrganizations().getByTechnicalName(technicalName);
+
+ //
+ return result;
+ }
+
+ /**
+ * Gets the service by technical name.
+ *
+ * @param organizationTechnicalName
+ * the organization technical name
+ * @param serviceTechnicalName
+ * the service technical name
+ * @return the service by technical name
+ */
+ public Service getServiceByTechnicalName(String organizationTechnicalName, String serviceTechnicalName)
+ {
+ Service result;
+
+ Organization organization = this.context.getFederation().getOrganizations().getByTechnicalName(organizationTechnicalName);
+ result = organization.getServices().getByTechnicalName(serviceTechnicalName);
+
+ //
+ return result;
+ }
+
+ /**
+ * Gets the service from pathinfo.
+ *
+ * @param pathinfo
+ * the pathinfo
+ * @return the service from pathinfo
+ */
+ public Service getServiceFromPathinfo(String pathinfo)
+ {
+ Service result;
+
+ String[] data = StatoolInfosWebUtils.unrewriteServicePathinfo(pathinfo);
+ String organizationTechnicalName = data[0];
+ String serviceTechnicalName = data[1];
+
+ result = getServiceByTechnicalName(organizationTechnicalName, serviceTechnicalName);
+
+ //
+ return result;
+ }
+
+ /**
+ * Gets the software from pathinfo.
+ *
+ * @param pathinfo
+ * the pathinfo
+ * @return the software from pathinfo
+ */
+ public Software getSoftwareFromPathinfo(String pathinfo)
+ {
+ Software result;
+
+ String technicalName = StatoolInfosWebUtils.unrewriteSoftwareTechnicalName(pathinfo);
+
+ result = this.context.getFederation().getSoftwares().get(technicalName);
+
+ //
+ return result;
+ }
+
+ /**
+ * Gets the uptime journal.
+ *
+ * @return the uptime journal
+ */
+ public UptimeJournal getUptimeJournal()
+ {
+ return this.context.getUptimeJournal();
+ }
+
+ /**
+ * Instance.
+ *
+ * @return the manager
+ */
+ public static StatoolInfosWeb instance()
+ {
+ return SingletonHolder.instance;
+ }
+
+ /**
+ * Log init.
+ *
+ * @param currentLogItem
+ * the current log item
+ * @param status
+ * the status
+ */
+ private static void logInit(final String currentLogItem, final String status)
+ {
+ logger.info(String.format("%s%s%s", currentLogItem, StringUtils.repeat('.', 40 - StringUtils.length(currentLogItem)), status));
+ }
}
diff --git a/src/website/federation/LogoDo.java b/src/website/federation/LogoDo.java
index 61aedea..996c914 100644
--- a/src/website/federation/LogoDo.java
+++ b/src/website/federation/LogoDo.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import fr.devinsy.catgenerator.core.CatGenerator;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.crawl.CrawlCache;
import fr.devinsy.statoolinfos.util.URLUtils;
@@ -40,6 +41,7 @@ import jakarta.servlet.http.HttpServletResponse;
/**
* The Class LogoDo.
*/
+@KissServlet("^/federation/logo.(jpg|png|gif|svg)$")
public class LogoDo extends HttpServlet
{
private static final long serialVersionUID = -8274687319890495722L;
diff --git a/src/website/federation/PropertiesDo.java b/src/website/federation/PropertiesDo.java
index 0dae327..7d51915 100644
--- a/src/website/federation/PropertiesDo.java
+++ b/src/website/federation/PropertiesDo.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
import jakarta.servlet.ServletException;
@@ -35,6 +36,7 @@ import jakarta.servlet.http.HttpServletResponse;
/**
* The Class PropertiesDo.
*/
+@KissServlet("^/federation/[^./]+\\.properties$")
public class PropertiesDo extends HttpServlet
{
private static final long serialVersionUID = 2011776119103724440L;
diff --git a/src/website/federation/categories/CategoryPage.java b/src/website/federation/categories/CategoryPage.java
index 6d1c603..3b296cc 100644
--- a/src/website/federation/categories/CategoryPage.java
+++ b/src/website/federation/categories/CategoryPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Category;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.core.Services;
@@ -47,6 +48,7 @@ import website.views.ServiceListView;
/**
* The Class CategoryPage.
*/
+@KissServlet("^/federation/categories/[^/]+\\.xhtml")
public class CategoryPage extends HttpServlet
{
private static final long serialVersionUID = -8941975927886103680L;
diff --git a/src/website/federation/exports/ExportDo.java b/src/website/federation/exports/ExportDo.java
index 343eeb3..92b9afb 100644
--- a/src/website/federation/exports/ExportDo.java
+++ b/src/website/federation/exports/ExportDo.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Categories;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.io.CSVFile;
@@ -43,6 +44,7 @@ import website.charter.ErrorView;
/**
* The Class ExportDo.
*/
+@KissServlet("^/federation/exports/[^/]+\\.(csv|json|ods)")
public class ExportDo extends HttpServlet
{
private static final long serialVersionUID = -5777871435901453590L;
diff --git a/src/website/federation/metrics/MetricGenericPage.java b/src/website/federation/metrics/MetricGenericPage.java
index 4780844..4c4be5b 100644
--- a/src/website/federation/metrics/MetricGenericPage.java
+++ b/src/website/federation/metrics/MetricGenericPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -48,6 +49,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricGenericPage.
*/
+@KissServlet("^/federation/metrics/generic.xhtml$")
public class MetricGenericPage extends HttpServlet
{
private static final long serialVersionUID = -336093970361316946L;
diff --git a/src/website/federation/metrics/MetricSpecificPage.java b/src/website/federation/metrics/MetricSpecificPage.java
index 7e70106..e803183 100644
--- a/src/website/federation/metrics/MetricSpecificPage.java
+++ b/src/website/federation/metrics/MetricSpecificPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
@@ -48,6 +49,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class FederationMetricSpecificPage.
*/
+@KissServlet("^/federation/metrics/specific.xhtml$")
public class MetricSpecificPage extends HttpServlet
{
private static final long serialVersionUID = -5683860151390848979L;
diff --git a/src/website/federation/metrics/MetricSummaryPage.java b/src/website/federation/metrics/MetricSummaryPage.java
index 75b3c08..3e43410 100644
--- a/src/website/federation/metrics/MetricSummaryPage.java
+++ b/src/website/federation/metrics/MetricSummaryPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
@@ -49,6 +50,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class FederationMetricSummaryPage.
*/
+@KissServlet("^/federation/metrics/summary.xhtml$")
public class MetricSummaryPage extends HttpServlet
{
private static final long serialVersionUID = 7230118796571304083L;
diff --git a/src/website/federation/metrics/MetricWebPage.java b/src/website/federation/metrics/MetricWebPage.java
index ae10f2b..f954dd1 100644
--- a/src/website/federation/metrics/MetricWebPage.java
+++ b/src/website/federation/metrics/MetricWebPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -48,6 +49,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class FederationMetricWebPage.
*/
+@KissServlet("^/federation/metrics/web.xhtml$")
public class MetricWebPage extends HttpServlet
{
private static final long serialVersionUID = 8775832114835327758L;
diff --git a/src/website/federation/organizations/organization/CrawlPage.java b/src/website/federation/organizations/organization/CrawlPage.java
index 1302726..33a852c 100644
--- a/src/website/federation/organizations/organization/CrawlPage.java
+++ b/src/website/federation/organizations/organization/CrawlPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -39,6 +40,7 @@ import website.views.CrawlView;
/**
* The Class CrawlJournalOrganizationPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/crawl.xhtml$")
public class CrawlPage extends HttpServlet
{
private static final long serialVersionUID = 7853379029845860784L;
diff --git a/src/website/federation/organizations/organization/IndexPage.java b/src/website/federation/organizations/organization/IndexPage.java
index 3e70a8f..fa7b1a8 100644
--- a/src/website/federation/organizations/organization/IndexPage.java
+++ b/src/website/federation/organizations/organization/IndexPage.java
@@ -21,6 +21,7 @@ package website.federation.organizations.organization;
import java.io.IOException;
import fr.devinsy.kiss4web.Redirector;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
import jakarta.servlet.ServletException;
@@ -32,6 +33,7 @@ import website.charter.ErrorView;
/**
* The Class IndexPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/$")
public class IndexPage extends HttpServlet
{
private static final long serialVersionUID = 2821248331871306876L;
diff --git a/src/website/federation/organizations/organization/LogoDo.java b/src/website/federation/organizations/organization/LogoDo.java
index 8caf177..b96541c 100644
--- a/src/website/federation/organizations/organization/LogoDo.java
+++ b/src/website/federation/organizations/organization/LogoDo.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import fr.devinsy.catgenerator.core.CatGenerator;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.crawl.CrawlCache;
import fr.devinsy.statoolinfos.util.URLUtils;
@@ -40,6 +41,7 @@ import jakarta.servlet.http.HttpServletResponse;
/**
* The Class LogoDo.
*/
+@KissServlet("^/federation/organizations/[^/]+/logo.(jpg|png|gif|svg)$")
public class LogoDo extends HttpServlet
{
private static final long serialVersionUID = -1543822343614877475L;
diff --git a/src/website/federation/organizations/organization/PropertiesDo.java b/src/website/federation/organizations/organization/PropertiesDo.java
index 4e53c87..185dad7 100644
--- a/src/website/federation/organizations/organization/PropertiesDo.java
+++ b/src/website/federation/organizations/organization/PropertiesDo.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
import jakarta.servlet.ServletException;
@@ -35,6 +36,7 @@ import jakarta.servlet.http.HttpServletResponse;
/**
* The Class PropertiesDo.
*/
+@KissServlet("^/federation/organizations/[^/]+/[^./]+\\.properties$")
public class PropertiesDo extends HttpServlet
{
private static final long serialVersionUID = 2011776119103724440L;
diff --git a/src/website/federation/organizations/organization/PropertyAlertPage.java b/src/website/federation/organizations/organization/PropertyAlertPage.java
index bf1d893..b14a205 100644
--- a/src/website/federation/organizations/organization/PropertyAlertPage.java
+++ b/src/website/federation/organizations/organization/PropertyAlertPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -39,6 +40,7 @@ import website.views.PropertyAlertView;
/**
* The Class OrganizationPropertyFileAlertPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/propertyAlert.xhtml$")
public class PropertyAlertPage extends HttpServlet
{
private static final long serialVersionUID = -3993435430180839228L;
diff --git a/src/website/federation/organizations/organization/PropertyCheckPage.java b/src/website/federation/organizations/organization/PropertyCheckPage.java
index 1886b82..137e63a 100644
--- a/src/website/federation/organizations/organization/PropertyCheckPage.java
+++ b/src/website/federation/organizations/organization/PropertyCheckPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -39,6 +40,7 @@ import website.views.PropertyCheckView;
/**
* The Class OrganizationPropertyFileCheckView.
*/
+@KissServlet("^/federation/organizations/[^/]+/propertyCheck.xhtml$")
public class PropertyCheckPage extends HttpServlet
{
private static final long serialVersionUID = 4502376450331214457L;
diff --git a/src/website/federation/organizations/organization/ServicesPage.java b/src/website/federation/organizations/organization/ServicesPage.java
index b2f8972..bf9c734 100644
--- a/src/website/federation/organizations/organization/ServicesPage.java
+++ b/src/website/federation/organizations/organization/ServicesPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -39,6 +40,7 @@ import website.views.ServiceListView;
/**
* The Class ServicesPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services.xhtml$")
public class ServicesPage extends HttpServlet
{
private static final long serialVersionUID = -2335594717538422436L;
diff --git a/src/website/federation/organizations/organization/StatsPage.java b/src/website/federation/organizations/organization/StatsPage.java
index a475861..7cf5c7b 100644
--- a/src/website/federation/organizations/organization/StatsPage.java
+++ b/src/website/federation/organizations/organization/StatsPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Services;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
@@ -47,6 +48,7 @@ import website.views.ChartViews;
/**
* The Class StatsPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/stats.xhtml$")
public class StatsPage extends HttpServlet
{
private static final long serialVersionUID = 2693926398275508310L;
diff --git a/src/website/federation/organizations/organization/UptimePage.java b/src/website/federation/organizations/organization/UptimePage.java
index 9e7a36e..3f8df55 100644
--- a/src/website/federation/organizations/organization/UptimePage.java
+++ b/src/website/federation/organizations/organization/UptimePage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -39,6 +40,7 @@ import website.views.UptimeView;
/**
* The Class OrganizationUptimePage.
*/
+@KissServlet("^/federation/organizations/[^/]+/uptime.xhtml$")
public class UptimePage extends HttpServlet
{
private static final long serialVersionUID = 5127514597658312329L;
diff --git a/src/website/federation/organizations/organization/metrics/IndexPage.java b/src/website/federation/organizations/organization/metrics/IndexPage.java
index f630255..0373f3d 100644
--- a/src/website/federation/organizations/organization/metrics/IndexPage.java
+++ b/src/website/federation/organizations/organization/metrics/IndexPage.java
@@ -21,6 +21,7 @@ package website.federation.organizations.organization.metrics;
import java.io.IOException;
import fr.devinsy.kiss4web.Redirector;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
import jakarta.servlet.ServletException;
@@ -32,6 +33,7 @@ import website.charter.ErrorView;
/**
* The Class IndexPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/metrics/")
public class IndexPage extends HttpServlet
{
private static final long serialVersionUID = 2794788000773558854L;
diff --git a/src/website/federation/organizations/organization/metrics/MetricGenericPage.java b/src/website/federation/organizations/organization/metrics/MetricGenericPage.java
index a55e757..603170f 100644
--- a/src/website/federation/organizations/organization/metrics/MetricGenericPage.java
+++ b/src/website/federation/organizations/organization/metrics/MetricGenericPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
@@ -49,6 +50,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricGenericPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/metrics/generic.xhtml$")
public class MetricGenericPage extends HttpServlet
{
private static final long serialVersionUID = -4940164173332474735L;
diff --git a/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java b/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java
index 8b80c02..c5301cc 100644
--- a/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java
+++ b/src/website/federation/organizations/organization/metrics/MetricSpecificPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -47,6 +48,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricSpecificPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/metrics/specific.xhtml$")
public class MetricSpecificPage extends HttpServlet
{
private static final long serialVersionUID = -4487103076137276432L;
diff --git a/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java b/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java
index 14619ae..b717c3a 100644
--- a/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java
+++ b/src/website/federation/organizations/organization/metrics/MetricSummaryPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
@@ -49,6 +50,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricSummaryPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/metrics/summary.xhtml$")
public class MetricSummaryPage extends HttpServlet
{
private static final long serialVersionUID = -7774639830678053490L;
diff --git a/src/website/federation/organizations/organization/metrics/MetricWebPage.java b/src/website/federation/organizations/organization/metrics/MetricWebPage.java
index cdc25e6..996f8fd 100644
--- a/src/website/federation/organizations/organization/metrics/MetricWebPage.java
+++ b/src/website/federation/organizations/organization/metrics/MetricWebPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -48,6 +49,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricWebPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/metrics/web.xhtml$")
public class MetricWebPage extends HttpServlet
{
private static final long serialVersionUID = -8920766780112028933L;
diff --git a/src/website/federation/organizations/organization/services/IndexPage.java b/src/website/federation/organizations/organization/services/IndexPage.java
index 60cdb78..cb2fefd 100644
--- a/src/website/federation/organizations/organization/services/IndexPage.java
+++ b/src/website/federation/organizations/organization/services/IndexPage.java
@@ -21,6 +21,7 @@ package website.federation.organizations.organization.services;
import java.io.IOException;
import fr.devinsy.kiss4web.Redirector;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -33,6 +34,7 @@ import website.charter.ErrorView;
/**
* The Class IndexPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/$")
public class IndexPage extends HttpServlet
{
private static final long serialVersionUID = -5951233202690068343L;
diff --git a/src/website/federation/organizations/organization/services/service/CrawlPage.java b/src/website/federation/organizations/organization/services/service/CrawlPage.java
index 503f1da..813e5ea 100644
--- a/src/website/federation/organizations/organization/services/service/CrawlPage.java
+++ b/src/website/federation/organizations/organization/services/service/CrawlPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
@@ -40,6 +41,7 @@ import website.views.CrawlView;
/**
* The Class CrawlPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/crawl.xhtml$")
public class CrawlPage extends HttpServlet
{
private static final long serialVersionUID = 7711286112554720912L;
diff --git a/src/website/federation/organizations/organization/services/service/LogoDo.java b/src/website/federation/organizations/organization/services/service/LogoDo.java
index b27c2c3..94af1a8 100644
--- a/src/website/federation/organizations/organization/services/service/LogoDo.java
+++ b/src/website/federation/organizations/organization/services/service/LogoDo.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import fr.devinsy.catgenerator.core.BirdGenerator;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.crawl.CrawlCache;
import fr.devinsy.statoolinfos.util.URLUtils;
@@ -40,6 +41,7 @@ import jakarta.servlet.http.HttpServletResponse;
/**
* The Class LogoDo.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/logo.(jpg|png|gif|svg)$")
public class LogoDo extends HttpServlet
{
private static final long serialVersionUID = -6159108918214689665L;
diff --git a/src/website/federation/organizations/organization/services/service/PropertiesDo.java b/src/website/federation/organizations/organization/services/service/PropertiesDo.java
index 34b6733..d842d79 100644
--- a/src/website/federation/organizations/organization/services/service/PropertiesDo.java
+++ b/src/website/federation/organizations/organization/services/service/PropertiesDo.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
import jakarta.servlet.ServletException;
@@ -35,6 +36,7 @@ import jakarta.servlet.http.HttpServletResponse;
/**
* The Class PropertiesDo.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/[^./]+\\.properties$")
public class PropertiesDo extends HttpServlet
{
private static final long serialVersionUID = 2011776119103724440L;
diff --git a/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java b/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java
index 1950b46..e7df87a 100644
--- a/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java
+++ b/src/website/federation/organizations/organization/services/service/PropertyAlertPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
@@ -40,6 +41,7 @@ import website.views.PropertyAlertView;
/**
* The Class PropertyAlertPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/propertyAlert.xhtml$")
public class PropertyAlertPage extends HttpServlet
{
private static final long serialVersionUID = 1909664271041998161L;
diff --git a/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java b/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java
index 7756f14..3105450 100644
--- a/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java
+++ b/src/website/federation/organizations/organization/services/service/PropertyCheckPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.uptime.UptimeJournal;
@@ -40,6 +41,7 @@ import website.views.PropertyCheckView;
/**
* The Class PropertyCheckPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/propertyCheck.xhtml$")
public class PropertyCheckPage extends HttpServlet
{
private static final long serialVersionUID = 9023877491741295660L;
diff --git a/src/website/federation/organizations/organization/services/service/ServicesPage.java b/src/website/federation/organizations/organization/services/service/ServicesPage.java
index 30ece53..357fb68 100644
--- a/src/website/federation/organizations/organization/services/service/ServicesPage.java
+++ b/src/website/federation/organizations/organization/services/service/ServicesPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.Services;
@@ -41,6 +42,7 @@ import website.views.ServiceListView;
/**
* The Class ServicesPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/services.xhtml$")
public class ServicesPage extends HttpServlet
{
private static final long serialVersionUID = -7825055903028045121L;
diff --git a/src/website/federation/organizations/organization/services/service/StatsPage.java b/src/website/federation/organizations/organization/services/service/StatsPage.java
index c44900d..7d098f9 100644
--- a/src/website/federation/organizations/organization/services/service/StatsPage.java
+++ b/src/website/federation/organizations/organization/services/service/StatsPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.Services;
@@ -48,6 +49,7 @@ import website.views.ChartViews;
/**
* The Class StatsPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/stats.xhtml$")
public class StatsPage extends HttpServlet
{
private static final long serialVersionUID = -7295638589683428352L;
diff --git a/src/website/federation/organizations/organization/services/service/UptimePage.java b/src/website/federation/organizations/organization/services/service/UptimePage.java
index 61025d9..3057471 100644
--- a/src/website/federation/organizations/organization/services/service/UptimePage.java
+++ b/src/website/federation/organizations/organization/services/service/UptimePage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.Services;
@@ -41,6 +42,7 @@ import website.views.UptimeView;
/**
* The Class UptimePage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/uptime.xhtml$")
public class UptimePage extends HttpServlet
{
private static final long serialVersionUID = -1383909448472707593L;
diff --git a/src/website/federation/organizations/organization/services/service/metrics/IndexPage.java b/src/website/federation/organizations/organization/services/service/metrics/IndexPage.java
index 3e81baa..1b4d8cd 100644
--- a/src/website/federation/organizations/organization/services/service/metrics/IndexPage.java
+++ b/src/website/federation/organizations/organization/services/service/metrics/IndexPage.java
@@ -21,6 +21,7 @@ package website.federation.organizations.organization.services.service.metrics;
import java.io.IOException;
import fr.devinsy.kiss4web.Redirector;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfosweb.StatoolInfosWeb;
@@ -33,6 +34,7 @@ import website.charter.ErrorView;
/**
* The Class IndexPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/metrics/")
public class IndexPage extends HttpServlet
{
private static final long serialVersionUID = 2794788000773558854L;
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 2cfdee6..ceecb75 100644
--- a/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java
+++ b/src/website/federation/organizations/organization/services/service/metrics/MetricGenericPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
@@ -50,6 +51,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricGenericPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/metrics/generic.xhtml$")
public class MetricGenericPage extends HttpServlet
{
private static final long serialVersionUID = -5178693752168992169L;
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 d996a1c..363ec02 100644
--- a/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java
+++ b/src/website/federation/organizations/organization/services/service/metrics/MetricSpecificPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
@@ -50,6 +51,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricSpecificPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/metrics/specific.xhtml$")
public class MetricSpecificPage extends HttpServlet
{
private static final long serialVersionUID = 7386092658784966221L;
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 d970786..4be85f6 100644
--- a/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java
+++ b/src/website/federation/organizations/organization/services/service/metrics/MetricSummaryPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
@@ -50,6 +51,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricSummaryPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/metrics/summary.xhtml$")
public class MetricSummaryPage extends HttpServlet
{
private static final long serialVersionUID = -2897466506555028353L;
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 c6413f0..a0d7ec7 100644
--- a/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java
+++ b/src/website/federation/organizations/organization/services/service/metrics/MetricWebPage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Organization;
import fr.devinsy.statoolinfos.core.Service;
import fr.devinsy.statoolinfos.core.StatoolInfosException;
@@ -50,6 +51,7 @@ import website.views.MetricMenuView.ViewMenu;
/**
* The Class MetricWebPage.
*/
+@KissServlet("^/federation/organizations/[^/]+/services/[^/]+/metrics/web.xhtml$")
public class MetricWebPage extends HttpServlet
{
private static final long serialVersionUID = -715467405788148758L;
diff --git a/src/website/federation/softwares/SoftwarePage.java b/src/website/federation/softwares/SoftwarePage.java
index 6e679c4..3c61d73 100644
--- a/src/website/federation/softwares/SoftwarePage.java
+++ b/src/website/federation/softwares/SoftwarePage.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import fr.devinsy.kiss4web.dispatcher.annotation.KissServlet;
import fr.devinsy.statoolinfos.core.Federation;
import fr.devinsy.statoolinfos.core.Services;
import fr.devinsy.statoolinfos.core.Software;
@@ -47,6 +48,7 @@ import website.views.ServiceListView;
/**
* The Class SoftwarePage.
*/
+@KissServlet("^/federation/softwares/[^/]+\\.xhtml")
public class SoftwarePage extends HttpServlet
{
private static final long serialVersionUID = -6466067659488945069L;
diff --git a/webapp/META-INF/services/javax.annotation.processing.Processor b/webapp/META-INF/services/javax.annotation.processing.Processor
new file mode 100644
index 0000000..b3b0d6a
--- /dev/null
+++ b/webapp/META-INF/services/javax.annotation.processing.Processor
@@ -0,0 +1 @@
+fr.devinsy.kiss4web.dispatcher.annotation.KissServletProcessor