summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractSpringBootConfigurationImpl.java4
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfiguration.java51
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java57
3 files changed, 60 insertions, 52 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractSpringBootConfigurationImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractSpringBootConfigurationImpl.java
index 1a344feb..dd13b534 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractSpringBootConfigurationImpl.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/AbstractSpringBootConfigurationImpl.java
@@ -45,11 +45,11 @@ import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertySource;
-import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
+import at.gv.egiz.eaaf.core.api.idp.IConfigurationWithSP;
import at.gv.egiz.eaaf.core.exceptions.EAAFConfigurationException;
import at.gv.egiz.eaaf.core.impl.utils.KeyValueUtils;
-public abstract class AbstractSpringBootConfigurationImpl implements IConfiguration {
+public abstract class AbstractSpringBootConfigurationImpl implements IConfigurationWithSP {
private static final Logger log = LoggerFactory.getLogger(AbstractSpringBootConfigurationImpl.class);
@Autowired private Environment env;
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfiguration.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfiguration.java
index 7d564b58..3ed505ef 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfiguration.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfiguration.java
@@ -27,18 +27,9 @@
package at.gv.egiz.eaaf.core.api.idp;
import java.net.URI;
-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 IConfiguration {
-
- public static final String CONFIG_PROPS_AUTH_DEFAULT_COUNTRYCODE = "configuration.auth.default.countrycode";
-
+
/**
* Get a configuration value from file based configuration
*
@@ -75,38 +66,6 @@ public interface IConfiguration {
*/
public boolean getBasicConfigurationBoolean(final String key, final boolean defaultValue);
- /**
- * Get a set of configuration values from file based configuration that starts with this prefix
- * <br><br>
- * <b>Important:</b> The configuration values must be of type String!
- *
- * @param prefix Prefix of the configuration key
- * @return Map<String, String> without prefix, but never null
- */
- public Map<String, String> getBasicConfigurationWithPrefix(final String prefix);
-
- /**
- * Get a configuration entry for a specific Service Provider
- *
- * @param uniqueID Unique identifier of the Service Provider
- * @return {@link ISPConfiguration} or <code>null</code> if no SP configuration was found
- * @throws EAAFConfigurationException
- */
- @Nullable
- public ISPConfiguration getServiceProviderConfiguration(final String uniqueID) throws EAAFConfigurationException;
-
-
- /**
- * Get a configuration entry for a specific Service Provider that is decorated by a Object
- *
- * @param spIdentifier EntityID of a Service Provider
- * @param decorator Decorator that should be used to decorate the result.
- * This decorator has to be implement or extend the {@link ISPConfiguration} interface
- * @return <code>T</code> or <code>null</code> if no SP configuration was found
- * @throws EAAFConfigurationException
- */
- @Nullable
- public <T> T getServiceProviderConfiguration(String spIdentifier, final Class<T> decorator) throws EAAFConfigurationException;
/**
* Get the root directory of the configuration folder
@@ -115,13 +74,5 @@ public interface IConfiguration {
*/
public URI getConfigurationRootDirectory();
- /**
- * Validate a URL if it it is allowed by configuration.
- *
- * @param authReqUrl URL for validation
- * @return URL of the application context if the authReqUrl was valid, otherwise null
- */
- public String validateIDPURL(URL authReqUrl) throws EAAFException;
-
}
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
new file mode 100644
index 00000000..ef453808
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java
@@ -0,0 +1,57 @@
+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 static final String CONFIG_PROPS_AUTH_DEFAULT_COUNTRYCODE = "configuration.auth.default.countrycode";
+
+
+ /**
+ * Get a configuration entry for a specific Service Provider
+ *
+ * @param uniqueID Unique identifier of the Service Provider
+ * @return {@link ISPConfiguration} or <code>null</code> if no SP configuration was found
+ * @throws EAAFConfigurationException
+ */
+ @Nullable
+ public ISPConfiguration getServiceProviderConfiguration(final String uniqueID) throws EAAFConfigurationException;
+
+
+ /**
+ * Get a configuration entry for a specific Service Provider that is decorated by a Object
+ *
+ * @param spIdentifier EntityID of a Service Provider
+ * @param decorator Decorator that should be used to decorate the result.
+ * This decorator has to be implement or extend the {@link ISPConfiguration} interface
+ * @return <code>T</code> or <code>null</code> if no SP configuration was found
+ * @throws EAAFConfigurationException
+ */
+ @Nullable
+ public <T> T getServiceProviderConfiguration(String spIdentifier, final Class<T> decorator) throws EAAFConfigurationException;
+
+
+ /**
+ * Get a set of configuration values from file based configuration that starts with this prefix
+ * <br><br>
+ * <b>Important:</b> The configuration values must be of type String!
+ *
+ * @param prefix Prefix of the configuration key
+ * @return Map<String, String> without prefix, but never null
+ */
+ public Map<String, String> getBasicConfigurationWithPrefix(final String prefix);
+
+ /**
+ * Validate a URL if it it is allowed by configuration.
+ *
+ * @param authReqUrl URL for validation
+ * @return URL of the application context if the authReqUrl was valid, otherwise null
+ */
+ public String validateIDPURL(URL authReqUrl) throws EAAFException;
+}