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: TAMAYA-321 Add ConfigurationBuilder to core API.
Date Sun, 26 Nov 2017 22:51:26 GMT
Repository: incubator-tamaya-extensions
Updated Branches:
  refs/heads/master 826f9841f -> ab0343305


TAMAYA-321 Add ConfigurationBuilder to core API.


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/ab034330
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/ab034330
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/ab034330

Branch: refs/heads/master
Commit: ab0343305eb1e2b44e79f7a0db653361e9df56e2
Parents: 826f984
Author: Anatole Tresch <anatole@apache.org>
Authored: Sun Nov 26 23:51:14 2017 +0100
Committer: Anatole Tresch <anatole@apache.org>
Committed: Sun Nov 26 23:51:14 2017 +0100

----------------------------------------------------------------------
 jqassistant/serviceloader-rules.xml             |  6 +++---
 .../org/apache/tamaya/features/Features.java    |  2 +-
 .../tamaya/filter/ProgrammableFilterTest.java   |  4 ++--
 .../functions/CombinedConfigurationTest.java    | 22 ++++++++++----------
 .../tamaya/cdi/ConfigurationProducer.java       | 11 ++++++----
 .../org/apache/tamaya/cdi/InjectedClass.java    |  6 +++---
 6 files changed, 27 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/ab034330/jqassistant/serviceloader-rules.xml
----------------------------------------------------------------------
diff --git a/jqassistant/serviceloader-rules.xml b/jqassistant/serviceloader-rules.xml
index 6c69b11..9d163d3 100644
--- a/jqassistant/serviceloader-rules.xml
+++ b/jqassistant/serviceloader-rules.xml
@@ -113,9 +113,9 @@ under the License.
             // service configurations in version 1.0.0.
             // I reported this problem already to the project
             // Oliver B. Fischer, 15.5.5
