diff options
Diffstat (limited to 'id/ConfigWebTool/src/main')
4 files changed, 87 insertions, 1 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java index d0b108e1e..51c6e8aa4 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java @@ -1,5 +1,48 @@ package at.gv.egovernment.moa.id.configuration.data; +import java.util.ArrayList; +import java.util.List; + +import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral; +import at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS; +import at.gv.egovernment.moa.id.commons.db.dao.config.ForeignIdentities; +import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration; +import at.gv.egovernment.moa.id.commons.db.dao.config.STORK; + public class GeneralStorkConfig { + private List<CPEPS> cpepslist; + + public void parse(MOAIDConfiguration config) { + + if (config != null) { + AuthComponentGeneral auth = config.getAuthComponentGeneral(); + + if (auth != null) { + ForeignIdentities foreign = auth.getForeignIdentities(); + + if (foreign != null) { + STORK stork = foreign.getSTORK(); + if (stork != null) { + // deep clone to foreclose lazyloading session timeouts + cpepslist = new ArrayList<CPEPS>(); + for(CPEPS current : stork.getCPEPS()) { + cpepslist.add(current); + } + } + } + } + } + } + + public List<CPEPS> getCpepslist() { + return cpepslist; + } + + public void setCpepslist(List<CPEPS> cpepslist) { + this.cpepslist = cpepslist; + } + + + } diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java index 61ab3cecd..b4ae27c6a 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java @@ -48,6 +48,7 @@ import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.configuration.Constants; import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser; import at.gv.egovernment.moa.id.configuration.data.GeneralMOAIDConfig; +import at.gv.egovernment.moa.id.configuration.data.GeneralStorkConfig; import at.gv.egovernment.moa.id.configuration.helper.LanguageHelper; import at.gv.egovernment.moa.id.configuration.validation.moaconfig.MOAConfigValidator; import at.gv.egovernment.moa.id.util.Random; @@ -65,7 +66,8 @@ public class EditGeneralConfigAction extends ActionSupport private AuthenticatedUser authUser; private GeneralMOAIDConfig moaconfig; - + private GeneralStorkConfig storkconfig; + private String formID; public String loadConfig() { @@ -84,6 +86,8 @@ public class EditGeneralConfigAction extends ActionSupport moaconfig = new GeneralMOAIDConfig(); moaconfig.parse(dbconfig); + storkconfig = new GeneralStorkConfig(); + storkconfig.parse(dbconfig); ConfigurationDBUtils.closeSession(); @@ -531,6 +535,24 @@ public class EditGeneralConfigAction extends ActionSupport public void setMoaconfig(GeneralMOAIDConfig moaconfig) { this.moaconfig = moaconfig; } + + /** + * Gets the storkconfig. + * + * @return the storkconfig + */ + public GeneralStorkConfig getStorkconfig() { + return storkconfig; + } + + /** + * Sets the storkconfig. + * + * @param storkconfig the new storkconfig + */ + public void setStorkconfig(GeneralStorkConfig storkconfig) { + this.storkconfig = storkconfig; + } /** * @return the formID diff --git a/id/ConfigWebTool/src/main/resources/applicationResources.properties b/id/ConfigWebTool/src/main/resources/applicationResources.properties index fa955e944..5751783ae 100644 --- a/id/ConfigWebTool/src/main/resources/applicationResources.properties +++ b/id/ConfigWebTool/src/main/resources/applicationResources.properties @@ -224,6 +224,9 @@ webpages.oaconfig.sso.usesso=Single Sign-On verwenden webpages.oaconfig.stork.header=Secure idenTity acrOss boRders linKed webpages.oaconfig.stork.usestork=STORK Logon aktivieren +webpages.moaconfig.stork.pepslist=C-PEPS Konfiguration +webpages.moaconfig.stork.newpeps=Neuen PEPS konfigurieren +webpages.moaconfig.stork.removepeps=l\u00F6schen webpages.oaconfig.protocols.saml1.header=SAML1 Konfiguration webpages.oaconfig.saml1.isActice=SAML1 aktivieren diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp index 05f4a1106..52fc79b68 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp @@ -227,6 +227,24 @@ </div> <div class="oa_config_block"> + <h3><%=LanguageHelper.getGUIString("webpages.oaconfig.stork.header", request) %></h3> + <h4><%=LanguageHelper.getGUIString("webpages.moaconfig.stork.pepslist", request) %></h4> + <table> + <tr><th>Country Shortcode</th><th>PEPS URL</th> + <s:iterator value="storkconfig.cpepslist"> + <tr><td><s:textfield name="countryCode" value="%{countryCode}" cssClass="textfield_short"/></td> + <td><s:textfield name="URL" value="%{URL}" cssClass="textfield_long"/></td> + <td><input type="button" value="<%=LanguageHelper.getGUIString("webpages.moaconfig.stork.removepeps", request) %>" onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);'/></td></tr> + </s:iterator> + <tr id="template" style="display: none;"><td><s:textfield name="countryCode" value="%{countryCode}" cssClass="textfield_short"/></td> + <td><s:textfield name="URL" value="%{URL}" cssClass="textfield_long"/></td> + <td><input type="button" value="<%=LanguageHelper.getGUIString("webpages.moaconfig.stork.removepeps", request) %>" onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);'/></td></tr> + + </table> + <input type="button" value="<%=LanguageHelper.getGUIString("webpages.moaconfig.stork.newpeps", request) %>" onclick='var target = document.getElementById("template"); var clone = target.cloneNode(true); clone.style=""; target.parentNode.appendChild(clone);' /> + </div> + + <div class="oa_config_block"> <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.protocols.header", request) %></h3> <div id="moageneral_legacy_protocol" class="moageneral_protocol_area"> |