aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Knall <t.knall@datentechnik-innovation.com>2015-02-06 11:09:59 +0100
committerThomas Knall <t.knall@datentechnik-innovation.com>2015-02-06 11:09:59 +0100
commit271e22add71f0260f5d421844a2171a09093f505 (patch)
tree991b167c7fb101beef613675d4256ac00d14842e
parentc1af54026407f7150d2a61d15e9719ae878c7375 (diff)
downloadmoa-id-spss-271e22add71f0260f5d421844a2171a09093f505.tar.gz
moa-id-spss-271e22add71f0260f5d421844a2171a09093f505.tar.bz2
moa-id-spss-271e22add71f0260f5d421844a2171a09093f505.zip
Code cleanup
- Set moa-id version to 2.2.0-SNAPSHOT. - Fix Javadoc syntax issues in newly added classes. - Add warning log when executing deprecated auth sources.
-rw-r--r--id/server/doc/handbook/moduledevinfo/moduledevinfo.html4
-rw-r--r--id/server/idserverlib/pom.xml28
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorWithLocalSigningServlet.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java8
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java6
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngine.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/SpringWebExpressionEvaluator.java1
-rw-r--r--pom.xml5
15 files changed, 51 insertions, 30 deletions
diff --git a/id/server/doc/handbook/moduledevinfo/moduledevinfo.html b/id/server/doc/handbook/moduledevinfo/moduledevinfo.html
index 6897e36d0..801bfcce6 100644
--- a/id/server/doc/handbook/moduledevinfo/moduledevinfo.html
+++ b/id/server/doc/handbook/moduledevinfo/moduledevinfo.html
@@ -110,7 +110,7 @@
<a name="uebersicht" id="uebersicht">1 &Uuml;bersicht</a>
</h1>
<p>
- MOA-ID ab Version 2.3 erm&ouml;glicht die dynamische Erweiterung um zus&auml;tzliche Funktionalit&auml;t durch die Nutzung der
+ MOA-ID ab Version 2.2 erm&ouml;glicht die dynamische Erweiterung um zus&auml;tzliche Funktionalit&auml;t durch die Nutzung der
integrierten Modularchitektur.<br/>
Entwickler k&ouml;nnen nun eigene Prozesse, um die MOA-ID erweitert werden soll, definieren (z.B. Unterst&uuml;tzung
eines speziellen Authentifizierungsworkflows, Erweiterung um Vollmachten oder ausl&auml;ndische Identit&auml;ten etc).
@@ -367,7 +367,7 @@ at.gv.egovernment.moa.id.auth.modules.mymodule.MyAuthModuleImpl</pre>
</h1>
<p>
Um einzelne Funktionen als Plug-In umzusetzen, muss nicht unbedingt ein ganzer Prozess definiert werden. MOA-ID ab
- Version 2.3 unterst&uuml;tzt die Servlet 3.0 API, was u.a. den Einsatz von <code>@WebServlet</code>-Annotations erm&ouml;glicht.
+ Version 2.2 unterst&uuml;tzt die Servlet 3.0 API, was u.a. den Einsatz von <code>@WebServlet</code>-Annotations erm&ouml;glicht.
Damit entf&auml;llt eine statische Registrierung von Servlets im <code>web.xml</code>.
</p>
<p>Am Beispiel des MonitoringServlets (<code>at.gv.egovernment.moa.id.auth.servlet.MonitoringServlet</code>), das als
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
index c0021f25e..8045ed8da 100644
--- a/id/server/idserverlib/pom.xml
+++ b/id/server/idserverlib/pom.xml
@@ -26,6 +26,13 @@
</repositories>
<dependencies>
+ <!-- TestNG -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.1.1</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>eu.stork</groupId>
<artifactId>oasis-dss-api</artifactId>
@@ -549,6 +556,27 @@
</executions>
</plugin>
+ <!-- enable co-existence of testng and junit -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
+ <configuration>
+ <threadCount>1</threadCount>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit47</artifactId>
+ <version>${surefire.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-testng</artifactId>
+ <version>${surefire.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
</plugins>
</build>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java
index 36d6ea555..dcea3a1dd 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java
@@ -27,7 +27,7 @@ import at.gv.egovernment.moa.logging.Logger;
* <ul>
* <li>Renames the moa session id.</li>
* <li>Creates {@code CreateXMLSignatureRequest} for auth block signature.</li>
- * <li>Responds with {@code CreateXMLSignatureRequest} (for CCE), {@code DataURL} is {@code {/VerifyAuthBlock}</li>
+ * <li>Responds with {@code CreateXMLSignatureRequest} (for CCE), {@code DataURL} is {@code /VerifyAuthBlock}</li>
* </ul>
* Expects:
* <ul>
@@ -35,7 +35,7 @@ import at.gv.egovernment.moa.logging.Logger;
* </ul>
* Result:
* <ul>
- * <li>Responds with {@code CreateXMLSignatureRequest} (for CCE), {@code DataURL} is {@code {/VerifyAuthBlock}</li>
+ * <li>Responds with {@code CreateXMLSignatureRequest} (for CCE), {@code DataURL} is {@code /VerifyAuthBlock}</li>
* </ul>
* Code taken from {@link at.gv.egovernment.moa.id.auth.servlet.VerifyIdentityLinkServlet}.
* @see #execute(ExecutionContext, HttpServletRequest, HttpServletResponse)
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java
index 64899565b..41c2a9c6a 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java
@@ -136,9 +136,7 @@ public class GetForeignIDServlet extends AuthServlet {
Logger.debug("POST GetForeignIDServlet");
- if (System.currentTimeMillis() > 0) {
- throw new IllegalStateException(getClass().getName() + " should not be called any more.");
- }
+ Logger.warn(getClass().getName() + " is deprecated and should not be used any more.");
resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java
index ffd01299e..043b660c1 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java
@@ -137,9 +137,7 @@ public class GetMISSessionIDServlet extends AuthServlet {
Logger.debug("POST GetMISSessionIDServlet");
- if (System.currentTimeMillis() > 0) {
- throw new IllegalStateException(getClass().getName() + " should not be called any more.");
- }
+ Logger.warn(getClass().getName() + " is deprecated and should not be used any more.");
resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,
MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java
index af4b7ffbb..e45418b4b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java
@@ -138,6 +138,8 @@ public class PEPSConnectorServlet extends AuthServlet {
try {
+ Logger.warn(getClass().getName() + " is deprecated and should not be used any more.");
+
Logger.info("PEPSConnector Servlet invoked, expecting C-PEPS message.");
Logger.debug("This ACS endpoint is: " + HTTPUtils.getBaseURL(request));
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorWithLocalSigningServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorWithLocalSigningServlet.java
index c01a356f6..337a9ed31 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorWithLocalSigningServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorWithLocalSigningServlet.java
@@ -132,6 +132,8 @@ public class PEPSConnectorWithLocalSigningServlet extends AuthServlet {
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
+ Logger.warn(getClass().getName() + " is deprecated and should not be used any more.");
+
String moaSessionID1 = request.getParameter("moaSessionID");
String signResponse = request.getParameter("signresponse");
Logger.info("moaSessionID1:"+moaSessionID1);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java
index a40c7982b..a99b7aeef 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessEngineSignalServlet.java
@@ -9,11 +9,9 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringEscapeUtils;
import at.gv.egovernment.moa.id.auth.AuthenticationServer;
-import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils;
-import at.gv.egovernment.moa.id.process.ProcessInstance;
import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
/**
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java
index 67c42cd07..a8fe71485 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java
@@ -153,19 +153,15 @@ public class VerifyAuthenticationBlockServlet extends AuthServlet {
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
- if (System.currentTimeMillis() > 0) {
- throw new IllegalStateException(getClass().getName() + " should not be called any more.");
- }
Logger.debug("POST VerifyAuthenticationBlock");
+ Logger.warn(getClass().getName() + " is deprecated and should not be used any more.");
+
resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
- if (System.currentTimeMillis() > 0) {
- throw new IllegalStateException(getClass().getName() + " should not be called any more.");
- }
String pendingRequestID = null;
Map<String, String> parameters;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
index 82cdb2778..2aa717a65 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
@@ -126,11 +126,10 @@ public class VerifyCertificateServlet extends AuthServlet {
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
- if (System.currentTimeMillis() > 0) {
- throw new IllegalStateException(getClass().getName() + " should not be called any more.");
- }
Logger.debug("POST VerifyCertificateServlet");
+ Logger.warn(getClass().getName() + " is deprecated and should not be used any more.");
+
resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java
index 6f2ee2d89..b8e57ed43 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java
@@ -134,11 +134,9 @@ public class VerifyIdentityLinkServlet extends AuthServlet {
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
- if (System.currentTimeMillis() > 0) {
- throw new IllegalStateException(getClass().getName() + " should not be called any more.");
- }
-
Logger.debug("POST VerifyIdentityLink");
+
+ Logger.warn(getClass().getName() + " is deprecated and should not be used any more.");
Map<String, String> parameters;
String pendingRequestID = null;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngine.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngine.java
index 032cb6369..5cf84abed 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngine.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngine.java
@@ -50,7 +50,7 @@ public interface ProcessEngine {
* Creates a process instance according to the referenced process definition, persists it into the database and returns it identifier.
* <p/>
* Note that the method returns the identifier of a process instance which will be needed in order to start a process or to continue
- * process execution after asynchronous task execution (refer to {@link #start(String))} and
+ * process execution after asynchronous task execution (refer to {@link #start(String)} and
* {@link #signal(String)} for further information).
*
* @param processDefinitionId
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java
index 92ffe11db..57ce70c08 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java
@@ -21,7 +21,7 @@ public interface ProcessInstanceStoreDAO {
* {@code processInstanceID} from the database, or {@code null} if the
* object could not be found.
*
- * @param processInstanceID
+ * @param processInstanceId
* the id of the {@code ProcessInstanceStore} to retrieve.
* @return a ProcessInstanceStore, or {@code null}.
* @throws MOADatabaseException
@@ -33,7 +33,7 @@ public interface ProcessInstanceStoreDAO {
* Deletes the {@link ProcessInstance} corresponding with the
* {@code processInstanceId}.
*
- * @param processInstanceID
+ * @param processInstanceId
* the id of the {@code ProcessInstance} to be deleted.
* @throws MOADatabaseException
* is thrown if a problem occurs while accessing the database.
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/SpringWebExpressionEvaluator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/SpringWebExpressionEvaluator.java
index 9dd7bc61e..499e86fa0 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/SpringWebExpressionEvaluator.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/SpringWebExpressionEvaluator.java
@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.expression.BeanFactoryResolver;
import org.springframework.expression.Expression;
+import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;
diff --git a/pom.xml b/pom.xml
index 8bcbe8154..ecd22a778 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,13 +22,14 @@
-->
<moa-commons-version>2.0.2-SNAPSHOT</moa-commons-version>
- <moa-id-version>3.0.0-SNAPSHOT</moa-id-version>
+ <moa-id-version>2.2.0-SNAPSHOT</moa-id-version>
<moa-id-proxy-version>2.0.1-SNAPSHOT</moa-id-proxy-version>
<moa-spss-version>2.0.4-SNAPSHOT</moa-spss-version>
<configtool-version>1.1.5-SNAPSHOT</configtool-version>
<demo-oa-version>2.0.3-SNAPSHOT</demo-oa-version>
<org.springframework.version>4.1.4.RELEASE</org.springframework.version>
+ <surefire.version>2.18.1</surefire.version>
</properties>
@@ -101,7 +102,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.17</version>
+ <version>${surefire.version}</version>
<configuration>
<excludes>
<exclude>eu/stork/peps/test/simple/SimpleBaseTest.java</exclude>