From 154f1609f8825a09f569b7187acca8cdb42732c3 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Tue, 12 Apr 2022 17:28:16 +0200 Subject: refact(config): split IConfigurationWithSP into two interfaces --- .../eaaf/core/api/idp/IConfigurationWithSP.java | 14 +--------- .../eaaf/core/api/idp/IExtendedConfiguration.java | 31 +++++++++++----------- .../core/api/idp/IExtendedConfigurationWithSP.java | 24 +++++++++++++++++ 3 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfigurationWithSP.java (limited to 'eaaf_core_api') diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java index cf8867b3..a38f4ec1 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java @@ -1,14 +1,13 @@ package at.gv.egiz.eaaf.core.api.idp; import java.net.URL; -import java.util.Map; import javax.annotation.Nullable; import at.gv.egiz.eaaf.core.exceptions.EaafConfigurationException; import at.gv.egiz.eaaf.core.exceptions.EaafException; -public interface IConfigurationWithSP extends IConfiguration { +public interface IConfigurationWithSP extends IExtendedConfiguration { String CONFIG_PROPS_AUTH_DEFAULT_COUNTRYCODE = "configuration.auth.default.countrycode"; @@ -41,17 +40,6 @@ public interface IConfigurationWithSP extends IConfiguration { T getServiceProviderConfiguration(String spIdentifier, Class decorator) throws EaafConfigurationException; - /** - * Get a set of configuration values from file based configuration that starts - * with this prefix.
- *
- * Important: The configuration values must be of type String! - * - * @param prefix Prefix of the configuration key - * @return Map String/String without prefix, but never null - */ - Map getBasicConfigurationWithPrefix(String prefix); - /** * Validate a URL if it it is allowed by configuration. * diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfiguration.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfiguration.java index ec09995d..fb1c9d04 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfiguration.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfiguration.java @@ -1,24 +1,25 @@ package at.gv.egiz.eaaf.core.api.idp; -import java.net.URI; -import java.util.Properties; +import java.util.Map; -public interface IExtendedConfiguration extends IConfigurationWithSP { +/** + * {@link IConfiguration} with Key/Value pre-fix loader. + * + * @author tlenz + * + */ +public interface IExtendedConfiguration extends IConfiguration { /** - * Get the full configuration properties object. + * Get a set of configuration values from file based configuration that starts + * with this prefix.
+ *
+ * Important: The configuration values must be of type String! * - * @return + * @param prefix Prefix of the configuration key + * @return Map String/String without prefix, but never null */ - @Deprecated - Properties getFullConfigurationProperties(); - - /** - * Get the path to EAAFCore configuration that is internally used. - * - * @return - */ - @Deprecated - URI getConfigurationFilePath(); + Map getBasicConfigurationWithPrefix(String prefix); + } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfigurationWithSP.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfigurationWithSP.java new file mode 100644 index 00000000..0e867c7e --- /dev/null +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IExtendedConfigurationWithSP.java @@ -0,0 +1,24 @@ +package at.gv.egiz.eaaf.core.api.idp; + +import java.net.URI; +import java.util.Properties; + +public interface IExtendedConfigurationWithSP extends IConfigurationWithSP { + + /** + * Get the full configuration properties object. + * + * @return + */ + @Deprecated + Properties getFullConfigurationProperties(); + + /** + * Get the path to EAAFCore configuration that is internally used. + * + * @return + */ + @Deprecated + URI getConfigurationFilePath(); + +} -- cgit v1.2.3