aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java75
1 files changed, 62 insertions, 13 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
index ba58701fc..7510b8932 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
@@ -37,6 +37,7 @@ 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.MandatesProfileNameItem;
import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType;
import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
@@ -58,17 +59,19 @@ public class OAGeneralConfig {
private String friendlyName = null;
private boolean businessService = false;
-
- private String target = null;
+ private boolean storkService = false;
+
+ private String target = null;
private String target_subsector = null;
private String target_admin = null;
private static List<String> targetList = null;
private String targetFriendlyName = null;
private boolean isAdminTarget = false;
-
+
private String identificationNumber = null;
private String identificationType = null;
private static List<String> identificationTypeList = null;
+ private String storkSPTargetCountry = null;
private String aditionalAuthBlockText = null;
@@ -118,7 +121,8 @@ public class OAGeneralConfig {
identificationTypeList = Arrays.asList(
Constants.IDENIFICATIONTYPE_FN,
Constants.IDENIFICATIONTYPE_ZVR,
- Constants.IDENIFICATIONTYPE_ERSB);
+ Constants.IDENIFICATIONTYPE_ERSB,
+ Constants.IDENIFICATIONTYPE_STORK);
}
@@ -159,8 +163,17 @@ public class OAGeneralConfig {
businessService = true;
else
businessService = false;
-
- AuthComponentOA oaauth = dbOAConfig.getAuthComponentOA();
+
+ if (dbOAConfig.getType().equals(Constants.MOA_CONFIG_STORKSERVICE))
+ storkService = true;
+ else
+ storkService = false;
+
+ if (dbOAConfig.getStorkSPTargetCountry() != null)
+ storkSPTargetCountry = dbOAConfig.getStorkSPTargetCountry();
+
+
+ AuthComponentOA oaauth = dbOAConfig.getAuthComponentOA();
if (oaauth != null) {
BKUURLS bkuurls = oaauth.getBKUURLS();
@@ -205,22 +218,42 @@ public class OAGeneralConfig {
if (Constants.PREFIX_WPBK.startsWith(split[0]) && split.length >= 2) {
identificationType = split[1];
identificationNumber = split[2];
- }
+ } else if (Constants.PREFIX_STORK.startsWith(split[0]) && split.length >= 2) {
+ identificationType = split[1]; // setting at as iden category ?
+ identificationNumber = split[2]; // setting sp country as ident type -> sp ident
+ }
}
}
Mandates mandates = oaauth.getMandates();
if (mandates != null) {
- if (MiscUtil.isNotEmpty(mandates.getProfiles())) {
- mandateProfiles = mandates.getProfiles();
- useMandates = true;
+ mandateProfiles = null;
+
+ List<MandatesProfileNameItem> profileList = mandates.getProfileNameItems();
+ for (MandatesProfileNameItem el : profileList) {
+ if (mandateProfiles == null)
+ mandateProfiles = el.getItem();
- } else {
- mandateProfiles = new String();
- useMandates = false;
+ else
+ mandateProfiles += "," + el.getItem();
}
+ //TODO: only for RC1
+ if (MiscUtil.isNotEmpty(mandates.getProfiles())) {
+ if (mandateProfiles == null)
+ mandateProfiles = mandates.getProfiles();
+
+ else
+ mandateProfiles += "," + mandates.getProfiles();
+
+ }
+
+ if (mandateProfiles != null)
+ useMandates = true;
+
+ else
+ useMandates = false;
}
@@ -301,6 +334,14 @@ public class OAGeneralConfig {
return identificationNumber;
}
+ public String getStorkSPTargetCountry() {
+ return storkSPTargetCountry;
+ }
+
+ public void setStorkSPTargetCountry(String storkSPTargetCountry) {
+ this.storkSPTargetCountry = storkSPTargetCountry;
+ }
+
public void setIdentificationNumber(String identificationNumber) {
this.identificationNumber = identificationNumber;
}
@@ -341,6 +382,14 @@ public class OAGeneralConfig {
return businessService;
}
+ public boolean isStorkService() {
+ return storkService;
+ }
+
+ public void setStorkService(boolean storkService) {
+ this.storkService = storkService;
+ }
+
public void setBusinessService(boolean businessService) {
this.businessService = businessService;
}