diff options
Diffstat (limited to 'eaaf_core_utils/src/main')
-rw-r--r-- | eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java index de54d103..2f4e18fa 100644 --- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java +++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java @@ -20,8 +20,10 @@ package at.gv.egiz.eaaf.core.impl.idp.conf; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,8 +40,8 @@ public class SpConfigurationImpl implements ISpConfiguration { private static final Logger log = LoggerFactory.getLogger(SpConfigurationImpl.class); private final Map<String, String> spConfiguration; - private final List<String> targetAreasWithNoInteralBaseIdRestriction; - private final List<String> targetAreasWithNoBaseIdTransmissionRestriction; + private final Set<String> targetAreasWithNoInteralBaseIdRestriction; + private final Set<String> targetAreasWithNoBaseIdTransmissionRestriction; /** * Service-provider configuration holder. @@ -52,21 +54,19 @@ public class SpConfigurationImpl implements ISpConfiguration { // set oa specific restrictions targetAreasWithNoInteralBaseIdRestriction = Collections - .unmodifiableList(KeyValueUtils.getListOfCsvValues(authConfig.getBasicConfiguration( - CONFIG_KEY_RESTRICTIONS_BASEID_INTERNAL, EaafConstants.URN_PREFIX_CDID))); + .unmodifiableSet(new HashSet<String>(KeyValueUtils.getListOfCsvValues(authConfig.getBasicConfiguration( + CONFIG_KEY_RESTRICTIONS_BASEID_INTERNAL, EaafConstants.URN_PREFIX_CDID)))); targetAreasWithNoBaseIdTransmissionRestriction = Collections - .unmodifiableList(KeyValueUtils.getListOfCsvValues(authConfig.getBasicConfiguration( - CONFIG_KEY_RESTRICTIONS_BASEID_TRANSMISSION, EaafConstants.URN_PREFIX_CDID))); + .unmodifiableSet(new HashSet<String>(KeyValueUtils.getListOfCsvValues(authConfig.getBasicConfiguration( + CONFIG_KEY_RESTRICTIONS_BASEID_TRANSMISSION, EaafConstants.URN_PREFIX_CDID)))); if (log.isTraceEnabled()) { log.trace("Internal policy for OA: " + getUniqueIdentifier()); - for (final String el : targetAreasWithNoInteralBaseIdRestriction) { - log.trace(" Allow baseID processing for prefix " + el); - } - for (final String el : targetAreasWithNoBaseIdTransmissionRestriction) { - log.trace(" Allow baseID transfer for prefix " + el); - } + targetAreasWithNoInteralBaseIdRestriction.stream() + .forEach(el -> log.trace(" Allow baseID processing for prefix " + el)); + targetAreasWithNoBaseIdTransmissionRestriction.stream() + .forEach(el -> log.trace(" Allow baseID transfer for prefix " + el)); } } @@ -143,12 +143,12 @@ public class SpConfigurationImpl implements ISpConfiguration { } @Override - public final List<String> getTargetsWithNoBaseIdInternalProcessingRestriction() { + public final Set<String> getTargetsWithNoBaseIdInternalProcessingRestriction() { return this.targetAreasWithNoInteralBaseIdRestriction; } @Override - public final List<String> getTargetsWithNoBaseIdTransferRestriction() { + public final Set<String> getTargetsWithNoBaseIdTransferRestriction() { return this.targetAreasWithNoBaseIdTransmissionRestriction; } |