From 5eb2500909f82759d114f910ca37393e3f8639ba Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 25 Mar 2014 15:34:05 +0100 Subject: list available CPEPS countries in OA config --- .../moa/id/configuration/data/oa/OASTORKConfig.java | 11 +++++++++++ id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'id/ConfigWebTool/src') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java index d5355a421..c9d4fc2ee 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java @@ -28,6 +28,7 @@ import java.util.List; import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead; import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA; +import at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS; import at.gv.egovernment.moa.id.commons.db.dao.config.OASTORK; import at.gv.egovernment.moa.id.commons.db.dao.config.OAStorkAttribute; import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; @@ -48,6 +49,7 @@ public class OASTORKConfig { private boolean vidpEnabled = false; private List attributeProviderPlugins = new ArrayList(); private boolean requireConsent = false; + private List citizenCountries; public OASTORKConfig() { @@ -72,6 +74,11 @@ public class OASTORKConfig { // if there is no configuration available for the OA, get the default qaa level setQaa(ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getQualityAuthenticationAssuranceLevel()); } + + // fetch available citizen countries + citizenCountries = new ArrayList(ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()); + + // prepare attribute helper list attributes = new ArrayList(); @@ -153,6 +160,10 @@ public class OASTORKConfig { this.attributes = attributes; } + public List getAvailableCitizenCountries() { + return citizenCountries; + } + public List getAvailableAttributeProviderPlugins() { return AttributeProviderFactory.getAvailablePlugins(); } diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp index d5396d06e..ac433a47a 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp @@ -388,6 +388,10 @@ name="storkOA.qaa" key="webpages.moaconfig.stork.qaa" labelposition="left" /> +

wählbare Zielländer

+ + +

<%=LanguageHelper.getGUIString("webpages.oaconfig.stork.attributes.header", request) %>

@@ -747,4 +751,4 @@ - \ No newline at end of file + -- cgit v1.2.3 From 489f9404bf0f37692946e992614c5515d1af935d Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 25 Mar 2014 16:27:19 +0100 Subject: selection gets reported to config --- .../id/configuration/data/oa/OASTORKConfig.java | 22 +++++++++++++++++----- .../src/main/webapp/jsp/editOAGeneral.jsp | 4 +--- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'id/ConfigWebTool/src') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java index c9d4fc2ee..12d7faac6 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java @@ -49,7 +49,8 @@ public class OASTORKConfig { private boolean vidpEnabled = false; private List attributeProviderPlugins = new ArrayList(); private boolean requireConsent = false; - private List citizenCountries; + private List citizenCountries; + private List enabledCitizenCountries; public OASTORKConfig() { @@ -76,9 +77,12 @@ public class OASTORKConfig { } // fetch available citizen countries - citizenCountries = new ArrayList(ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()); - - +// citizenCountries = new ArrayList(ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()); + citizenCountries = new ArrayList(); + for(CPEPS current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()) { + citizenCountries.add(current.getCountryCode()); + } + enabledCitizenCountries = new ArrayList(citizenCountries.subList(2, 4)); // prepare attribute helper list attributes = new ArrayList(); @@ -160,10 +164,18 @@ public class OASTORKConfig { this.attributes = attributes; } - public List getAvailableCitizenCountries() { + public List getAvailableCitizenCountries() { return citizenCountries; } + public List getEnabledCitizenCountries() { + return enabledCitizenCountries; + } + + public void setEnabledCitizenCountries(List update) { + enabledCitizenCountries = update; + } + public List getAvailableAttributeProviderPlugins() { return AttributeProviderFactory.getAvailablePlugins(); } diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp index ac433a47a..cd3eca67d 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp @@ -389,9 +389,7 @@ key="webpages.moaconfig.stork.qaa" labelposition="left" />

wählbare Zielländer

- - - +

<%=LanguageHelper.getGUIString("webpages.oaconfig.stork.attributes.header", request) %>

<%=LanguageHelper.getGUIString("webpages.oaconfig.stork.attributes.used", request) %>
-- cgit v1.2.3 From 0925ae4c43b9eddfa6815c57b4e041d48600efea Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 25 Mar 2014 16:39:46 +0100 Subject: persist cpeps per oa config --- .../egovernment/moa/id/configuration/data/oa/OASTORKConfig.java | 9 +++++++++ .../moa/id/configuration/struts/action/EditOAAction.java | 1 + 2 files changed, 10 insertions(+) (limited to 'id/ConfigWebTool/src') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java index 12d7faac6..482c7a13b 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java @@ -176,6 +176,15 @@ public class OASTORKConfig { enabledCitizenCountries = update; } + public List getEnabledCPEPS() { + List result = new ArrayList(); + for(CPEPS current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()) { + if(enabledCitizenCountries.contains(current.getCountryCode())) + result.add(current); + } + return result; + } + public List getAvailableAttributeProviderPlugins() { return AttributeProviderFactory.getAvailablePlugins(); } 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 78747eca6..0ff60a656 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 @@ -1043,6 +1043,7 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware, stork.setVidpEnabled(storkOA.isVidpEnabled()); stork.setRequireConsent(storkOA.isRequireConsent()); stork.setAttributeProviders(storkOA.getAttributeProviderPlugins()); + stork.setCPEPS(storkOA.getEnabledCPEPS()); try { if (newentry) { -- cgit v1.2.3 From 8e6117d85cb13bacdbf11c74340bc529155fdf53 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 25 Mar 2014 16:40:07 +0100 Subject: read cpeps per oa config from database --- .../gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'id/ConfigWebTool/src') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java index 482c7a13b..9eca86976 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java @@ -77,12 +77,13 @@ public class OASTORKConfig { } // fetch available citizen countries -// citizenCountries = new ArrayList(ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()); citizenCountries = new ArrayList(); for(CPEPS current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()) { citizenCountries.add(current.getCountryCode()); } - enabledCitizenCountries = new ArrayList(citizenCountries.subList(2, 4)); + enabledCitizenCountries = new ArrayList(); + for(CPEPS current : config.getCPEPS()) + enabledCitizenCountries.add(current.getCountryCode()); // prepare attribute helper list attributes = new ArrayList(); -- cgit v1.2.3 From a78c899b4394ac889e9102c6314fe55207c4106a Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 25 Mar 2014 16:43:15 +0100 Subject: activated translation --- id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/ConfigWebTool/src') diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp index cd3eca67d..ebdacc7a7 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp @@ -388,7 +388,7 @@ name="storkOA.qaa" key="webpages.moaconfig.stork.qaa" labelposition="left" /> -

wählbare Zielländer

+

<%=LanguageHelper.getGUIString("webpages.oaconfig.stork.enabledcpeps", request) %>

<%=LanguageHelper.getGUIString("webpages.oaconfig.stork.attributes.header", request) %>

<%=LanguageHelper.getGUIString("webpages.oaconfig.stork.attributes.used", request) %>
-- cgit v1.2.3