aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-07-02 07:26:30 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-07-02 07:26:30 +0200
commit5bc01dab26425144a41dbece04b642fb963e1315 (patch)
tree543fe5f7b8d576c7e85ba711c1f9bf03d3dc699f /id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java
parent06e63a4fb89dd92583fc3e72e12750becdd6c8ef (diff)
downloadmoa-id-spss-5bc01dab26425144a41dbece04b642fb963e1315.tar.gz
moa-id-spss-5bc01dab26425144a41dbece04b642fb963e1315.tar.bz2
moa-id-spss-5bc01dab26425144a41dbece04b642fb963e1315.zip
devel
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java84
1 files changed, 28 insertions, 56 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java
index 159b587df..fbb1597f3 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/persistence/MOAIDConfiguration.java
@@ -1,5 +1,6 @@
package at.gv.egovernment.moa.id.commons.config.persistence;
+import java.util.Map;
import java.util.Properties;
import at.gv.egiz.components.configuration.api.Configuration;
@@ -13,71 +14,42 @@ public interface MOAIDConfiguration extends Configuration {
/**
* Get all key/value pairs with a prefix
*
- * @param preFix A key prefix
- * @return All key/value pairs with this prefix. The prefix is removed from the key.
+ * @param preFix: A key prefix
+ * @param removePrefix: Indicates, if the prefix should be removed from the result key
+ * @return All key/value pairs with this prefix or null if no key is found. The prefix is removed from the key.
*
**/
- public Properties getPropertySubset(String preFix) throws ConfigurationException;
+ public Map<String, String> getPropertySubset(String preFix) throws ConfigurationException;
/**
+ * Searches the configuration use '*' or '%' for wildcards.
+ *
+ * Example:
+ *
+ * db.server1.url=...
+ * db.server1.user=...
+ * db.server1.password=...
+ * db.server1.driver=...
+ * db.server2.url=...
+ * db.server2.user=...
+ * db.server2.password=...
+ * db.server2.driver=...
+ *
+ * searchString: "db.server1.*" returns
+ * ["db.server1.url", "db.server1.user", "db.server1.password", "db.server1.driver"]
+ * @param searchkey The search string
+ * @return All key/value pairs with this prefix or null if no key is found. The prefix is not removed from the key.
+ * @throws ConfigurationException if something went wrong
+ */
+ public Map<String, String> searchPropertiesWithWildcard(String searchkey) throws ConfigurationException;
+
+ /**
* Load an OnlineApplication configuration and remove the OA key prefix
*
* @param publicURLPrefix: Unique identifier of online application
* @return Properties of the online application or null if no OA is found
* @throws ConfigurationException in case of an configuration access error
*/
- public Properties getOnlineApplication(String publicURLPrefix) throws ConfigurationException;
-
-
-// /**
-// * Gets all keys in the database. NOTE: may return an empty list or {@code null}.
-// * @return a List containing all keys in the database or {@code null}.
-// */
-// List<String> getAllKeys();
-//
-// /**
-// * Get the value associated with the given key as {@link Object}.
-// * @param key the key
-// * @return the String associated with the given key or {@code null} if the key does not exist or does not have a value.
-// */
-// String get(String key);
-//
-// /**
-// * Get the object of type {@code T} associated with the given key.
-// *
-// * @param key the key
-// * @param clazz the type of the requested object
-// * @return the object associated with the given key or {@code null} if the key does not exist or does not have a value.
-// */
-// <T> T get(String key, Class<T> clazz);
-//
-// /**
-// * Store an object associated with a key. If the given object is set to {@code null} then the entry associated with the key is deleted.
-// *
-// * @param key the key under which the value is stored, respectively key determining the entry to be deleted.
-// * @param value the String to store. if value is set to {@code null} then the entry associated with key {@code key} is deleted.
-// * @return {@code true} if the operation was carried out successfully, {@code false} otherwise.
-// */
-// boolean set(String key, String value);
-//
-// /**
-// * Get the object of type {@code T} associated with the given key from the database. If the key does not exist or does not have a value, the given default
-// * value is returned.
-// *
-// * @param key the key
-// * @param clazz the type of the requested object
-// * @param defaultValue the default value to return
-// * @return the object associated with the given key or {@code defaultValue} if the key does not exist or does not have a value.
-// */
-// <T> T get(String key, Class<T> clazz, Object defaultValue);
-//
-// /**
-// * Get a list of objects associated with the given key. The list may be empty or contain only a single object.
-// * @param key the key
-// * @param clazz the type of the requested object
-// * @return a list containing objects of type {@code T} or an empty list if no objects are associated with the key.
-// */
-// <T> List<T> getList(String key, Class<T> clazz);
-
+ public Map<String, String> getOnlineApplication(String publicURLPrefix) throws ConfigurationException;
} \ No newline at end of file