tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject incubator-tamaya-extensions git commit: Adapted to comply with JSR API.
Date Sat, 03 Feb 2018 20:02:27 GMT
Repository: incubator-tamaya-extensions
Updated Branches:
  refs/heads/configjsr 4765b8c44 -> 1143276b0


Adapted to comply with JSR API.

Signed-off-by: Anatole Tresch <anatole@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/1143276b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/1143276b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/1143276b

Branch: refs/heads/configjsr
Commit: 1143276b001bb6c5be7f0a27eb79ae9b8aed7900
Parents: 4765b8c
Author: Anatole Tresch <anatole@apache.org>
Authored: Sat Feb 3 21:02:04 2018 +0100
Committer: Anatole Tresch <anatole@apache.org>
Committed: Sat Feb 3 21:02:04 2018 +0100

----------------------------------------------------------------------
 modules/events/bnd.bnd                                    |  4 ++--
 .../yaml/src/test/resources/configs/valid/test.yaml       |  5 ++++-
 .../apache/tamaya/functions/ConfigurationFunctions.java   | 10 ++++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1143276b/modules/events/bnd.bnd
----------------------------------------------------------------------
diff --git a/modules/events/bnd.bnd b/modules/events/bnd.bnd
index 1b9859a..2a5a84b 100644
--- a/modules/events/bnd.bnd
+++ b/modules/events/bnd.bnd
@@ -23,8 +23,8 @@ Export-Package: \
 	org.apache.tamaya.events,\
 	org.apache.tamaya.events.spi
 Import-Package: \
-	org.apache.tamaya,\
-	org.apache.tamaya.spi,\
+	javax.config,\
+	javax.config.spi,\
 	org.osgi.framework,\
 	javax.annotation
 Private-Package: \

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1143276b/modules/formats/yaml/src/test/resources/configs/valid/test.yaml
----------------------------------------------------------------------
diff --git a/modules/formats/yaml/src/test/resources/configs/valid/test.yaml b/modules/formats/yaml/src/test/resources/configs/valid/test.yaml
index 697e9f3..86b5242 100644
--- a/modules/formats/yaml/src/test/resources/configs/valid/test.yaml
+++ b/modules/formats/yaml/src/test/resources/configs/valid/test.yaml
@@ -32,4 +32,7 @@ protocols:
 # Users
 users:
     tom: passwd
-    bob: passwd
\ No newline at end of file
+    bob: passwd
+
+foo.bar[meta]:
+  propertysource: "MyPropertySource"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/1143276b/modules/functions/src/main/java/org/apache/tamaya/functions/ConfigurationFunctions.java
----------------------------------------------------------------------
diff --git a/modules/functions/src/main/java/org/apache/tamaya/functions/ConfigurationFunctions.java
b/modules/functions/src/main/java/org/apache/tamaya/functions/ConfigurationFunctions.java
index 15e6242..8089725 100644
--- a/modules/functions/src/main/java/org/apache/tamaya/functions/ConfigurationFunctions.java
+++ b/modules/functions/src/main/java/org/apache/tamaya/functions/ConfigurationFunctions.java
@@ -511,4 +511,14 @@ public final class ConfigurationFunctions {
     }
 
 
+    /**
+     * Reads out all keys found into a String, String map.
+     * @param config the config, not null.
+     * @return the properties map.
+     */
+    public static Map<String,String> toMap(Config config) {
+        Map<String,String> result = new HashMap<>();
+        config.getPropertyNames().forEach(key -> result.put(key, config.getValue(key,
String.class)));
+        return result;
+    }
 }


Mime
View raw message