You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by an...@apache.org on 2015/09/29 09:01:11 UTC
[06/21] incubator-tamaya git commit: TAMAYA-113: Remove Java 8
related parts - basic work done.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/IntegerConverterTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/IntegerConverterTest.java b/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/IntegerConverterTest.java
deleted file mode 100644
index 03b0f12..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/IntegerConverterTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.internal.converters;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests the default converter for Integers.
- */
-public class IntegerConverterTest {
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Integer_Decimal() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Integer valueRead = config.get("tests.converter.integer.decimal", Integer.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), 101);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Integer_Octal() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Integer valueRead = config.get("tests.converter.integer.octal", Integer.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Integer.decode("02").intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Integer_Hex() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Integer valueRead = config.get("tests.converter.integer.hex.lowerX", Integer.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Integer.decode("0x2F").intValue());
- valueRead = config.get("tests.converter.integer.hex.upperX", Integer.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Integer.decode("0X3F").intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_NotPresent() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Integer valueRead = config.get("tests.converter.integer.foo", Integer.class);
- assertFalse(valueRead != null);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Integer_MinValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Integer valueRead = config.get("tests.converter.integer.min", Integer.class);
- assertTrue(valueRead != null);
- assertEquals(Integer.MIN_VALUE, valueRead.intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Integer_MaxValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Integer valueRead = config.get("tests.converter.integer.max", Integer.class);
- assertTrue(valueRead != null);
- assertEquals(Integer.MAX_VALUE, valueRead.intValue());
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/LongConverterTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/LongConverterTest.java b/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/LongConverterTest.java
deleted file mode 100644
index 0df6b09..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/LongConverterTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.internal.converters;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests the default converter for Longs.
- */
-public class LongConverterTest {
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Long_Decimal() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Long valueRead = config.get("tests.converter.long.decimal", Long.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), 101);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Long_Octal() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Long valueRead = config.get("tests.converter.long.octal", Long.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Long.decode("02").intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Long_Hex() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Long valueRead = config.get("tests.converter.long.hex.lowerX", Long.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Long.decode("0x2F").intValue());
- valueRead = config.get("tests.converter.long.hex.upperX", Long.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Long.decode("0X3F").intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_NotPresent() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Long valueRead = config.get("tests.converter.long.foo", Long.class);
- assertFalse(valueRead != null);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Long_MinValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Long valueRead = config.get("tests.converter.long.min", Long.class);
- assertTrue(valueRead != null);
- assertEquals(Long.MIN_VALUE, valueRead.longValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Long_MaxValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Long valueRead = config.get("tests.converter.long.max", Long.class);
- assertTrue(valueRead != null);
- assertEquals(Long.MAX_VALUE, valueRead.longValue());
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/NumberConverterTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/NumberConverterTest.java b/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/NumberConverterTest.java
deleted file mode 100644
index 25e6fd9..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/NumberConverterTest.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.internal.converters;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.junit.Test;
-
-import java.math.BigDecimal;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests the default converter for Number.
- */
-public class NumberConverterTest {
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Decimal() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Number valueRead = config.get("tests.converter.bd.decimal", Number.class);
- assertTrue(valueRead!=null);
- assertEquals(valueRead, Long.valueOf(101));
- }
-
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Hex() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Number valueRead = config.get("tests.converter.bd.hex.lowerX", Number.class);
- assertTrue(valueRead!=null);
- assertEquals(valueRead, Long.valueOf("47"));
- valueRead = config.get("tests.converter.bd.hex.upperX", Number.class);
- assertTrue(valueRead!=null);
- assertEquals(valueRead, Long.valueOf("63"));
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_NotPresent() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Number valueRead = config.get("tests.converter.bd.foo", Number.class);
- assertFalse(valueRead!=null);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_BigValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Number valueRead = config.get("tests.converter.bd.big", Number.class);
- assertTrue(valueRead!=null);
- assertEquals(new BigDecimal("101666666666666662333337263723628763821638923628193612983618293628763"),
- valueRead);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_BigFloatValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Number valueRead = config.get("tests.converter.bd.bigFloat", Number.class);
- assertTrue(valueRead!=null);
- assertEquals(new BigDecimal("1016666666666666623333372637236287638216389293628763.1016666666666666623333372" +
- "63723628763821638923628193612983618293628763"), valueRead);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/ShortConverterTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/ShortConverterTest.java b/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/ShortConverterTest.java
deleted file mode 100644
index 193a92e..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/internal/converters/ShortConverterTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.internal.converters;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests the default converter for Shorts.
- */
-public class ShortConverterTest {
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Short_Decimal() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Short valueRead = config.get("tests.converter.short.decimal", Short.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), 101);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Short_Octal() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Short valueRead = config.get("tests.converter.short.octal", Short.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Short.decode("02").intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Short_Hex() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Short valueRead = config.get("tests.converter.short.hex.lowerX", Short.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Short.decode("0x2F").intValue());
- valueRead = config.get("tests.converter.short.hex.upperX", Short.class);
- assertTrue(valueRead != null);
- assertEquals(valueRead.intValue(), Short.decode("0X3F").intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_NotPresent() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Short valueRead = config.get("tests.converter.short.foo", Short.class);
- assertFalse(valueRead != null);
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Short_MinValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Short valueRead = config.get("tests.converter.short.min", Short.class);
- assertTrue(valueRead != null);
- assertEquals(Short.MIN_VALUE, valueRead.intValue());
- }
-
- /**
- * Test conversion. The value are provided by
- * {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
- * @throws Exception
- */
- @Test
- public void testConvert_Short_MaxValue() throws Exception {
- Configuration config = ConfigurationProvider.getConfiguration();
- Short valueRead = config.get("tests.converter.short.max", Short.class);
- assertTrue(valueRead != null);
- assertEquals(Short.MAX_VALUE, valueRead.intValue());
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java b/java7/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java
deleted file mode 100644
index 8d3f086..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.propertysource;
-
-import org.apache.tamaya.core.propertysource.BasePropertySource;
-import org.apache.tamaya.spi.PropertySource;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-public class BasePropertySourceTest {
-
- @Test
- public void testGetOrdinal() {
-
- PropertySource defaultPropertySource = new BasePropertySource(56) {
-
- @Override
- public String getName() {
- return "testWithDefault";
- }
-
- @Override
- public String get(String key) {
- return null;
- }
-
- @Override
- public Map<String, String> getProperties() {
- return Collections.emptyMap();
- }
- };
-
- Assert.assertEquals(56, defaultPropertySource.getOrdinal());
- Assert.assertEquals(1000, new OverriddenOrdinalPropertySource().getOrdinal());
-
- // propertySource with invalid ordinal
- Assert.assertEquals(1, new OverriddenInvalidOrdinalPropertySource().getOrdinal());
- }
-
- @Test
- public void testGet() {
- Assert.assertEquals("1000", new OverriddenOrdinalPropertySource().get(PropertySource.TAMAYA_ORDINAL));
- }
-
- private static class OverriddenOrdinalPropertySource extends BasePropertySource {
-
- private OverriddenOrdinalPropertySource() {
- super(250);
- }
-
- @Override
- public String getName() {
- return "overriddenOrdinal";
- }
-
- @Override
- public Map<String, String> getProperties() {
- Map<String, String> map = new HashMap<>(1);
- map.put(PropertySource.TAMAYA_ORDINAL, "1000");
- return map;
- }
- }
-
- private static class OverriddenInvalidOrdinalPropertySource extends BasePropertySource {
-
- private OverriddenInvalidOrdinalPropertySource() {
- super(1);
- }
-
- @Override
- public String getName() {
- return "overriddenInvalidOrdinal";
- }
-
- @Override
- public Map<String, String> getProperties() {
- Map<String, String> map = new HashMap<>(1);
- map.put(PropertySource.TAMAYA_ORDINAL, "invalid");
- return map;
- }
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySourceTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySourceTest.java b/java7/core/src/test/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySourceTest.java
deleted file mode 100644
index 280351e..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySourceTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.propertysource;
-
-import org.junit.Test;
-
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Tests for {@link org.apache.tamaya.core.propertysource.EnvironmentPropertySource}.
- */
-public class EnvironmentPropertySourceTest {
-
- private EnvironmentPropertySource envPropertySource = new EnvironmentPropertySource();
-
- @Test
- public void testGetOrdinal() throws Exception {
- assertEquals(EnvironmentPropertySource.DEFAULT_ORDINAL, envPropertySource.getOrdinal());
- }
-
- @Test
- public void testGetName() throws Exception {
- assertEquals("environment-properties", envPropertySource.getName());
- }
-
- @Test
- public void testGet() throws Exception {
- for (Map.Entry<String, String> envEntry : System.getenv().entrySet()) {
- assertEquals(envPropertySource.get(envEntry.getKey()), envEntry.getValue());
- }
- }
-
- @Test
- public void testGetProperties() throws Exception {
- Map<String, String> props = envPropertySource.getProperties();
- assertEquals(System.getenv(), props);
- }
-
- @Test
- public void testIsScannable() throws Exception {
- assertTrue(envPropertySource.isScannable());
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/propertysource/PropertiesFilePropertySourceTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/PropertiesFilePropertySourceTest.java b/java7/core/src/test/java/org/apache/tamaya/core/propertysource/PropertiesFilePropertySourceTest.java
deleted file mode 100644
index 36b0f5d..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/PropertiesFilePropertySourceTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.propertysource;
-
-import org.apache.tamaya.core.propertysource.SimplePropertySource;
-import org.apache.tamaya.spi.PropertySource;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class PropertiesFilePropertySourceTest {
-
- private SimplePropertySource testfilePropertySource = new SimplePropertySource(Thread.currentThread()
- .getContextClassLoader().getResource("testfile.properties"));
- private SimplePropertySource overrideOrdinalPropertySource = new SimplePropertySource(
- Thread.currentThread().getContextClassLoader().getResource("overrideOrdinal.properties"));
-
-
- @Test
- public void testGetOrdinal() {
- Assert.assertEquals(0, testfilePropertySource.getOrdinal());
- Assert.assertEquals(Integer.parseInt(overrideOrdinalPropertySource.get(PropertySource.TAMAYA_ORDINAL)), overrideOrdinalPropertySource.getOrdinal());
- }
-
-
- @Test
- public void testGet() {
- Assert.assertEquals("val3", testfilePropertySource.get("key3"));
- Assert.assertEquals("myval5", overrideOrdinalPropertySource.get("mykey5"));
- Assert.assertNull(testfilePropertySource.get("nonpresentkey"));
- }
-
-
- @Test
- public void testGetProperties() throws Exception {
- Assert.assertEquals(5, testfilePropertySource.getProperties().size());
- Assert.assertTrue(testfilePropertySource.getProperties().containsKey("key1"));
- Assert.assertTrue(testfilePropertySource.getProperties().containsKey("key2"));
- Assert.assertTrue(testfilePropertySource.getProperties().containsKey("key3"));
- Assert.assertTrue(testfilePropertySource.getProperties().containsKey("key4"));
- Assert.assertTrue(testfilePropertySource.getProperties().containsKey("key5"));
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/propertysource/SystemPropertySourceTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/SystemPropertySourceTest.java b/java7/core/src/test/java/org/apache/tamaya/core/propertysource/SystemPropertySourceTest.java
deleted file mode 100644
index c627972..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/propertysource/SystemPropertySourceTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.propertysource;
-
-import org.apache.tamaya.core.propertysource.SystemPropertySource;
-import org.apache.tamaya.spi.PropertySource;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.Map;
-import java.util.Properties;
-
-public class SystemPropertySourceTest {
-
- private SystemPropertySource testPropertySource = new SystemPropertySource();
-
-
- @Test
- public void testGetOrdinal() throws Exception {
-
- // test the default ordinal
- Assert.assertEquals(SystemPropertySource.DEFAULT_ORDINAL, testPropertySource.getOrdinal());
-
- // set the ordinal to 1000
- System.setProperty(PropertySource.TAMAYA_ORDINAL, "1000");
- Assert.assertEquals(1000, new SystemPropertySource().getOrdinal());
- // currently its not possible to change ordinal at runtime
-
- // reset it to not destroy other tests!!
- System.clearProperty(PropertySource.TAMAYA_ORDINAL);
- }
-
- @Test
- public void testGetName() throws Exception {
- Assert.assertEquals("system-properties", testPropertySource.getName());
- }
-
- @Test
- public void testGet() throws Exception {
- String propertyKeyToCheck = System.getProperties().stringPropertyNames().iterator().next();
-
- String property = testPropertySource.get(propertyKeyToCheck);
- Assert.assertNotNull("Property '" + propertyKeyToCheck + "' is not present in " +
- SystemPropertySource.class.getSimpleName(), property);
- Assert.assertEquals(System.getProperty(propertyKeyToCheck), property);
- }
-
- @Test
- public void testGetProperties() throws Exception {
- checkWithSystemProperties(testPropertySource.getProperties());
-
- // modify system properties
- System.setProperty("test", "myTestVal");
-
- checkWithSystemProperties(testPropertySource.getProperties());
-
- // cleanup
- System.clearProperty("test");
-
- // no modifaction
- try {
- testPropertySource.getProperties().put("add.new.keys", "must throw exception");
- Assert.fail(UnsupportedOperationException.class.getName() + " expected");
- }
- catch (UnsupportedOperationException e) {
- // expected -> all is fine
- }
- }
-
- private void checkWithSystemProperties(Map<String, String> toCheck) {
- Properties systemEntries = System.getProperties();
-
- Assert.assertEquals("size of System.getProperties().entrySet() must be the same as SystemPropertySrouce.getProperties().entrySet()",
- systemEntries.entrySet().size(), toCheck.size());
-
- for (Map.Entry<String, String> propertySourceEntry : toCheck.entrySet()) {
-
- Assert.assertEquals("Entry values for key '" + propertySourceEntry.getKey() + "' do not match",
- systemEntries.getProperty(propertySourceEntry.getKey()), propertySourceEntry.getValue());
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/provider/JavaConfigurationProviderTest.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/provider/JavaConfigurationProviderTest.java b/java7/core/src/test/java/org/apache/tamaya/core/provider/JavaConfigurationProviderTest.java
deleted file mode 100644
index f099da4..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/provider/JavaConfigurationProviderTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.provider;
-
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.core.provider.JavaConfigurationProvider;
-import org.apache.tamaya.spi.PropertySource;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.Collection;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasSize;
-import static org.hamcrest.Matchers.notNullValue;
-
-public class JavaConfigurationProviderTest {
-
- @Test
- public void testJavaConfigurationProvider() {
-
- Collection<PropertySource> propertySources = new JavaConfigurationProvider().getPropertySources();
-
- assertThat(propertySources, notNullValue());
- assertThat(propertySources, hasSize(1));
-
- PropertySource propertySource = propertySources.iterator().next();
-
- assertThat(propertySource.getProperties().keySet(), hasSize(5));
-
- for (int i = 1; i < 6; i++) {
- String key = "confkey" + i;
- String value = "javaconf-value" + i;
-
- Assert.assertEquals(value, propertySource.get(key));
-
- // check if we had our key in configuration.current
- Assert.assertTrue(ConfigurationProvider.getConfiguration().getProperties().containsKey(key));
- Assert.assertEquals(value, ConfigurationProvider.getConfiguration().get(key));
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyDefaultSource.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyDefaultSource.java b/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyDefaultSource.java
deleted file mode 100644
index 6c8751c..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyDefaultSource.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.testdata;
-
-import org.apache.tamaya.core.propertysource.BasePropertySource;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Test provider reading properties from classpath:cfg/defaults/**.properties.
- */
-public class TestPropertyDefaultSource extends BasePropertySource{
-
- private Map<String,String> properties = new HashMap<>();
-
- public TestPropertyDefaultSource() {
- super(100);
- properties.put("name","Anatole");
- properties.put("name2","Sabine");
- properties = Collections.unmodifiableMap(properties);
- }
-
- @Override
- public String getName() {
- return "default-testdata-properties";
- }
-
- @Override
- public Map<String, String> getProperties() {
- return properties;
- }
-
- @Override
- public boolean isScannable() {
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java b/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java
deleted file mode 100644
index 6faa831..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertyFilter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.testdata;
-
-import org.apache.tamaya.spi.PropertyFilter;
-
-import javax.annotation.Priority;
-
-/**
- * Simple PropertyFilter that filters exact one value, registered using ServiceLoader.
- */
-@Priority(100)
-public class TestPropertyFilter implements PropertyFilter{
- @Override
- public String filterProperty(String key, String valueToBeFiltered) {
- if("name4".equals(key)){
- return valueToBeFiltered + "(filtered)";
- }
- return valueToBeFiltered;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertySourceProvider.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertySourceProvider.java b/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertySourceProvider.java
deleted file mode 100644
index 5706478..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestPropertySourceProvider.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.testdata;
-
-import org.apache.tamaya.core.propertysource.BasePropertySource;
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertySourceProvider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Test provider reading properties from classpath:cfg/final/**.properties.
- */
-public class TestPropertySourceProvider implements PropertySourceProvider {
-
- private List<PropertySource> list = new ArrayList<>();
-
- public TestPropertySourceProvider(){
- list.add(new MyPropertySource());
- list = Collections.unmodifiableList(list);
- }
-
- @Override
- public Collection<PropertySource> getPropertySources() {
- return list;
- }
-
- private static class MyPropertySource extends BasePropertySource {
-
- private Map<String, String> properties = new HashMap<>();
-
- public MyPropertySource() {
- super(200);
- properties.put("name", "Robin");
- properties.put("name3", "Lukas");
- properties.put("name4", "Sereina");
- properties.put("name5", "Benjamin");
- properties = Collections.unmodifiableMap(properties);
- }
-
- @Override
- public String getName() {
- return "final-testdata-properties";
- }
-
- @Override
- public Map<String, String> getProperties() {
- return properties;
- }
-
- @Override
- public boolean isScannable() {
- return true;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingPropertyFilter.java
----------------------------------------------------------------------
diff --git a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingPropertyFilter.java b/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingPropertyFilter.java
deleted file mode 100644
index 5a57ad1..0000000
--- a/java7/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingPropertyFilter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.core.testdata;
-
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.spi.PropertyFilter;
-
-import javax.annotation.Priority;
-
-/**
- * Simple PropertyFilter that filters exact one value, registered using ServiceLoader.
- */
-@Priority(200)
-public class TestRemovingPropertyFilter implements PropertyFilter{
- @Override
- public String filterProperty(String key, String valueToBeFiltered) {
- if("name5".equals(key)){
- return null;
- }
- else if("name3".equals(key)){
- return "Mapped to name: " + ConfigurationProvider.getConfiguration().get("name");
- }
- return valueToBeFiltered;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/META-INF/javaconfiguration.properties
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/META-INF/javaconfiguration.properties b/java7/core/src/test/resources/META-INF/javaconfiguration.properties
deleted file mode 100644
index 33beabb..0000000
--- a/java7/core/src/test/resources/META-INF/javaconfiguration.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-confkey1=javaconf-value1
-confkey2=javaconf-value2
-confkey3=javaconf-value3
-confkey4=javaconf-value4
-confkey5=javaconf-value5
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface b/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface
deleted file mode 100644
index f203fa6..0000000
--- a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityInterface
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityImpl1
-org.apache.tamaya.core.internal.DefaultServiceContextTest$InvalidPriorityImpl2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface b/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface
deleted file mode 100644
index b144790..0000000
--- a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImplsInterface
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImpl1
-org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImpl2
-org.apache.tamaya.core.internal.DefaultServiceContextTest$MultiImpl3
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter b/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
deleted file mode 100644
index d039696..0000000
--- a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy current the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.core.internal.CTestConverter
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter b/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter
deleted file mode 100644
index 18e61cb..0000000
--- a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy current the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.core.testdata.TestPropertyFilter
-org.apache.tamaya.core.testdata.TestRemovingPropertyFilter
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource b/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
deleted file mode 100644
index 409c9cb..0000000
--- a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy current the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.core.testdata.TestPropertyDefaultSource
-org.apache.tamaya.core.propertysource.SystemPropertySource
-org.apache.tamaya.core.propertysource.EnvironmentPropertySource
-org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider b/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider
deleted file mode 100644
index 9c352f4..0000000
--- a/java7/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy current the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.core.testdata.TestPropertySourceProvider
-org.apache.tamaya.core.provider.JavaConfigurationProvider
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/overrideOrdinal.properties
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/overrideOrdinal.properties b/java7/core/src/test/resources/overrideOrdinal.properties
deleted file mode 100644
index 96935a8..0000000
--- a/java7/core/src/test/resources/overrideOrdinal.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-#override ordinal
-tamaya.ordinal=16784
-
-mykey1=myval1
-mykey2=myval2
-mykey3=myval3
-mykey4=myval4
-mykey5=myval5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/testfile.properties
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/testfile.properties b/java7/core/src/test/resources/testfile.properties
deleted file mode 100644
index abd7ee8..0000000
--- a/java7/core/src/test/resources/testfile.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-key1=val1
-key2=val2
-key3=val3
-key4=val4
-key5=val5
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/core/src/test/resources/x34.properties
----------------------------------------------------------------------
diff --git a/java7/core/src/test/resources/x34.properties b/java7/core/src/test/resources/x34.properties
deleted file mode 100644
index f2c4a0a..0000000
--- a/java7/core/src/test/resources/x34.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-x34=x34
-x34.a.b.c=C
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java7/pom.xml
----------------------------------------------------------------------
diff --git a/java7/pom.xml b/java7/pom.xml
deleted file mode 100644
index 8814624..0000000
--- a/java7/pom.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-all</artifactId>
- <version>0.2-incubating-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>tamaya-java7</artifactId>
- <packaging>pom</packaging>
- <name>Apache Tamaya Java 7 Parent</name>
-
- <properties>
- <jdkVersion>1.7</jdkVersion>
- </properties>
-
-
- <modules>
- <module>api</module>
- <module>core</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <!-- use java7 to compile the modules in this tree -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-toolchains-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>toolchain</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <toolchains>
- <jdk>
- <version>[1.7,1.8)</version>
- </jdk>
- </toolchains>
- </configuration>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <logViolationsToConsole>true</logViolationsToConsole>
- <configLocation>checkstyle/style.xml</configLocation>
- </configuration>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>buildconfigurations</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <excludeFilterFile>findbugs/findbugs-exclude.xml</excludeFilterFile>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>buildconfigurations</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java8/api/pom.xml
----------------------------------------------------------------------
diff --git a/java8/api/pom.xml b/java8/api/pom.xml
deleted file mode 100644
index 0d4e8a5..0000000
--- a/java8/api/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy current the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-java8</artifactId>
- <version>0.2-incubating-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>tamaya-api</artifactId>
- <name>Apache Tamaya Java 8 API</name>
- <description>
- The API defines a complete SE based API for reading of configuration data.
- </description>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java8/api/src/main/java/org/apache/tamaya/ConfigException.java
----------------------------------------------------------------------
diff --git a/java8/api/src/main/java/org/apache/tamaya/ConfigException.java b/java8/api/src/main/java/org/apache/tamaya/ConfigException.java
deleted file mode 100644
index e3b6fb8..0000000
--- a/java8/api/src/main/java/org/apache/tamaya/ConfigException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya;
-
-/**
- * Exception class (runtime exception) for configuration issues.
- */
-public class ConfigException extends RuntimeException {
-
- private static final long serialVersionUID = -5886094818057522680L;
-
- /**
- * Creates a new configuration exception.
- *
- * @param message the exception message, not null.
- */
- public ConfigException(String message) {
- super(message);
- }
-
- /**
- * Creates a new configuration exception.
- *
- * @param message the exception message, not null.
- * @param t the throwable.
- */
- public ConfigException(String message, Throwable t) {
- super(message, t);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java8/api/src/main/java/org/apache/tamaya/ConfigOperator.java
----------------------------------------------------------------------
diff --git a/java8/api/src/main/java/org/apache/tamaya/ConfigOperator.java b/java8/api/src/main/java/org/apache/tamaya/ConfigOperator.java
deleted file mode 100644
index 35c583c..0000000
--- a/java8/api/src/main/java/org/apache/tamaya/ConfigOperator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya;
-
-/**
- * Models a function that maps a given {@link Configuration} to another {@link Configuration}. This can be used
- * to modell additional functionality and applying it to a given {@link Configuration} instance by calling
- * the {@link Configuration#with(ConfigOperator)} method.
- */
-@FunctionalInterface
-public interface ConfigOperator {
-
- /**
- * Creates a new {@link Configuration} based on the given Configuration. Operators basically acts similar to
- * decorators, whereas operated instances may have non compatible behaviour, e.g. by applying security constraints
- * or view restrictions.
- *
- * @param config the input configuration, not null.
- * @return the operated configuration, never null.
- */
- Configuration operate(Configuration config);
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java8/api/src/main/java/org/apache/tamaya/ConfigQuery.java
----------------------------------------------------------------------
diff --git a/java8/api/src/main/java/org/apache/tamaya/ConfigQuery.java b/java8/api/src/main/java/org/apache/tamaya/ConfigQuery.java
deleted file mode 100644
index 6151d03..0000000
--- a/java8/api/src/main/java/org/apache/tamaya/ConfigQuery.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya;
-
-/**
- * Models a function that maps a given {@link org.apache.tamaya.Configuration} to something else. This can be used
- * to model additional functionality and applying it to a given {@link org.apache.tamaya.Configuration} instance by
- * calling the {@link org.apache.tamaya.Configuration#query(org.apache.tamaya.ConfigQuery)} method.
- * @param <T> the result type of the query.
- */
-@FunctionalInterface
-public interface ConfigQuery<T> {
-
- /**
- * Creates a result based on the given Configuration. Queries basically acts similar to
- * operators, whereas they returns any kind of result.
- *
- * @param config the input configuration, not null.
- * @return the query result.
- */
- T query(Configuration config);
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java8/api/src/main/java/org/apache/tamaya/Configuration.java
----------------------------------------------------------------------
diff --git a/java8/api/src/main/java/org/apache/tamaya/Configuration.java b/java8/api/src/main/java/org/apache/tamaya/Configuration.java
deleted file mode 100644
index 583a1bf..0000000
--- a/java8/api/src/main/java/org/apache/tamaya/Configuration.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya;
-
-import java.util.Map;
-import java.util.Optional;
-import java.util.OptionalDouble;
-import java.util.OptionalInt;
-import java.util.OptionalLong;
-
-
-/**
- * A configuration models a aggregated set current properties, identified by a unique key, but adds higher level access functions to
- * a {@link org.apache.tamaya.spi.PropertySource}. Hereby in most cases a configuration is a wrapper around a composite
- * {@link org.apache.tamaya.spi.PropertySource} instance, which may combine multiple child config in well defined tree like structure,
- * where nodes define logically the rules current priority, filtering, combination and overriding.
- * <br/>
- * <h3>Implementation Requirements</h3>
- * Implementations current this interface must be
- * <ul>
- * <li>Thread safe.
- * <li>Immutable
- * </ul>
- * It is not recommended that implementations also are serializable, since the any configuration can be <i>freezed</i>
- * by reading out its complete configuration map into a serializable and remotable structure. This helps significantly
- * simplifying the development current this interface, e.g. for being backed up by systems and stores that are not part current
- * this library at all.
- */
-public interface Configuration {
-
- /**
- * Access a property.
- *
- * @param key the property's key, not null.
- * @return the property's value or {@code null}.
- */
- default String get(String key) {
- return getProperties().get(key);
- }
-
-
- /**
- * Get the property keys as type T. This will implicitly require a corresponding {@link
- * org.apache.tamaya.spi.PropertyConverter} to be available that is capable current providing type T
- * fromMap the given String keys.
- *
- * @param key the property's absolute, or relative path, e.g. @code
- * a/b/c/d.myProperty}.
- * @param type The target type required, not null.
- * @param <T> the target type.
- * @return the property value, never null..
- * @throws ConfigException if the keys could not be converted to the required target type.
- */
- default <T> T get(String key, Class<T> type) {
- return get(key, TypeLiteral.of(type));
- }
-
- /**
- * Get the property keys as type T. This will implicitly require a corresponding {@link
- * org.apache.tamaya.spi.PropertyConverter} to be available that is capable current providing type T
- * fromMap the given String keys.
- *
- * @param key the property's absolute, or relative path, e.g. @code
- * a/b/c/d.myProperty}.
- * @param type The target type required, not null.
- * @param <T> the target type.
- * @return the property value, or null, if the underlying value is null as well.
- * @throws ConfigException if the value could not be converted to the required target type by any of the
- * registered converters.
- */
- <T> T get(String key, TypeLiteral<T> type);
-
- /**
- * Access a property.
- *
- * @param key the property's key, not null.
- * @return the property's keys.
- */
- default Optional<String> getOptional(String key) {
- return Optional.ofNullable(get(key));
- }
-
- /**
- * Get the property keys as type T. This will implicitly require a corresponding {@link
- * org.apache.tamaya.spi.PropertyConverter} to be available that is capable current providing type T
- * fromMap the given String keys.
- *
- * @param key the property's absolute, or relative path, e.g. @code
- * a/b/c/d.myProperty}.
- * @param type The target type required, not null.
- * @param <T> the target type.
- * @return the property value, never null..
- * @throws ConfigException if the keys could not be converted to the required target type.
- */
- default <T> Optional<T> getOptional(String key, Class<T> type) {
- return Optional.ofNullable(get(key, type));
- }
-
- /**
- * Get the property keys as type T. This will implicitly require a corresponding {@link
- * org.apache.tamaya.spi.PropertyConverter} to be available that is capable current providing type T
- * fromMap the given String keys.
- *
- * @param key the property's absolute, or relative path, e.g. @code
- * a/b/c/d.myProperty}.
- * @param type The target type required, not null.
- * @param <T> the target type.
- * @return the property value, never null..
- * @throws ConfigException if the keys could not be converted to the required target type.
- */
- default <T> Optional<T> getOptional(String key, TypeLiteral<T> type) {
- return Optional.ofNullable(get(key, type));
- }
-
- /**
- * Access all current known Configuration properties as a full {@code Map<String,String>}.
- * Be aware that entries from non scannable parts of the registered {@link org.apache.tamaya.spi.PropertySource}
- * instances may not be contained in the result, but nevertheless be accessible calling one of the
- * {@code get(...)} methods.
- *
- * @return the current properties. These may not include all properties from non-scannable
- * {@link org.apache.tamaya.spi.PropertySource}s.
- */
- @SuppressWarnings("JavaDoc")
- Map<String, String> getProperties();
-
-
- /**
- * Get the property keys as {@link Boolean}.
- *
- * @param key the property's absolute, or relative path, e.g. {@code
- * a/b/c/d.myProperty}.
- * @return the property's keys.
- * @throws ConfigException if the configured value could not be converted to the target type.
- * @since Java8
- */
- default Optional<Boolean> getBoolean(String key) {
- return getOptional(key, Boolean.class);
- }
-
- /**
- * Get the property keys as {@link Integer}.
- *
- * @param key the property's absolute, or relative path, e.g. @code
- * a/b/c/d.myProperty}.
- * @return the property's keys.
- * @throws ConfigException if the configured value could not be converted to the target type.
- * @since Java8
- */
- default OptionalInt getInteger(String key) {
- Optional<Integer> val = getOptional(key, Integer.class);
-
- if (val.isPresent()) {
- return OptionalInt.of(val.get());
- }
- return OptionalInt.empty();
- }
-
- /**
- * Get the property keys as {@link Long}.
- *
- * @param key the property's absolute, or relative path, e.g. @code
- * a/b/c/d.myProperty}.
- * @return the property's keys.
- * @throws ConfigException if the configured value could not be converted to the target type.
- * @since Java8
- */
- default OptionalLong getLong(String key) {
- Optional<Long> val = getOptional(key, Long.class);
- if (val.isPresent()) {
- return OptionalLong.of(val.get());
- }
- return OptionalLong.empty();
- }
-
- /**
- * Get the property keys as {@link Double}.
- *
- * @param key the property's absolute, or relative path, e.g. @code
- * a/b/c/d.myProperty}.
- * @return the property's keys.
- * @throws ConfigException if the configured value could not be converted to the target type.
- * @since Java8
- */
- default OptionalDouble getDouble(String key) {
-
- Optional<Double> val = getOptional(key, Double.class);
- if (val.isPresent()) {
- return OptionalDouble.of(val.get());
- }
- return OptionalDouble.empty();
- }
-
- /**
- * Extension point for adjusting configuration.
- *
- * @param operator A configuration operator, e.g. a filter, or an adjuster
- * combining configurations.
- * @return the new adjusted configuration, never {@code null}.
- */
- default Configuration with(ConfigOperator operator) {
- return operator.operate(this);
- }
-
- /**
- * Query a configuration.
- *
- * @param query the query, never {@code null}.
- * @param <T> the target query result type.
- * @return the result
- */
- default <T> T query(ConfigQuery<T> query) {
- return query.query(this);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b6dc2eed/java8/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/java8/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java b/java8/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java
deleted file mode 100644
index 03bd262..0000000
--- a/java8/api/src/main/java/org/apache/tamaya/ConfigurationProvider.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya;
-
-import org.apache.tamaya.spi.ConfigurationContext;
-import org.apache.tamaya.spi.ConfigurationContextBuilder;
-import org.apache.tamaya.spi.ConfigurationProviderSpi;
-import org.apache.tamaya.spi.ServiceContextManager;
-
-import java.util.Objects;
-
-/**
- * Static access to the {@link org.apache.tamaya.Configuration} for the very application.
- */
-public final class ConfigurationProvider {
-
- private static final ConfigurationProviderSpi PROVIDER_SPI = Objects.requireNonNull(ServiceContextManager.getServiceContext()
- .getService(ConfigurationProviderSpi.class));
-
- private ConfigurationProvider() {
- // just to prevent initialisation
- }
-
- /**
- * Access the current configuration.
- *
- * @return the corresponding Configuration instance, never null.
- */
- public static Configuration getConfiguration() {
- return PROVIDER_SPI.getConfiguration();
- }
-
- /**
- * Get access to the current ConfigurationContext.
- *
- * @return the current ConfigurationContext, never null.
- */
- public static ConfigurationContext getConfigurationContext() {
- return PROVIDER_SPI.getConfigurationContext();
- }
-
- /**
- * This method allows to replace the current {@link org.apache.tamaya.spi.ConfigurationContext} with a new
- * instance. This can be used to update the context with a new one, e.g. because some of the configuration
- * data has changed and should be updated. It is the responsibility of the ConfigurationProvider to trigger
- * corresponding update events for the current {@link org.apache.tamaya.Configuration}, so observing
- * listeners can do whatever is appropriate to react to any given configuration changes.
- *
- * @param context the new ConfigurationContext to be applied.
- * @throws java.lang.UnsupportedOperationException if the current provider is read-only and does not support
- * applying a new ConfigurationContext.
- */
- public static void setConfigurationContext(ConfigurationContext context) {
- PROVIDER_SPI.setConfigurationContext(context);
- }
-
- /**
- * Create a new {@link org.apache.tamaya.spi.ConfigurationContextBuilder} instance. This method creates
- * a new builder instance that is not related to any concrete {@link org.apache.tamaya.spi.ConfigurationContext}.
- * You can use {@link #setConfigurationContext(org.apache.tamaya.spi.ConfigurationContext)} to change the
- * current configuration context.
- *
- * @return a new, empty {@link org.apache.tamaya.spi.ConfigurationContextBuilder}, never null.
- * @see #setConfigurationContext(org.apache.tamaya.spi.ConfigurationContext)
- * @see org.apache.tamaya.spi.ConfigurationContext
- */
- public static ConfigurationContextBuilder getConfigurationContextBuilder() {
- return PROVIDER_SPI.getConfigurationContextBuilder();
- }
-
-}