aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv/egovernment
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-03-27 08:27:59 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-03-27 08:27:59 +0100
commitfbef393b54c7f320502ccd5b9fade8891fe5bb33 (patch)
treed3b0d3f62666648a121e28582d3cff09b10f6c4a /id/ConfigWebTool/src/main/java/at/gv/egovernment
parent02134974770c3f868dd3df540362f50d0083d0ff (diff)
parentfbb4e4346e7f8cd5a910f72a12272c0ea3b6ba32 (diff)
downloadmoa-id-spss-fbef393b54c7f320502ccd5b9fade8891fe5bb33.tar.gz
moa-id-spss-fbef393b54c7f320502ccd5b9fade8891fe5bb33.tar.bz2
moa-id-spss-fbef393b54c7f320502ccd5b9fade8891fe5bb33.zip
Merge branch 'moa2_0_tlenz' of gitlab.iaik.tugraz.at:afitzek/moa-idspss into moa2_0_tlenz
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java33
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java1
2 files changed, 34 insertions, 0 deletions
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..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
@@ -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,8 @@ public class OASTORKConfig {
private boolean vidpEnabled = false;
private List<AttributeProviderPlugin> attributeProviderPlugins = new ArrayList<AttributeProviderPlugin>();
private boolean requireConsent = false;
+ private List<String> citizenCountries;
+ private List<String> enabledCitizenCountries;
public OASTORKConfig() {
@@ -72,6 +75,15 @@ 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<String>();
+ for(CPEPS current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()) {
+ citizenCountries.add(current.getCountryCode());
+ }
+ enabledCitizenCountries = new ArrayList<String>();
+ for(CPEPS current : config.getCPEPS())
+ enabledCitizenCountries.add(current.getCountryCode());
// prepare attribute helper list
attributes = new ArrayList<AttributeHelper>();
@@ -153,6 +165,27 @@ public class OASTORKConfig {
this.attributes = attributes;
}
+ public List<String> getAvailableCitizenCountries() {
+ return citizenCountries;
+ }
+
+ public List<String> getEnabledCitizenCountries() {
+ return enabledCitizenCountries;
+ }
+
+ public void setEnabledCitizenCountries(List<String> update) {
+ enabledCitizenCountries = update;
+ }
+
+ public List<CPEPS> getEnabledCPEPS() {
+ List<CPEPS> result = new ArrayList<CPEPS>();
+ for(CPEPS current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()) {
+ if(enabledCitizenCountries.contains(current.getCountryCode()))
+ result.add(current);
+ }
+ return result;
+ }
+
public List<String> 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) {