aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java21
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java3
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java9
3 files changed, 23 insertions, 10 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 d9f2a4d85..f1cc4277c 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
@@ -40,10 +40,20 @@ public class OASTORKConfig {
private boolean isStorkLogonEnabled = false;
private int qaa;
- private List<AttributeHelper> attributes;
+ private List<AttributeHelper> attributes = null;
+ /*
+ * VIDP settings below
+ */
+ private boolean vidpEnabled = false;
+ private List<AttributeProviderPlugin> attributeProviderPlugins = new ArrayList<AttributeProviderPlugin>();
+ private boolean requireConsent = false;
+
public OASTORKConfig() {
-
+ if (attributeProviderPlugins.isEmpty()) {
+ attributeProviderPlugins.add(new AttributeProviderPlugin());
+ }
+
}
/**
@@ -146,13 +156,6 @@ public class OASTORKConfig {
this.attributes = attributes;
}
- /*
- * VIDP settings below
- */
- private boolean vidpEnabled = false;
- private List<AttributeProviderPlugin> attributeProviderPlugins = new ArrayList<AttributeProviderPlugin>();
- private boolean requireConsent;
-
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 e5d84d461..80f74ff54 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
@@ -219,6 +219,9 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware,
ConfigurationDBUtils.closeSession();
+ //VIDP attribute provider configuration
+ storkOA = new OASTORKConfig();
+
newOA = true;
formID = Random.nextRandom();
session.setAttribute(Constants.SESSION_FORMID, formID);
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java
index 067e85aa6..9e877605e 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java
@@ -56,8 +56,15 @@ public class OASTORKConfigValidation {
}
if (MiscUtil.isEmpty(current.getName())) {
log.info("AttributeProviderPlugin Name is empty.");
- errors.add(LanguageHelper.getErrorString("validation.stork.ap.name.valid"));
+ errors.add(LanguageHelper.getErrorString("validation.stork.ap.name.empty"));
+
+ } else {
+ if (!oageneral.getAvailableAttributeProviderPlugins().contains(current.getName())) {
+ log.info("AttributeProviderPlugin Name is not supported.");
+ errors.add(LanguageHelper.getErrorString("validation.stork.ap.name.valid"));
+ }
}
+
if (MiscUtil.isEmpty(current.getAttributes()) || !current.getAttributes().matches("[a-zA-Z]+(, ?[a-zA-Z]+)*")) {
log.info("AttributeProviderPlugin attributes are empty or do not match csv format.");
errors.add(LanguageHelper.getErrorString("validation.stork.ap.attributes.valid"));