aboutsummaryrefslogtreecommitdiff
path: root/id/moa-id-webgui/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-01-18 17:34:23 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-01-18 17:34:23 +0100
commit871e8fefefdd935bc99db467d43f4ec61dba251d (patch)
tree04f6c37e1d38067ba83e2620941bb391918bebe3 /id/moa-id-webgui/src/main/java/at
parent5de5a970cacf9cfe5e55f9581902b00f4378b577 (diff)
downloadmoa-id-spss-871e8fefefdd935bc99db467d43f4ec61dba251d.tar.gz
moa-id-spss-871e8fefefdd935bc99db467d43f4ec61dba251d.tar.bz2
moa-id-spss-871e8fefefdd935bc99db467d43f4ec61dba251d.zip
add virtual IDP enabled flag to configuration
Diffstat (limited to 'id/moa-id-webgui/src/main/java/at')
-rw-r--r--id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java
index 891295777..1c3e0fe13 100644
--- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java
+++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java
@@ -29,6 +29,7 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -114,17 +115,32 @@ public class GeneralMOAIDConfigurationTask extends AbstractTaskValidator impleme
}
check = input.get(KeyValueUtils.removePrefixFromKey(MOAIDConfigurationConstants.GENERAL_PUBLICURLPREFIX, getKeyPrefix()));
+ String isVirtualIDPEnabled = input.get(KeyValueUtils.removePrefixFromKey(MOAIDConfigurationConstants.GENERAL_ISVIRTUALIDPSENABLED, getKeyPrefix()));
if (MiscUtil.isNotEmpty(check)) {
String[] preFixList = check.split(",");
- for (String el : preFixList) {
- if (!ValidationHelper.validateURL(el.trim())) {
- log.info("Public URL Prefix is not valid");
+ if (isVirtualIDPEnabled != null && Boolean.valueOf(isVirtualIDPEnabled)) {
+ for (String el : preFixList) {
+ if (!ValidationHelper.validateURL(el.trim())) {
+ log.info("Public URL Prefix is not valid");
+ errors.add(new ValidationObjectIdentifier(
+ MOAIDConfigurationConstants.GENERAL_PUBLICURLPREFIX,
+ "Public URL Prefix",
+ LanguageHelper.getErrorString("validation.general.publicURLprefix.valid", new Object[]{el})));
+ }
+ }
+ } else {
+ if (!ValidationHelper.validateURL(
+ StringUtils.chomp(preFixList[0].trim()))) {
+ log.info("Public URL Prefix " + preFixList[0] + " is not valid");
errors.add(new ValidationObjectIdentifier(
MOAIDConfigurationConstants.GENERAL_PUBLICURLPREFIX,
"Public URL Prefix",
- LanguageHelper.getErrorString("validation.general.publicURLprefix.valid", new Object[]{el})));
+ LanguageHelper.getErrorString("validation.general.publicURLprefix.valid", new Object[]{preFixList[0]})));
+
}
+
}
+
} else {
log.info("PublicURL Prefix is empty.");
errors.add(new ValidationObjectIdentifier(