-            AND NOT sl.fileName IN ['/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface',
-                                    '/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface',
-                                    '/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface']
+            AND NOT sl.fileName IN ['/META-INF/services/org.apache.tamaya.spisupport.DefaultServiceContextTest$MultiImplsInterface',
+                                    '/META-INF/services/org.apache.tamaya.spisupport.DefaultServiceContextTest$InvalidPriorityInterface',
+                                    '/META-INF/services/org.apache.tamaya.spisupport.DefaultServiceContextTest$InvalidPriorityInterface']
 
         RETURN
             sl.fileName AS serviceConfiguration, entry.name AS class

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/ab034330/modules/features/src/main/java/org/apache/tamaya/features/Features.java
----------------------------------------------------------------------
diff --git a/modules/features/src/main/java/org/apache/tamaya/features/Features.java b/modules/features/src/main/java/org/apache/tamaya/features/Features.java
index de1b2af..32834fa 100644
--- a/modules/features/src/main/java/org/apache/tamaya/features/Features.java
+++ b/modules/features/src/main/java/org/apache/tamaya/features/Features.java
@@ -50,7 +50,7 @@ public final class Features {
      * @return true, if <i>tamaya-core</i> is on the classpath.
      */
     public static boolean tamayaCoreAvailable() {
-        return checkClassIsLoadable("org.apache.tamaya.core.internal.DefaultConfigurationProvider");
+        return checkClassIsLoadable("org.apache.tamaya.core.internal.CoreConfiguration");
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/ab034330/modules/filter/src/test/java/org/apache/tamaya/filter/ProgrammableFilterTest.java
----------------------------------------------------------------------
diff --git a/modules/filter/src/test/java/org/apache/tamaya/filter/ProgrammableFilterTest.java
b/modules/filter/src/test/java/org/apache/tamaya/filter/ProgrammableFilterTest.java
index 57d5efb..b6e7bb7 100644
--- a/modules/filter/src/test/java/org/apache/tamaya/filter/ProgrammableFilterTest.java
+++ b/modules/filter/src/test/java/org/apache/tamaya/filter/ProgrammableFilterTest.java
@@ -21,7 +21,7 @@ package org.apache.tamaya.filter;
 import org.apache.tamaya.spi.ConfigurationContext;
 import org.apache.tamaya.spi.PropertyFilter;
 import org.apache.tamaya.spi.PropertyValue;
-import org.apache.tamaya.core.internal.CoreConfigurationContextBuilder;
+import org.apache.tamaya.spisupport.DefaultConfigurationContextBuilder;
 import org.apache.tamaya.spisupport.RegexPropertyFilter;
 import org.junit.Test;
 
@@ -36,7 +36,7 @@ import static org.junit.Assert.*;
  */
 public class ProgrammableFilterTest {
 
-    private static ConfigurationContext context = new CoreConfigurationContextBuilder().build();
+    private static ConfigurationContext context = new DefaultConfigurationContextBuilder().build();
     private static PropertyValue test1Property = PropertyValue.of("test1","test1","test");
     private static PropertyValue test2Property = PropertyValue.of("test2","test2","test");
     private static PropertyValue test3Property = PropertyValue.of("test.test3","test.test3","test");

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/ab034330/modules/functions/src/test/java/org/apache/tamaya/functions/CombinedConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/functions/src/test/java/org/apache/tamaya/functions/CombinedConfigurationTest.java
b/modules/functions/src/test/java/org/apache/tamaya/functions/CombinedConfigurationTest.java
index cb56e9b..16cabeb 100644
--- a/modules/functions/src/test/java/org/apache/tamaya/functions/CombinedConfigurationTest.java
+++ b/modules/functions/src/test/java/org/apache/tamaya/functions/CombinedConfigurationTest.java
@@ -24,7 +24,7 @@ import org.apache.tamaya.Configuration;
 import org.apache.tamaya.TypeLiteral;
 import org.apache.tamaya.spi.ConfigurationContext;
 import org.apache.tamaya.spisupport.DefaultConfiguration;
-import org.apache.tamaya.core.internal.CoreConfigurationContextBuilder;
+import org.apache.tamaya.core.internal.CoreConfigurationBuilder;
 import org.apache.tamaya.spisupport.propertysource.SimplePropertySource;
 import org.assertj.core.api.ThrowableAssert;
 import org.junit.Test;
@@ -57,22 +57,22 @@ public class CombinedConfigurationTest {
         SimplePropertySource sourceWithKeyC = new SimplePropertySource("C", singletonMap("c",
"c"));
         SimplePropertySource sourceWithoutKeys = new SimplePropertySource("NONE", Collections.<String,
String>emptyMap());
 
-        ConfigurationContext ccWithA1 = new CoreConfigurationContextBuilder().addPropertySources(sourceWithKeyA1)
+        Configuration ccWithA1 = new CoreConfigurationBuilder().addPropertySources(sourceWithKeyA1)
                                                                                 .build();
-        ConfigurationContext ccWithA2 = new CoreConfigurationContextBuilder().addPropertySources(sourceWithKeyA2)
+        Configuration ccWithA2 = new CoreConfigurationBuilder().addPropertySources(sourceWithKeyA2)
                                                                                 .build();
-        ConfigurationContext ccWithB = new CoreConfigurationContextBuilder().addPropertySources(sourceWithKeyB)
+        Configuration ccWithB = new CoreConfigurationBuilder().addPropertySources(sourceWithKeyB)
                                                                                .build();
-        ConfigurationContext ccWithC = new CoreConfigurationContextBuilder().addPropertySources(sourceWithKeyC)
+        Configuration ccWithC = new CoreConfigurationBuilder().addPropertySources(sourceWithKeyC)
                                                                                .build();
-        ConfigurationContext ccWithoutEntries = new CoreConfigurationContextBuilder().addPropertySources(sourceWithoutKeys)
+        Configuration ccWithoutEntries = new CoreConfigurationBuilder().addPropertySources(sourceWithoutKeys)
                                                                                         .build();
 
-        configWithA1 = new DefaultConfiguration(ccWithA1);
-        configWithA2 = new DefaultConfiguration(ccWithA2);
-        configWithB = new DefaultConfiguration(ccWithB);
-        configWithC = new DefaultConfiguration(ccWithC);
-        configWithoutEntries = new DefaultConfiguration(ccWithoutEntries);
+        configWithA1 = new DefaultConfiguration(ccWithA1.getContext());
+        configWithA2 = new DefaultConfiguration(ccWithA2.getContext());
+        configWithB = new DefaultConfiguration(ccWithB.getContext());
+        configWithC = new DefaultConfiguration(ccWithC.getContext());
+        configWithoutEntries = new DefaultConfiguration(ccWithoutEntries.getContext());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/ab034330/modules/injection/cdi/src/main/java/org/apache/tamaya/cdi/ConfigurationProducer.java
----------------------------------------------------------------------
diff --git a/modules/injection/cdi/src/main/java/org/apache/tamaya/cdi/ConfigurationProducer.java
b/modules/injection/cdi/src/main/java/org/apache/tamaya/cdi/ConfigurationProducer.java
index 2dfef7c..fdcf995 100644
--- a/modules/injection/cdi/src/main/java/org/apache/tamaya/cdi/ConfigurationProducer.java
+++ b/modules/injection/cdi/src/main/java/org/apache/tamaya/cdi/ConfigurationProducer.java
@@ -18,10 +18,7 @@ package org.apache.tamaya.cdi;
 
 import org.apache.tamaya.*;
 import org.apache.tamaya.inject.api.*;
-import org.apache.tamaya.spi.ConfigurationContext;
-import org.apache.tamaya.spi.ConfigurationContextBuilder;
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
+import org.apache.tamaya.spi.*;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Instance;
@@ -191,9 +188,15 @@ public class ConfigurationProducer {
         return ConfigurationProvider.getConfiguration().getContext();
     }
 
+    @Deprecated
     @Produces
     public ConfigurationContextBuilder getConfigurationContextBuilder(){
         return ConfigurationProvider.getConfigurationContextBuilder();
     }
 
+    @Produces
+    public ConfigurationBuilder getConfigurationBuilder(){
+        return ConfigurationProvider.getConfigurationBuilder();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/ab034330/modules/injection/cdi/src/test/java/org/apache/tamaya/cdi/InjectedClass.java
----------------------------------------------------------------------
diff --git a/modules/injection/cdi/src/test/java/org/apache/tamaya/cdi/InjectedClass.java
b/modules/injection/cdi/src/test/java/org/apache/tamaya/cdi/InjectedClass.java
index f3e746b..3c6ca51 100644
--- a/modules/injection/cdi/src/test/java/org/apache/tamaya/cdi/InjectedClass.java
+++ b/modules/injection/cdi/src/test/java/org/apache/tamaya/cdi/InjectedClass.java
@@ -21,7 +21,7 @@ package org.apache.tamaya.cdi;
 
 import org.apache.tamaya.Configuration;
 import org.apache.tamaya.spi.ConfigurationContext;
-import org.apache.tamaya.spi.ConfigurationContextBuilder;
+import org.apache.tamaya.spi.ConfigurationBuilder;
 
 import javax.inject.Inject;
 import javax.inject.Singleton;
@@ -45,10 +45,10 @@ public class InjectedClass {
     ConfigurationContext configContext2;
 
     @Inject
-    ConfigurationContextBuilder builder1;
+    ConfigurationBuilder builder1;
 
     @Inject
-    ConfigurationContextBuilder builder2;
+    ConfigurationBuilder builder2;
 
     @Override
     public String toString() {


Mime
View raw message