aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-09-19 19:32:36 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-09-19 19:32:36 +0200
commit1984a9914bb024bdd7b486ec6dd6ba4144c0c70b (patch)
tree42481e5e1d71bf24e90a6689c359af037b1b8248 /id/ConfigWebTool
parentf52976e984450d6802067acad12a0b8143f4ce75 (diff)
downloadmoa-id-spss-1984a9914bb024bdd7b486ec6dd6ba4144c0c70b.tar.gz
moa-id-spss-1984a9914bb024bdd7b486ec6dd6ba4144c0c70b.tar.bz2
moa-id-spss-1984a9914bb024bdd7b486ec6dd6ba4144c0c70b.zip
Reload MOAMetadataProvider after config changes
Diffstat (limited to 'id/ConfigWebTool')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java38
1 files changed, 37 insertions, 1 deletions
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 f160e3e51..cd34d382b 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
@@ -4,6 +4,7 @@ import java.io.IOException;
import java.math.BigInteger;
import java.security.cert.CertificateException;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
@@ -19,6 +20,7 @@ import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA;
import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS;
import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber;
+import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
import at.gv.egovernment.moa.id.commons.db.dao.config.MOAKeyBoxSelector;
import at.gv.egovernment.moa.id.commons.db.dao.config.Mandates;
import at.gv.egovernment.moa.id.commons.db.dao.config.OAPVP2;
@@ -297,7 +299,9 @@ ServletResponseAware {
if (!authUser.isAdmin()) {
onlineapplication.setIsAdminRequired(true);
+
}
+
} else {
if (!authUser.isAdmin() &&
@@ -332,6 +336,22 @@ ServletResponseAware {
} catch (ConfigurationException e) {
log.warn("Sending Mail to User " + userdb.getMail() + " failed", e);
}
+ }
+ }
+
+ if (pvp2OA.getMetaDataURL() != null) {
+
+ try {
+ if (newentry || !pvp2OA.getMetaDataURL()
+ .equals(onlineapplication.getAuthComponentOA().getOAPVP2().getMetadataURL())) {
+
+ MOAIDConfiguration moaconfig = ConfigurationDBRead.getMOAIDConfiguration();
+ moaconfig.setPvp2RefreshItem(new Date());
+ ConfigurationDBUtils.saveOrUpdate(moaconfig);
+
+ }
+ } catch (Throwable e) {
+ log.info("Found no MetadataURL in OA-Databaseconfig!", e);
}
}
@@ -348,6 +368,8 @@ ServletResponseAware {
}
}
+
+
Object nextPageAttr = session.getAttribute(Constants.SESSION_RETURNAREA);
if (nextPageAttr != null && nextPageAttr instanceof String) {
@@ -479,8 +501,22 @@ ServletResponseAware {
}
OnlineApplication onlineapplication = ConfigurationDBRead.getOnlineApplication(oaidentifier);
-
request.getSession().setAttribute(Constants.SESSION_OAID, null);
+
+
+ try {
+ if (MiscUtil.isNotEmpty(onlineapplication.getAuthComponentOA().getOAPVP2().getMetadataURL())) {
+
+ MOAIDConfiguration moaconfig = ConfigurationDBRead.getMOAIDConfiguration();
+ moaconfig.setPvp2RefreshItem(new Date());
+ ConfigurationDBUtils.saveOrUpdate(moaconfig);
+
+ }
+ } catch (Throwable e) {
+ log.info("Found no MetadataURL in OA-Databaseconfig!", e);
+ }
+
+
if (ConfigurationDBUtils.delete(onlineapplication)) {
if (!authUser.isAdmin()) {