aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at
diff options
context:
space:
mode:
authorThomas Knall <t.knall@datentechnik-innovation.com>2015-02-05 16:56:04 +0100
committerThomas Knall <t.knall@datentechnik-innovation.com>2015-02-05 16:56:04 +0100
commitb864faef2864cc28df98d778e2221bf2cf911954 (patch)
treea6f3dac9f7fec884d1149573d8c587056340b288 /id/server/idserverlib/src/main/java/at
parent63fb8960f4a72f9185d2dc4735d8bae602463e1c (diff)
downloadmoa-id-spss-b864faef2864cc28df98d778e2221bf2cf911954.tar.gz
moa-id-spss-b864faef2864cc28df98d778e2221bf2cf911954.tar.bz2
moa-id-spss-b864faef2864cc28df98d778e2221bf2cf911954.zip
Perform some cleanup tasks
- Rename AbstractSpringWebSupportedTask to MoaIdTask. - Remove some unnecessary code.
Diffstat (limited to 'id/server/idserverlib/src/main/java/at')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngine.java1
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/MoaIdTask.java (renamed from id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/AbstractSpringWebSupportedTask.java)2
5 files changed, 5 insertions, 16 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java
index 3b20e85d7..67ddd170a 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/AbstractAuthServletTask.java
@@ -32,7 +32,7 @@ import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.servlet.AuthServlet;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.entrypoints.DispatcherServlet;
-import at.gv.egovernment.moa.id.process.springweb.AbstractSpringWebSupportedTask;
+import at.gv.egovernment.moa.id.process.springweb.MoaIdTask;
import at.gv.egovernment.moa.id.storage.DBExceptionStoreImpl;
import at.gv.egovernment.moa.id.storage.IExceptionStore;
import at.gv.egovernment.moa.id.util.ServletUtils;
@@ -43,7 +43,7 @@ import at.gv.egovernment.moa.util.MiscUtil;
* Task based counterpart to {@link AuthServlet}, providing the same utility methods (error handling, parameter parsing
* etc.).</p> The code has been taken from {@link AuthServlet}.
*/
-public abstract class AbstractAuthServletTask extends AbstractSpringWebSupportedTask {
+public abstract class AbstractAuthServletTask extends MoaIdTask {
protected static final String ERROR_CODE_PARAM = "errorid";
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 ff6ec969e..032cb6369 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
@@ -2,7 +2,6 @@ package at.gv.egovernment.moa.id.process;
import java.io.InputStream;
-import java.io.Serializable;
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import at.gv.egovernment.moa.id.process.model.ProcessDefinition;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java
index 650bae44e..0ffa22ec3 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/ProcessEngineImpl.java
@@ -115,13 +115,10 @@ public class ProcessEngineImpl implements ProcessEngine {
@Override
public void start(String processInstanceId) throws ProcessExecutionException {
- boolean mdcEntryAdded = false;
-
try {
ProcessInstance pi = loadProcessInstance(processInstanceId);
MDC.put(MDC_CTX_PI_NAME, pi.getId());
- mdcEntryAdded = true;
if (!ProcessInstanceState.NOT_STARTED.equals(pi.getState())) {
throw new ProcessExecutionException("Process instance '" + pi.getId() + "' has already been started (current state is " + pi.getState() + ").");
@@ -136,21 +133,17 @@ public class ProcessEngineImpl implements ProcessEngine {
throw new ProcessExecutionException("Unable to load/save process instance.", e);
} finally {
- if (mdcEntryAdded)
- MDC.remove(MDC_CTX_PI_NAME);
+ MDC.remove(MDC_CTX_PI_NAME);
}
}
@Override
public void signal(String processInstanceId) throws ProcessExecutionException {
- boolean mdcEntryAdded = false;
-
try {
ProcessInstance pi = loadProcessInstance(processInstanceId);
MDC.put(MDC_CTX_PI_NAME, pi.getId());
- mdcEntryAdded = true;
if (!ProcessInstanceState.SUSPENDED.equals(pi.getState())) {
throw new ProcessExecutionException("Process instance '" + pi.getId() + "' has not been suspended (current state is " + pi.getState() + ").");
@@ -165,8 +158,7 @@ public class ProcessEngineImpl implements ProcessEngine {
throw new ProcessExecutionException("Unable to load/save process instance.", e);
} finally {
- if (mdcEntryAdded)
- MDC.remove(MDC_CTX_PI_NAME);
+ MDC.remove(MDC_CTX_PI_NAME);
}
}
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 6f8a8c66c..92ffe11db 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
@@ -1,7 +1,5 @@
package at.gv.egovernment.moa.id.process.dao;
-import java.util.List;
-
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.process.ProcessInstance;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/AbstractSpringWebSupportedTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/MoaIdTask.java
index c9262cea9..bae6391ec 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/AbstractSpringWebSupportedTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/springweb/MoaIdTask.java
@@ -33,7 +33,7 @@ import at.gv.egovernment.moa.id.process.api.Task;
* @author tknall
*
*/
-public abstract class AbstractSpringWebSupportedTask implements Task {
+public abstract class MoaIdTask implements Task {
/**
* Executes the task providing the underlying {@link ExecutionContext} {@code executionContext} as well as the