aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorThomas Knall <t.knall@datentechnik-innovation.com>2015-02-04 15:37:10 +0100
committerThomas Knall <t.knall@datentechnik-innovation.com>2015-02-04 15:37:10 +0100
commit74a42b6128f6f8d21a65dddb9405cd52ebbc0520 (patch)
tree05d0eb7fcdf45600810102b1204217955634d110 /id
parenta9dc7e094a8732f9826ab77648758dd39adc7324 (diff)
downloadmoa-id-spss-74a42b6128f6f8d21a65dddb9405cd52ebbc0520.tar.gz
moa-id-spss-74a42b6128f6f8d21a65dddb9405cd52ebbc0520.tar.bz2
moa-id-spss-74a42b6128f6f8d21a65dddb9405cd52ebbc0520.zip
Create exemplary AuthServlet module (MOAID-68)
- Create new module moa-id-module-monitoring. - Move MonitoringServlet, DatabaseTestModule, IdentityLinkTestModule, TestManager and TestModuleInterface to new module. - Update pom.xml, adding new module dependency. - Update web.xml, disabling static servlet registration. - Add @WebServlet servlet registration for MonitoringServlet.
Diffstat (limited to 'id')
-rw-r--r--id/server/auth/pom.xml8
-rw-r--r--id/server/auth/src/main/webapp/WEB-INF/web.xml3
-rw-r--r--id/server/modules/module-monitoring/pom.xml22
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java (renamed from id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java)10
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java (renamed from id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java)0
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java (renamed from id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java)0
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java (renamed from id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java)0
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestModuleInterface.java (renamed from id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestModuleInterface.java)0
-rw-r--r--id/server/modules/pom.xml1
9 files changed, 42 insertions, 2 deletions
diff --git a/id/server/auth/pom.xml b/id/server/auth/pom.xml
index df45568dc..cf394b7ad 100644
--- a/id/server/auth/pom.xml
+++ b/id/server/auth/pom.xml
@@ -137,10 +137,18 @@
<artifactId>oasis-dss-api</artifactId>
<version>1.0.0-RELEASE</version>
</dependency>
+
+ <!-- Adding stork module dependency automatically adds stork capabilities. -->
<dependency>
<groupId>MOA.id.server.modules</groupId>
<artifactId>moa-id-module-stork</artifactId>
</dependency>
+
+ <!-- Adding monitoring module dependency automatically adds monitoring capabilities. -->
+ <dependency>
+ <groupId>MOA.id.server.modules</groupId>
+ <artifactId>moa-id-module-monitoring</artifactId>
+ </dependency>
<!-- transitive dependencies we don't want to include into the war -->
<dependency>
diff --git a/id/server/auth/src/main/webapp/WEB-INF/web.xml b/id/server/auth/src/main/webapp/WEB-INF/web.xml
index 930b10f43..5afc0dee7 100644
--- a/id/server/auth/src/main/webapp/WEB-INF/web.xml
+++ b/id/server/auth/src/main/webapp/WEB-INF/web.xml
@@ -67,6 +67,8 @@
<url-pattern>/RedirectServlet</url-pattern>
</servlet-mapping>
+ <!-- automatically registered by module 'moa-id-module-monitoring' using @WebServlet annotation -->
+ <!--
<servlet>
<display-name>MonitoringServlet</display-name>
<servlet-name>MonitoringServlet</servlet-name>
@@ -76,6 +78,7 @@
<servlet-name>MonitoringServlet</servlet-name>
<url-pattern>/MonitoringServlet</url-pattern>
</servlet-mapping>
+ -->
<servlet>
<display-name>SSOSendAssertionServlet</display-name>
diff --git a/id/server/modules/module-monitoring/pom.xml b/id/server/modules/module-monitoring/pom.xml
new file mode 100644
index 000000000..60ab6b6c0
--- /dev/null
+++ b/id/server/modules/module-monitoring/pom.xml
@@ -0,0 +1,22 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>MOA.id.server.modules</groupId>
+ <artifactId>moa-id-modules</artifactId>
+ <version>${moa-id-version}</version>
+ </parent>
+
+ <groupId>MOA.id.server.modules</groupId>
+ <artifactId>moa-id-module-monitoring</artifactId>
+ <version>${moa-id-version}</version>
+ <packaging>jar</packaging>
+
+ <name>MOA ID-Module Monitoring</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../../repository</repositoryPath>
+ </properties>
+
+</project>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java
index e04f97e6e..1c1cbb723 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java
@@ -28,6 +28,7 @@ import java.util.Arrays;
import java.util.List;
import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -37,13 +38,18 @@ import at.gv.egovernment.moa.id.monitoring.TestManager;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.MiscUtil;
+@WebServlet(name = "MonitoringServlet", value = "/MonitoringServlet")
public class MonitoringServlet extends AuthServlet {
private static final long serialVersionUID = 1L;
private static final String REQUEST_ATTR_MODULE = "module";
-
- protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ public MonitoringServlet() {
+ super();
+ Logger.debug("Registering servlet " + getClass().getName() + " with mapping '/MonitoringServlet'.");
+ }
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
try {
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java
index a08ef5f0c..a08ef5f0c 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java
index b5220914c..b5220914c 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
index 84581abe8..84581abe8 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestModuleInterface.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestModuleInterface.java
index 4e26b1ce8..4e26b1ce8 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/monitoring/TestModuleInterface.java
+++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestModuleInterface.java
diff --git a/id/server/modules/pom.xml b/id/server/modules/pom.xml
index 64b1b57b4..e9234a62f 100644
--- a/id/server/modules/pom.xml
+++ b/id/server/modules/pom.xml
@@ -21,6 +21,7 @@
<modules>
<module>module-stork</module>
+ <module>module-monitoring</module>
</modules>
<dependencies>