aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-25 08:45:04 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-25 08:47:39 +0100
commite220daf9bc0eac36c3e20406865f99f4760a30d3 (patch)
treef795eff3ac0fd8fd2e1c70bd9ccc153ebe3dcdd6 /id/ConfigWebTool/src/main/java
parenta48a02cf22ae3c021fd81d0d8050018bb535218e (diff)
downloadmoa-id-spss-e220daf9bc0eac36c3e20406865f99f4760a30d3.tar.gz
moa-id-spss-e220daf9bc0eac36c3e20406865f99f4760a30d3.tar.bz2
moa-id-spss-e220daf9bc0eac36c3e20406865f99f4760a30d3.zip
config validators
Diffstat (limited to 'id/ConfigWebTool/src/main/java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java14
1 files changed, 14 insertions, 0 deletions
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 f72999020..25e0d751c 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
@@ -27,8 +27,11 @@ import java.util.List;
import org.apache.log4j.Logger;
+import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin;
import at.gv.egovernment.moa.id.configuration.data.oa.OASTORKConfig;
import at.gv.egovernment.moa.id.configuration.helper.LanguageHelper;
+import at.gv.egovernment.moa.id.configuration.validation.ValidationHelper;
+import at.gv.egovernment.moa.util.MiscUtil;
public class OASTORKConfigValidation {
@@ -45,6 +48,17 @@ public class OASTORKConfigValidation {
errors.add(LanguageHelper.getErrorString("validation.stork.qaa.outofrange",
new Object[] {qaa} ));
}
+
+ for(AttributeProviderPlugin current : oageneral.getAttributeProviderPlugins()) {
+ if (MiscUtil.isEmpty(current.getUrl()) || !ValidationHelper.validateURL(current.getUrl())) {
+ log.info("AttributeProviderPlugin URL has no valid form.");
+ errors.add(LanguageHelper.getErrorString("validation.stork.ap.url.valid"));
+ }
+ if (MiscUtil.isEmpty(current.getName())) {
+ log.info("AttributeProviderPlugin Name is empty.");
+ errors.add(LanguageHelper.getErrorString("validation.stork.ap.name.valid"));
+ }
+ }
return errors;
}