aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-10-31 11:11:29 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-10-31 11:11:29 +0100
commitd624a3ec33b8e3a4e80aa64f05caa8df5d1fcb42 (patch)
tree87f17a0fb3fbd4bde255627e0059b1f64dc42893 /id/ConfigWebTool/src/main
parenta12bbb135540bd2b62e4a8d6f4614dd1dbe5ea12 (diff)
downloadmoa-id-spss-d624a3ec33b8e3a4e80aa64f05caa8df5d1fcb42.tar.gz
moa-id-spss-d624a3ec33b8e3a4e80aa64f05caa8df5d1fcb42.tar.bz2
moa-id-spss-d624a3ec33b8e3a4e80aa64f05caa8df5d1fcb42.zip
fix MOA-IDP stored twince
Diffstat (limited to 'id/ConfigWebTool/src/main')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java12
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java2
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java2
3 files changed, 9 insertions, 7 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
index 415e1c957..5a9787069 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
@@ -142,7 +142,7 @@ public class BasicOAAction extends BasicAction {
session.setAttribute(Constants.SESSION_BKUFORMPREVIEW, null);
}
- protected OnlineApplication postProcessSaveOnlineApplication(OnlineApplication onlineapplication ) throws BasicOAActionException {
+ protected OnlineApplication postProcessSaveOnlineApplication(OnlineApplication onlineapplication, boolean persistOA) throws BasicOAActionException {
if (onlineapplication == null) {
onlineapplication = new OnlineApplication();
onlineapplication.setIsNew(true);
@@ -186,7 +186,7 @@ public class BasicOAAction extends BasicAction {
}
//save OA configuration
- String error = saveOAConfigToDatabase(onlineapplication);
+ String error = saveOAConfigToDatabase(onlineapplication, persistOA);
if (MiscUtil.isNotEmpty(error)) {
log.warn("OA configuration can not be stored!");
addActionError(error);
@@ -395,7 +395,7 @@ public class BasicOAAction extends BasicAction {
}
}
- private String saveOAConfigToDatabase(OnlineApplication dboa) {
+ private String saveOAConfigToDatabase(OnlineApplication dboa, boolean persistOA) {
for (IOnlineApplicationData form : formList.values())
form.store(dboa, authUser, request);
@@ -412,12 +412,14 @@ public class BasicOAAction extends BasicAction {
ConfigurationDBUtils.saveOrUpdate(user);
} else {
- ConfigurationDBUtils.save(dboa);
+ if (persistOA)
+ ConfigurationDBUtils.save(dboa);
}
} else
- ConfigurationDBUtils.saveOrUpdate(dboa);
+ if (persistOA)
+ ConfigurationDBUtils.saveOrUpdate(dboa);
} catch (MOADatabaseException e) {
log.warn("Online-Application can not be stored.", e);
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 4cd556b75..1da948eec 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -217,7 +217,7 @@ public class EditOAAction extends BasicOAAction {
} else {
try {
- onlineapplication = postProcessSaveOnlineApplication(onlineapplication);
+ onlineapplication = postProcessSaveOnlineApplication(onlineapplication, true);
} catch (BasicOAActionException e) {
addActionError(e.getStrutsError());
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
index 89dce3200..b92b17217 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
@@ -265,7 +265,7 @@ public class InterfederationIDPAction extends BasicOAAction {
return Constants.STRUTS_ERROR_VALIDATION;
} else {
- onlineapplication = postProcessSaveOnlineApplication(onlineapplication);
+ onlineapplication = postProcessSaveOnlineApplication(onlineapplication, false);
//set default Target interfederated nameID caluclation
if (getPvp2OA() != null) {