diff options
author | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2014-10-31 16:26:19 +0100 |
---|---|---|
committer | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2014-10-31 16:26:19 +0100 |
commit | bce35f534b42d77cdaf1ab8e861237d1cf2f1191 (patch) | |
tree | 4daf3b9a89647ff08ddd6414b7ccddd59db5e5d5 /id/ConfigWebTool | |
parent | 9c6fece57add83ce29e6ba1acc55a11d2ed89fc0 (diff) | |
parent | 2886006ba2ca141377e66a330df5fc52797c2755 (diff) | |
download | moa-id-spss-bce35f534b42d77cdaf1ab8e861237d1cf2f1191.tar.gz moa-id-spss-bce35f534b42d77cdaf1ab8e861237d1cf2f1191.tar.bz2 moa-id-spss-bce35f534b42d77cdaf1ab8e861237d1cf2f1191.zip |
Merge branch 'merge' into moa-2.1-Snapshot
Diffstat (limited to 'id/ConfigWebTool')
7 files changed, 48 insertions, 15 deletions
diff --git a/id/ConfigWebTool/.gitignore b/id/ConfigWebTool/.gitignore new file mode 100644 index 000000000..4dc009173 --- /dev/null +++ b/id/ConfigWebTool/.gitignore @@ -0,0 +1,2 @@ +/target +/bin diff --git a/id/ConfigWebTool/pom.xml b/id/ConfigWebTool/pom.xml index ec027b497..18bd1306b 100644 --- a/id/ConfigWebTool/pom.xml +++ b/id/ConfigWebTool/pom.xml @@ -83,16 +83,20 @@ <dependency> <groupId>at.gv.util</groupId> <artifactId>egovutils</artifactId> - <version>1.0.7</version> + <version>2.0.0</version> <exclusions> <exclusion> - <groupId>com.sun</groupId> + <groupId>org.apache.cxf</groupId> <artifactId>*</artifactId> </exclusion> <exclusion> <groupId>org.slf4j</groupId> <artifactId>*</artifactId> </exclusion> + <exclusion> + <artifactId>bcprov-jdk16</artifactId> + <groupId>bouncycastle</groupId> + </exclusion> </exclusions> </dependency> <!-- <dependency> @@ -109,6 +113,14 @@ <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> </exclusion> + <exclusion> + <groupId>org.apache.xerces</groupId> + <artifactId>*</artifactId> + </exclusion> + <exclusion> + <groupId>xalan</groupId> + <artifactId>*</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -119,6 +131,14 @@ <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> </exclusion> + <exclusion> + <groupId>org.apache.xerces</groupId> + <artifactId>*</artifactId> + </exclusion> + <exclusion> + <groupId>xalan</groupId> + <artifactId>*</artifactId> + </exclusion> </exclusions> </dependency> 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 9c1cb90e0..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,15 +395,13 @@ 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); try { - if (dboa.isIsNew()) { - ConfigurationDBUtils.save(dboa); - + if (dboa.isIsNew()) { if (!authUser.isAdmin()) { UserDatabase user = ConfigurationDBRead.getUserWithID(authUser.getUserID()); @@ -412,9 +410,16 @@ public class BasicOAAction extends BasicAction { useroas.add(dboa); ConfigurationDBUtils.saveOrUpdate(user); + + } else { + 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 1893b0f60..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()); @@ -346,8 +346,11 @@ public class EditOAAction extends BasicOAAction { ConfigurationDBUtils.saveOrUpdate(moaconfig); } + } catch (NullPointerException e) { + log.debug("Found no MetadataURL in OA-Databaseconfig"); + } catch (Throwable e) { - log.info("Found no MetadataURL in OA-Databaseconfig!", e); + log.info("Set metadata refresh flag FAILED.", e); } if (ConfigurationDBUtils.delete(onlineapplication)) { 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..eead280be 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 @@ -263,9 +263,10 @@ public class InterfederationIDPAction extends BasicOAAction { formID = Random.nextRandom(); session.setAttribute(Constants.SESSION_FORMID, formID); return Constants.STRUTS_ERROR_VALIDATION; - + } else { - onlineapplication = postProcessSaveOnlineApplication(onlineapplication); + onlineapplication = postProcessSaveOnlineApplication(onlineapplication, + !(this instanceof MOAIDPAction)); //set default Target interfederated nameID caluclation if (getPvp2OA() != null) { diff --git a/id/ConfigWebTool/src/main/resources/struts.xml b/id/ConfigWebTool/src/main/resources/struts.xml index 31f3889de..39c38ae43 100644 --- a/id/ConfigWebTool/src/main/resources/struts.xml +++ b/id/ConfigWebTool/src/main/resources/struts.xml @@ -155,7 +155,7 @@ <action name="newOA" method="newOA" class="at.gv.egovernment.moa.id.configuration.struts.action.EditOAAction"> <result name="editOA">/jsp/editOAGeneral.jsp</result> - <result name="success" type="chain">main</result> + <result name="success">/jsp/mainpage.jsp</result> <result name="error">/error.jsp</result> <result name="reauthentication" type="redirectAction"> <param name="actionName">logout</param> diff --git a/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp b/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp index 954bf9b8b..0cd861884 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp @@ -38,7 +38,9 @@ <div class="oa_config_block"> <h3><%=LanguageHelper.getGUIString("webpages.openadminrequests.oas.header", request) %></h3> - <jsp:include page="snippets/oas_list.jsp"></jsp:include> + <s:include value="snippets/oas_list.jsp"> + <s:param name="editAction">loadOA</s:param> + </s:include> </div> </s:if> |