aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src
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
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')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java14
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources.properties2
2 files changed, 16 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;
}
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources.properties b/id/ConfigWebTool/src/main/resources/applicationResources.properties
index 313f9f2be..c6a88510a 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources.properties
@@ -392,6 +392,8 @@ validation.stork.cpeps.url=CPEPS URL ist ung\u00FCltig
validation.stork.requestedattributes=STORK Attribute sind fehlerhaft. Bsp.: attr1, attr2
validation.stork.qaa.outofrange=G\u00FCltige QAA Werte sind 1, 2, 3, und 4
validation.stork.attributes.empty=Es muss mindestens ein Attribut definiert sein
+validation.stork.ap.url.valid=Ung\u00FCltige AttributProvider Url
+validation.stork.ap.name.valid=Ung\u00FCltiger AttributProvider Name
validation.pvp2.metadataurl.empty=Keine Metadaten URL angegeben.
validation.pvp2.metadataurl.valid=Die Metadaten URL wei\u00DFt kein g\u00FCltiges URL Format auf.