tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ple...@apache.org
Subject [21/24] incubator-tamaya git commit: Removed all modules from the main repository. They will be reborn in separate ASF repository.
Date Thu, 15 Sep 2016 17:26:38 GMT
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
----------------------------------------------------------------------
diff --git a/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter b/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
deleted file mode 100644
index 9a93a69..0000000
--- a/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
+++ /dev/null
@@ -1,31 +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.collections.internal.ArrayListConverter
-org.apache.tamaya.collections.internal.CollectionConverter
-org.apache.tamaya.collections.internal.HashMapConverter
-org.apache.tamaya.collections.internal.ConcurrentHashMapConverter
-org.apache.tamaya.collections.internal.HashSetConverter
-org.apache.tamaya.collections.internal.LinkedListConverter
-org.apache.tamaya.collections.internal.ListConverter
-org.apache.tamaya.collections.internal.MapConverter
-org.apache.tamaya.collections.internal.SetConverter
-org.apache.tamaya.collections.internal.SortedSetConverter
-org.apache.tamaya.collections.internal.SortedMapConverter
-org.apache.tamaya.collections.internal.TreeMapConverter
-org.apache.tamaya.collections.internal.TreeSetConverter

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyValueCombinationPolicy
----------------------------------------------------------------------
diff --git a/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyValueCombinationPolicy b/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyValueCombinationPolicy
deleted file mode 100644
index 6b7a67b..0000000
--- a/modules/collections/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyValueCombinationPolicy
+++ /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.collections.internal.AdaptiveCombinationPolicy
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionAdvancedTests.java
----------------------------------------------------------------------
diff --git a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionAdvancedTests.java b/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionAdvancedTests.java
deleted file mode 100644
index 43f1f4f..0000000
--- a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionAdvancedTests.java
+++ /dev/null
@@ -1,117 +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.collections;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.TypeLiteral;
-import org.junit.Test;
-
-import java.util.Currency;
-import java.util.List;
-import java.util.Map;
-
-import static junit.framework.TestCase.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-/**
- * Created by atsticks on 16.02.16.
- */
-public class CollectionAdvancedTests {
-
-    /**
-     * Tests if a custom separator works, Config is
-     * <pre>
-     *  sep-list=a,b,c|d,e,f|g,h,i
-     *  _sep-list.collection-type=List
-     *  _sep-list.collection-separator=|
-     * </pre>
-     */
-    @Test
-    public void testCustomSeparator(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = config.get("sep-list", new TypeLiteral<List<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(3, items.size());
-        assertEquals("a,b,c", items.get(0));
-        assertEquals("d,e,f", items.get(1));
-        assertEquals("g,h,i", items.get(2));
-    }
-
-    /**
-     * Test typed content.
-     * <pre>
-     *  currency-list=CHF,USD,YEN
-     *  _currency-list.collection-type=List
-     * </pre>
-     */
-    @Test
-    public void testTypedContent(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<Currency> items = config.get("currency-list", new TypeLiteral<List<Currency>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(3, items.size());
-        assertEquals("CHF", items.get(0).getCurrencyCode());
-        assertEquals("USD", items.get(1).getCurrencyCode());
-        assertEquals("USS", items.get(2).getCurrencyCode());
-    }
-
-    /**
-     * Tests if a custom parser works, Config is
-     * <pre>
-     *  parser-list=a,b,c
-     *  _parser-list.collection-type=List
-     *  _parser-list.item-converter=org.apache.tamaya.collections.MyUpperCaseConverter
-     * </pre>
-     */
-    @Test
-    public void testCustomParser(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = config.get("parser-list", new TypeLiteral<List<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(3, items.size());
-        assertEquals("(A)", items.get(0));
-        assertEquals("(B)", items.get(1));
-        assertEquals("(C)", items.get(2));
-    }
-
-    /**
-     * Redefined map format parsing, Config is as follows:
-     * <pre>
-     *  redefined-map=0==none | 1==single | 2==any
-     *  _redefined-map.map-entry-separator===
-     *  _redefined-map.item-separator=|
-     * </pre>
-     */
-    @Test
-    public void testCustomMapParser(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("redefined-map", Map.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(3, items.size());
-        assertEquals("none", items.get("0"));
-        assertEquals("single", items.get("1"));
-        assertEquals("any", items.get("2"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsBaseTests.java
----------------------------------------------------------------------
diff --git a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsBaseTests.java b/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsBaseTests.java
deleted file mode 100644
index 34c82cb..0000000
--- a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsBaseTests.java
+++ /dev/null
@@ -1,227 +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.collections;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.TypeLiteral;
-import org.junit.Test;
-
-import java.util.*;
-
-import static junit.framework.TestCase.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-/**
- * Basic tests for Tamaya collection support. Relevant configs for this tests:
- * <pre>base.items=1,2,3,4,5,6,7,8,9,0
- * base.map=1::a, 2::b, 3::c, [4:: ]
- * </pre>
- */
-public class CollectionsBaseTests {
-
-    @Test
-    public void testList_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = config.get("base.items", new TypeLiteral<List<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (List<String>) config.get("base.items", List.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-
-    @Test
-    public void testArrayList_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        ArrayList<String> items = config.get("base.items", new TypeLiteral<ArrayList<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (ArrayList<String>) config.get("base.items", ArrayList.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-
-    @Test
-    public void testLinkedList_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        LinkedList<String> items = config.get("base.items", new TypeLiteral<LinkedList<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (LinkedList<String>) config.get("base.items", LinkedList.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-
-    @Test
-    public void testSet_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = config.get("base.items", new TypeLiteral<Set<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (Set<String>) config.get("base.items", Set.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-
-    @Test
-    public void testSortedSet_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = config.get("base.items", new TypeLiteral<SortedSet<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (SortedSet<String>) config.get("base.items", SortedSet.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-
-    @Test
-    public void testHashSet_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = config.get("base.items", new TypeLiteral<HashSet<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (HashSet<String>) config.get("base.items", HashSet.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-
-    @Test
-    public void testTreeSet_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        TreeSet<String> items = config.get("base.items", new TypeLiteral<TreeSet<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (TreeSet<String>) config.get("base.items", TreeSet.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-
-    @Test
-    public void testMap_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("base.map", new TypeLiteral<Map<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items = (Map<String,String>) config.get("base.map", Map.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-    }
-
-    @Test
-    public void testHashMap_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("base.map", new TypeLiteral<HashMap<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items = (HashMap<String,String>) config.get("base.map", HashMap.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-    }
-
-    @Test
-    public void testSortedMap_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("base.map", new TypeLiteral<SortedMap<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items = (Map<String,String>) config.get("base.map", SortedMap.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-    }
-
-    @Test
-    public void testTreeMap_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        TreeMap<String,String> items = config.get("base.map", new TypeLiteral<TreeMap<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items =  config.get("base.map", TreeMap.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-    }
-
-    @Test
-    public void testCollection_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Collection<String> items = config.get("base.items", new TypeLiteral<Collection<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items = (Collection<String>) config.get("base.items", Collection.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedReadOnlyTests.java
----------------------------------------------------------------------
diff --git a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedReadOnlyTests.java b/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedReadOnlyTests.java
deleted file mode 100644
index 7882512..0000000
--- a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedReadOnlyTests.java
+++ /dev/null
@@ -1,173 +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.collections;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.TypeLiteral;
-import org.junit.Test;
-
-import java.util.*;
-
-import static junit.framework.TestCase.assertEquals;
-import static org.junit.Assert.*;
-
-/**
- * Basic tests for Tamaya collection support. Relevant configs for this tests:
- * <pre>base.items=1,2,3,4,5,6,7,8,9,0
- * base.map=1::a, 2::b, 3::c, [4:: ]
- * </pre>
- */
-public class CollectionsTypedReadOnlyTests {
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testArrayListList_1(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = config.get("typed.arraylist", new TypeLiteral<List<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testArrayListList_2(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = (List<String>) config.get("typed.arraylist", List.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testLinkedListList_1(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = config.get("typed.linkedlist", new TypeLiteral<List<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testLinkedListList_2(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = (List<String>) config.get("typed.linkedlist", List.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testHashSet_1(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = config.get("typed.hashset", new TypeLiteral<Set<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void testHashSet_2(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = (Set<String>) config.get("typed.hashset", Set.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testTreeSet_1(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = config.get("typed.treeset", new TypeLiteral<Set<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void testTreeSet_2(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = items = (Set<String>) config.get("typed.treeset", Set.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        items.add("test");
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testHashMap_1(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("typed.hashmap", new TypeLiteral<Map<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items.put("g","hjhhj");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void testHashMap_2(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = (Map<String,String>) config.get("typed.hashmap", Map.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items.put("g","hjhhj");
-    }
-
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testTreeMap_1(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("typed.treemap", new TypeLiteral<Map<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items.put("g","hjhhj");
-    }
-    @Test(expected=UnsupportedOperationException.class)
-    public void testTreeMap_2(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = (Map<String,String>) config.get("typed.treemap", Map.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        items.put("g","hjhhj");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java
----------------------------------------------------------------------
diff --git a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java b/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java
deleted file mode 100644
index b4e4d52..0000000
--- a/modules/collections/src/test/java/org/apache/tamaya/collections/CollectionsTypedTests.java
+++ /dev/null
@@ -1,208 +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.collections;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-import org.apache.tamaya.TypeLiteral;
-import org.junit.Test;
-
-import java.util.*;
-
-import static junit.framework.TestCase.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Basic tests for Tamaya collection support. Relevant configs for this tests:
- * <pre>base.items=1,2,3,4,5,6,7,8,9,0
- * base.map=1::a, 2::b, 3::c, [4:: ]
- * </pre>
- */
-public class CollectionsTypedTests {
-
-    @Test
-    public void testArrayListList_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = config.get("typed2.arraylist", new TypeLiteral<List<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof ArrayList);
-        items = (List<String>) config.get("typed2.arraylist", List.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof ArrayList);
-    }
-
-    @Test
-    public void testLinkedListList_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        List<String> items = config.get("typed2.linkedlist", new TypeLiteral<List<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof LinkedList);
-        items = (List<String>) config.get("typed2.linkedlist", List.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof LinkedList);
-    }
-
-
-    @Test
-    public void testHashSet_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = config.get("typed2.hashset", new TypeLiteral<Set<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof HashSet);
-        items = (Set<String>) config.get("typed2.hashset", Set.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof HashSet);
-    }
-
-    @Test
-    public void testTreeSet_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Set<String> items = config.get("typed2.treeset", new TypeLiteral<Set<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof TreeSet);
-        items = (Set<String>) config.get("typed2.treeset", Set.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof TreeSet);
-    }
-
-    @Test
-    public void testHashMap_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("typed2.hashmap", new TypeLiteral<Map<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        assertTrue(items instanceof HashMap);
-        items = (Map<String,String>) config.get("typed2.hashmap", Map.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        assertTrue(items instanceof HashMap);
-    }
-
-    @Test
-    public void testTreeMap_String(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Map<String,String> items = config.get("typed2.treemap", new TypeLiteral<Map<String,String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        assertTrue(items instanceof TreeMap);
-        items = (Map<String,String>) config.get("typed2.treemap", Map.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(4, items.size());
-        assertEquals("a", items.get("1"));
-        assertEquals("b", items.get("2"));
-        assertEquals("c", items.get("3"));
-        assertEquals(" ", items.get("4"));
-        assertTrue(items instanceof TreeMap);
-    }
-
-    @Test
-    public void testCollection_HashSet(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Collection<String> items = config.get("typed2.hashset", new TypeLiteral<Collection<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof HashSet);
-        items = (Collection<String>) config.get("typed2.hashset", Collection.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof HashSet);
-    }
-
-    @Test
-    public void testCollection_TreeSet(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Collection<String> items = config.get("typed2.treeset", new TypeLiteral<Collection<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof TreeSet);
-        items = (Collection<String>) config.get("typed2.treeset", Collection.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof TreeSet);
-    }
-
-    @Test
-    public void testCollection_ArrayList(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Collection<String> items = config.get("typed2.arraylist", new TypeLiteral<Collection<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof ArrayList);
-        items = (Collection<String>) config.get("typed2.arraylist", Collection.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof ArrayList);
-    }
-
-    @Test
-    public void testCollection_LinkedList(){
-        Configuration config = ConfigurationProvider.getConfiguration();
-        Collection<String> items = config.get("typed2.linkedlist", new TypeLiteral<Collection<String>>(){});
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof LinkedList);
-        items = (Collection<String>) config.get("typed2.linkedlist", Collection.class);
-        assertNotNull(items);
-        assertFalse(items.isEmpty());
-        assertEquals(10, items.size());
-        assertTrue(items instanceof LinkedList);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/test/java/org/apache/tamaya/collections/MyUpperCaseConverter.java
----------------------------------------------------------------------
diff --git a/modules/collections/src/test/java/org/apache/tamaya/collections/MyUpperCaseConverter.java b/modules/collections/src/test/java/org/apache/tamaya/collections/MyUpperCaseConverter.java
deleted file mode 100644
index 1c95261..0000000
--- a/modules/collections/src/test/java/org/apache/tamaya/collections/MyUpperCaseConverter.java
+++ /dev/null
@@ -1,33 +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.collections;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-/**
- * Example converter that is used for testing the custom parsing functionality. It sorrounds values with () and
- * converts them to uppercase.
- */
-public class MyUpperCaseConverter implements PropertyConverter<String>{
-    @Override
-    public String convert(String value, ConversionContext context) {
-        return "("+value.toUpperCase()+")";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/collections/src/test/resources/META-INF/javaconfiguration.properties
----------------------------------------------------------------------
diff --git a/modules/collections/src/test/resources/META-INF/javaconfiguration.properties b/modules/collections/src/test/resources/META-INF/javaconfiguration.properties
deleted file mode 100644
index e9a234c..0000000
--- a/modules/collections/src/test/resources/META-INF/javaconfiguration.properties
+++ /dev/null
@@ -1,73 +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.
-#
-# Similar to etcd all keys starting with a _ are hidden by default (only directly accessible).
-
-# Config for base tests (no combination policy)
-base.items=1,2,3,4,5,6,7,8,9,0
-base.map=1::a, 2::b, 3::c, [4:: ]
-
-# Config for tests with explcit implementation types
-typed2.arraylist=1,2,3,4,5,6,7,8,9,0
-_typed2.arraylist.collection-type=ArrayList
-_typed2.arraylist.read-only=false
-typed2.linkedlist=1,2,3,4,5,6,7,8,9,0
-_typed2.linkedlist.collection-type=java.util.LinkedList
-_typed2.linkedlist.read-only=false
-typed2.hashset=1,2,3,4,5,6,7,8,9,0
-_typed2.hashset.collection-type=HashSet
-_typed2.hashset.read-only=false
-typed2.treeset=1,2,3,4,5,6,7,8,9,0
-_typed2.treeset.collection-type=TreeSet
-_typed2.treeset.read-only=false
-typed2.hashmap=1::a, 2::b, 3::c, [4:: ]
-_typed2.hashmap.collection-type=java.util.HashMap
-_typed2.hashmap.read-only=false
-typed2.treemap=1::a, 2::b, 3::c, [4:: ]
-_typed2.treemap.collection-type=TreeMap
-_typed2.treemap.read-only=false
-
-# Config for tests with combination policy, writable
-typed.arraylist=1,2,3,4,5,6,7,8,9,0
-_typed.arraylist.collection-type=ArrayList
-typed.linkedlist=1,2,3,4,5,6,7,8,9,0
-_typed.linkedlist.collection-type=java.util.LinkedList
-typed.hashset=1,2,3,4,5,6,7,8,9,0
-_typed.hashset.collection-type=HashSet
-typed.treeset=1,2,3,4,5,6,7,8,9,0
-_typed.treeset.collection-type=TreeSet
-typed.hashmap=1::a, 2::b, 3::c, [4:: ]
-_typed.hashmap.collection-type=java.util.HashMap
-typed.treemap=1::a, 2::b, 3::c, [4:: ]
-_typed.treemap.collection-type=TreeMap
-
-# Config for advanced tests
-sep-list=a,b,c|d,e,f|g,h,i
-_sep-list.collection-type=List
-_sep-list.item-separator=|
-currency-list=CHF,USD,USS
-_currency-list.collection-type=List
-
-parser-list=a,b,c
-_parser-list.collection-type=List
-_parser-list.item-converter=org.apache.tamaya.collections.MyUpperCaseConverter
-
-redefined-map=0==none | 1==single | 2==any
-_redefined-map.map-entry-separator===
-_redefined-map.item-separator=|
-

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/pom.xml
----------------------------------------------------------------------
diff --git a/modules/events/pom.xml b/modules/events/pom.xml
deleted file mode 100644
index fb6c3b3..0000000
--- a/modules/events/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.ext</groupId>
-        <artifactId>tamaya-extensions</artifactId>
-        <version>0.3-incubating-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>tamaya-events</artifactId>
-    <name>Apache Tamaya Modules - Event and dynamic Update Extensions</name>
-    <packaging>bundle</packaging>
-
-    <properties>
-        <jdkVersion>1.7</jdkVersion>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.tamaya</groupId>
-            <artifactId>tamaya-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tamaya.ext</groupId>
-            <artifactId>tamaya-functions</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tamaya.ext</groupId>
-            <artifactId>tamaya-spisupport</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tamaya</groupId>
-            <artifactId>tamaya-core</artifactId>
-            <version>${project.version}</version>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>java-hamcrest</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Export-Package>
-                            org.apache.tamaya.events,
-                            org.apache.tamaya.events.delta,
-                            org.apache.tamaya.events.folderobserver,
-                            org.apache.tamaya.events.spi
-                        </Export-Package>
-                        <Private-Package>
-                            org.apache.tamaya.events.internal
-                        </Private-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/src/main/java/org/apache/tamaya/events/ChangeType.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ChangeType.java b/modules/events/src/main/java/org/apache/tamaya/events/ChangeType.java
deleted file mode 100644
index 2059017..0000000
--- a/modules/events/src/main/java/org/apache/tamaya/events/ChangeType.java
+++ /dev/null
@@ -1,31 +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.events;
-
-/**
- * Enum describing the type of configuration change.
- */
-public enum ChangeType {
-    /** Configuration hase been added. */
-    NEW,
-    /** Configuration hase been removed. */
-    DELETED,
-    /** Configuration hase been changed. */
-    UPDATED,
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEvent.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEvent.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigEvent.java
deleted file mode 100644
index 5a713d7..0000000
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEvent.java
+++ /dev/null
@@ -1,55 +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.events;
-
-
-/**
- * Event that contains a set current changes that were applied or could be applied.
- * @param <T> the resource type.
- */
-public interface ConfigEvent<T>{
-
-    /**
-     * Access the type of resource. This allows to easily determine the resource an event wants to observe.
-     * @return the resource type.
-     */
-    Class<T> getResourceType();
-
-    /**
-     * Get the underlying property provider/configuration.
-     * @return the underlying property provider/configuration, never null.
-     */
-    T getResource();
-
-    /**
-     * Get the version relative to the observed resource. The version is required to be unique for
-     * each change emmitted for a resource. There is no further requirement how this uniqueness is
-     * modelled, so returning a UUID is a completely valid strategy.
-     * @return the base version.
-     */
-    String getVersion();
-
-    /**
-     * Get the timestamp in millis from the current epoch. it is expected that the timestamp and the version are unique to
-     * identify a changeset.
-     * @return the timestamp, when this changeset was created.
-     */
-    long getTimestamp();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java
deleted file mode 100644
index 7fb32c8..0000000
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventListener.java
+++ /dev/null
@@ -1,31 +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.events;
-
-/**
- * Interface to be implemented for listening on changes on {@link org.apache.tamaya.Configuration} instances.
- */
-public interface ConfigEventListener {
-    /**
-     * Called if an event occurred.
-     * @param event the event, not null.
-     */
-    void onConfigEvent(ConfigEvent<?> event);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
deleted file mode 100644
index f6bd3da..0000000
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
+++ /dev/null
@@ -1,186 +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.events;
-
-import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.events.spi.ConfigEventManagerSpi;
-import org.apache.tamaya.spi.ServiceContextManager;
-
-import java.util.Collection;
-
-/**
- * Singleton accessor for accessing the event support component that distributes change events of
- * {@link org.apache.tamaya.spi.PropertySource} and {@link org.apache.tamaya.Configuration}.
- */
-public final class ConfigEventManager {
-    /**
-     * The backing SPI.
-     */
-    private static final ConfigEventManagerSpi SPI = ServiceContextManager.getServiceContext()
-            .getService(ConfigEventManagerSpi.class);
-
-    /**
-     * Private singleton constructor.
-     */
-    private ConfigEventManager() {
-    }
-
-    /**
-     * Adds a Config listener that listens to all kind of {@link ConfigEvent}.
-     * @param l the listener not null.
-     */
-    public static void addListener(ConfigEventListener l) {
-        if (SPI == null) {
-            throw new ConfigException("No SPI registered for " +
-                    ConfigEventManager.class.getName());
-        }
-        SPI.addListener(l);
-    }
-
-    /**
-     * Adds a Config listener that listens to all kind of {@link ConfigEvent}.
-     * @param <T> the type of the event.
-     * @param l the listener not null.
-     * @param eventType the event type to which this listener listens to.
-     */
-    public static <T extends ConfigEvent> void addListener(ConfigEventListener l, Class<T> eventType) {
-        if (SPI == null) {
-            throw new ConfigException("No SPI registered for " +
-                    ConfigEventManager.class.getName());
-        }
-        SPI.addListener(l);
-    }
-
-    /**
-     * Removes a listener registered globally.
-     *
-     * @param l the listener not null.
-     */
-    public static void removeListener(ConfigEventListener l) {
-        if (SPI == null) {
-            throw new ConfigException("No SPI registered for " +
-                    ConfigEventManager.class.getName());
-        }
-        SPI.removeListener(l);
-    }
-
-    /**
-     * Removes a listener registered for the given event type.
-     *
-     * @param <T> the type of the event.
-     * @param l the listener, not null.
-     * @param eventType the event type to which this listener listens to.
-     */
-    public static <T extends ConfigEvent> void removeListener(ConfigEventListener l, Class<T> eventType) {
-        if (SPI == null) {
-            throw new ConfigException("No SPI registered for " +
-                    ConfigEventManager.class.getName());
-        }
-        SPI.removeListener(l);
-    }
-
-    /**
-     * Access all registered ConfigEventListeners listening to a given event type.
-     * @param type the event type
-     * @param <T> type param
-     * @return a list with the listeners found, never null.
-     */
-    public static <T extends ConfigEvent>
-        Collection<? extends ConfigEventListener> getListeners(Class<T> type) {
-        return SPI.getListeners(type);
-    }
-
-    /**
-     * Access all registered ConfigEventListeners listening to a all kind of event types globally.
-     * 
-     * @param <T> the type of the event.
-     * @return a list with the listeners found, never null.
-     */
-    public static <T extends ConfigEvent>
-    Collection<? extends ConfigEventListener> getListeners() {
-        return SPI.getListeners();
-    }
-
-    /**
-     * Publishes a {@link ConfigurationChange} synchronously to all interested listeners.
-     * 
-     * @param <T> the type of the event.
-     * @param event the event, not null.
-     */
-    public static <T> void fireEvent(ConfigEvent<?> event) {
-        SPI.fireEvent(event);
-    }
-
-    /**
-     * Publishes a {@link ConfigurationChange} asynchronously/multithreaded to all interested listeners.
-     *
-     * @param <T> the type of the event.
-     * @param event the event, not null.
-     */
-    public static <T> void fireEventAsynch(ConfigEvent<?> event) {
-        SPI.fireEventAsynch(event);
-    }
-
-    /**
-     * Start/Stop the change monitoring service, which will observe/reevaluate the current configuration regularly
-     * and trigger ConfigurationChange events if something changed. This is quite handy for publishing
-     * configuration changes to whatever systems are interested in. Hereby the origin of a configuration change
-     * can be on this machine, or also remotely. For handling corresponding {@link ConfigEventListener} have
-     * to be registered, e.g. listening on {@link org.apache.tamaya.events.ConfigurationChange} events.
-     * 
-     * @param enable whether to enable or disable the change monitoring.
-     * 
-     * @see #isChangeMonitoring()
-     * @see #getChangeMonitoringPeriod()
-     */
-    public static void enableChangeMonitoring(boolean enable) {
-        SPI.enableChangeMonitor(enable);
-    }
-
-    /**
-     * Check if the observer is running currently.
-     *
-     * @return true, if the change monitoring service is currently running.
-     * @see #enableChangeMonitoring(boolean)
-     */
-    public static boolean isChangeMonitoring() {
-        return SPI.isChangeMonitorActive();
-    }
-
-    /**
-     * Get the current check period to check for configuration changes.
-     *
-     * @return the check period in ms.
-     */
-    public static long getChangeMonitoringPeriod(){
-        return SPI.getChangeMonitoringPeriod();
-    }
-
-    /**
-     * Sets the current monitoring period and restarts the monitor. You still have to enable the monitor if
-     * it is currently not enabled.
-     * @param millis the monitoring period in ms.
-     * @see #enableChangeMonitoring(boolean)
-     * @see #isChangeMonitoring()
-     */
-    public static void setChangeMonitoringPeriod(long millis){
-        SPI.setChangeMonitoringPeriod(millis);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChange.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChange.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChange.java
deleted file mode 100644
index c31cda2..0000000
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChange.java
+++ /dev/null
@@ -1,218 +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.events;
-
-import org.apache.tamaya.Configuration;
-
-import java.beans.PropertyChangeEvent;
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-/**
- * Event that contains a set current changes that were applied or could be applied.
- * This class is immutable and thread-safe. To create instances use
- * {@link PropertySourceChangeBuilder}.
- *
- * Created by Anatole on 22.10.2014.
- */
-public final class ConfigurationChange implements ConfigEvent<Configuration>, Serializable{
-
-    private static final long serialVersionUID = 1L;
-    /** The base property provider/configuration. */
-    private final FrozenConfiguration configuration;
-    /** The base version, usable for optimistic locking. */
-    private String version = UUID.randomUUID().toString();
-    /** The timestamp of the change set in millis from the epoch. */
-    private long timestamp = System.currentTimeMillis();
-    /** The recorded changes. */
-    private final Map<String,PropertyChangeEvent> changes = new HashMap<>();
-
-    /**
-     * Get an empty change set for the given provider.
-     * @param configuration The configuration changed, not null.
-     * @return an empty ConfigurationChangeSet instance.
-     */
-    public static ConfigurationChange emptyChangeSet(Configuration configuration){
-        return ConfigurationChangeBuilder.of(configuration).build();
-    }
-
-    /**
-     * Constructor used by {@link PropertySourceChangeBuilder}.
-     * @param builder The builder used, not null.
-     */
-    ConfigurationChange(ConfigurationChangeBuilder builder) {
-        this.configuration = FrozenConfiguration.of(builder.source);
-        for(PropertyChangeEvent ev:builder.delta.values()){
-            this.changes.put(ev.getPropertyName(), ev);
-        }
-        if(builder.version!=null){
-            this.version = builder.version;
-        }
-        if(builder.timestamp!=null){
-            this.timestamp = builder.timestamp;
-        }
-    }
-
-    @Override
-    public Class<Configuration> getResourceType() {
-        return Configuration.class;
-    }
-
-    /**
-     * Get the underlying property provider/configuration.
-     * @return the underlying property provider/configuration, never null.
-     */
-    @Override
-    public Configuration getResource(){
-        return this.configuration;
-    }
-
-    /**
-     * Get the base version, usable for optimistic locking.
-     * @return the base version.
-     */
-    @Override
-    public String getVersion(){
-        return version;
-    }
-
-    /**
-     * Get the timestamp in millis from the current epoch. it is expected that the timestamp and the version are unique to
-     * identify a changeset.
-     * @return the timestamp, when this changeset was created.
-     */
-    @Override
-    public long getTimestamp(){
-        return timestamp;
-    }
-
-    /**
-     * Get the changes recorded.
-     * @return the recorded changes, never null.
-     */
-    public Collection<PropertyChangeEvent> getChanges(){
-        return Collections.unmodifiableCollection(this.changes.values());
-    }
-
-    /**
-     * Access the number current removed entries.
-     * @return the number current removed entries.
-     */
-    public int getRemovedSize() {
-        int removedCount = 0;
-        for(PropertyChangeEvent ev:this.changes.values()){
-            if(ev.getNewValue() == null){
-                removedCount++;
-            }
-        }
-        return removedCount;
-    }
-
-    /**
-     * Access the number current added entries.
-     * @return the number current added entries.
-     */
-    public int getAddedSize() {
-        int addedCount = 0;
-        for(PropertyChangeEvent ev:this.changes.values()){
-            if(ev.getOldValue() == null &&
-                    ev.getNewValue() != null){
-                addedCount++;
-            }
-        }
-        return addedCount;
-    }
-
-    /**
-     * Access the number current updated entries.
-     * @return the number current updated entries.
-     */
-    public int getUpdatedSize() {
-        int updatedCount = 0;
-        for(PropertyChangeEvent ev:this.changes.values()){
-            if( ev.getOldValue()!=null && ev.getNewValue()!=null){
-                updatedCount++;
-            }
-        }
-        return updatedCount;
-    }
-
-
-    /**
-     * Checks if the given key was removed.
-     * @param key the target key, not null.
-     * @return true, if the given key was removed.
-     */
-    public boolean isRemoved(String key) {
-        PropertyChangeEvent change = this.changes.get(key);
-        return change != null && change.getNewValue() == null;
-    }
-
-    /**
-     * Checks if the given key was added.
-     * @param key the target key, not null.
-     * @return true, if the given key was added.
-     */
-    public boolean isAdded(String key) {
-        PropertyChangeEvent change = this.changes.get(key);
-        return change != null && change.getOldValue() == null;
-    }
-
-    /**
-     * Checks if the given key was updated.
-     * @param key the target key, not null.
-     * @return true, if the given key was updated.
-     */
-    public boolean isUpdated(String key) {
-        PropertyChangeEvent change = this.changes.get(key);
-        return change != null && change.getOldValue() != null && change.getNewValue() != null;
-    }
-
-    /**
-     * Checks if the given key is added, or updated AND NOT removed.
-     * @param key the target key, not null.
-     * @return true, if the given key was added, or updated BUT NOT removed.
-     */
-    public boolean isKeyAffected(String key) {
-        PropertyChangeEvent change = this.changes.get(key);
-        return change != null && change.getNewValue() != null;
-    }
-
-    /**
-     * CHecks if the current change set does not contain any changes.
-     * @return tru, if the change set is empty.
-     */
-    public boolean isEmpty(){
-        return this.changes.isEmpty();
-    }
-
-
-    @Override
-    public String toString() {
-        return "ConfigurationChange{" +
-                "configuration=" + configuration +
-                ", version='" + version + '\'' +
-                ", timestamp=" + timestamp +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java
deleted file mode 100644
index 1fd228a..0000000
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationChangeBuilder.java
+++ /dev/null
@@ -1,274 +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.events;
-
-import org.apache.tamaya.Configuration;
-import org.apache.tamaya.ConfigurationProvider;
-
-import java.beans.PropertyChangeEvent;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-/**
- * Models a set current changes applied to a {@link org.apache.tamaya.spi.PropertySource}. Consumers of these events
- * can observing changes to property sources and
- * <ol>
- * <li>Check if their current configuration instance ({@link org.apache.tamaya.spi.ConfigurationContext}
- * contains the changed {@link org.apache.tamaya.spi.PropertySource} (Note: the reference tova property source is never affected by a
- * change, its only the data of the property source).</li>
- * <li>If so corresponding action may be taken, such as reevaluating the configuration values (depending on
- * the update policy) or reevaluating the complete {@link org.apache.tamaya.Configuration} to create a change
- * event on configuration level.
- * </ol>
- */
-public final class ConfigurationChangeBuilder {
-    /**
-     * The recorded changes.
-     */
-    final SortedMap<String, PropertyChangeEvent> delta = new TreeMap<>();
-    /**
-     * The underlying configuration/provider.
-     */
-    final Configuration source;
-    /**
-     * The version configured, or null, for generating a default.
-     */
-    String version;
-    /**
-     * The optional timestamp in millis of this epoch.
-     */
-    Long timestamp;
-
-    /**
-     * Constructor.
-     *
-     * @param configuration the underlying configuration, not null.
-     */
-    private ConfigurationChangeBuilder(Configuration configuration) {
-        this.source = Objects.requireNonNull(configuration);
-    }
-
-    /**
-     * Creates a new instance current this builder using the current COnfiguration as root resource.
-     *
-     * @return the builder for chaining.
-     */
-    public static ConfigurationChangeBuilder of() {
-        return new ConfigurationChangeBuilder(ConfigurationProvider.getConfiguration());
-    }
-
-    /**
-     * Creates a new instance current this builder.
-     *
-     * @param configuration the configuration changed, not null.
-     * @return the builder for chaining.
-     */
-    public static ConfigurationChangeBuilder of(Configuration configuration) {
-        return new ConfigurationChangeBuilder(configuration);
-    }
-
-    /**
-     * Compares the two property config/configurations and creates a collection current all changes
-     * that must be appied to render {@code map1} into {@code map2}.
-     *
-     * @param map1 the source map, not null.
-     * @param map2 the target map, not null.
-     * @return a collection current change events, never null.
-     */
-    public static Collection<PropertyChangeEvent> compare(Configuration map1, Configuration map2) {
-        List<PropertyChangeEvent> changes = new ArrayList<>();
-        for (Map.Entry<String, String> en : map1.getProperties().entrySet()) {
-            String val = map2.get(en.getKey());
-            if (val == null) {
-                changes.add(new PropertyChangeEvent(map1, en.getKey(), null, en.getValue()));
-            } else if (!val.equals(en.getValue())) {
-                changes.add(new PropertyChangeEvent(map1, en.getKey(), val, en.getValue()));
-            }
-        }
-        for (Map.Entry<String, String> en : map2.getProperties().entrySet()) {
-            String val = map1.get(en.getKey());
-            if (val == null) {
-                changes.add(new PropertyChangeEvent(map1, en.getKey(), null, en.getValue()));
-            } else if (!val.equals(en.getValue())) {
-                changes.add(new PropertyChangeEvent(map1, en.getKey(), val, en.getValue()));
-            }
-        }
-        return changes;
-    }
-
-    /*
-     * Apply a version/UUID to the set being built.
-     * @param version the version to apply, or null, to let the system generate a version for you.
-     * @return the builder for chaining.
-     */
-    public ConfigurationChangeBuilder setVersion(String version) {
-        this.version = version;
-        return this;
-    }
-
-    /*
-     * Apply given timestamp to the set being built.
-     * @param version the version to apply, or null, to let the system generate a version for you.
-     * @return the builder for chaining.
-     */
-    public ConfigurationChangeBuilder setTimestamp(long timestamp) {
-        this.timestamp = timestamp;
-        return this;
-    }
-
-    /**
-     * This method records all changes to be applied to the base property provider/configuration to
-     * achieve the given target state.
-     *
-     * @param newState the new target state, not null.
-     * @return the builder for chaining.
-     */
-    public ConfigurationChangeBuilder addChanges(Configuration newState) {
-        for (PropertyChangeEvent c : compare(newState, this.source)) {
-            this.delta.put(c.getPropertyName(), c);
-        }
-        return this;
-    }
-
-    /**
-     * Applies a single key/value change.
-     *
-     * @param key   the changed key
-     * @param value the new value.
-     * @return this instance for chining.
-     */
-    public ConfigurationChangeBuilder addChange(String key, String value) {
-        this.delta.put(key, new PropertyChangeEvent(this.source, key, this.source.get(key), value));
-        return this;
-    }
-
-    /**
-     * Get the current values, also considering any changes recorded within this change set.
-     *
-     * @param key the key current the entry, not null.
-     * @return the keys, or null.
-     */
-    public String get(String key) {
-        PropertyChangeEvent change = this.delta.get(key);
-        if (change != null && !(change.getNewValue() == null)) {
-            return (String) change.getNewValue();
-        }
-        return null;
-    }
-
-    /**
-     * Marks the given key(s) fromMap the configuration/properties to be removed.
-     *
-     * @param key       the key current the entry, not null.
-     * @param otherKeys additional keys to be removed (convenience), not null.
-     * @return the builder for chaining.
-     */
-    public ConfigurationChangeBuilder removeKey(String key, String... otherKeys) {
-        String oldValue = this.source.get(key);
-        if (oldValue == null) {
-            this.delta.remove(key);
-        }
-        this.delta.put(key, new PropertyChangeEvent(this.source, key, oldValue, null));
-        for (String addKey : otherKeys) {
-            oldValue = this.source.get(addKey);
-            if (oldValue == null) {
-                this.delta.remove(addKey);
-            }
-            this.delta.put(addKey, new PropertyChangeEvent(this.source, addKey, oldValue, null));
-        }
-        return this;
-    }
-
-    /**
-     * Apply all the given values to the base configuration/properties.
-     * Note that all values passed must be convertible to String, either
-     * <ul>
-     * <li>the registered codecs provider provides codecs for the corresponding keys, or </li>
-     * <li>default codecs are present for the given type, or</li>
-     * <li>the value is an instanceof String</li>
-     * </ul>
-     *
-     * @param changes the changes to be applied, not null.
-     * @return the builder for chaining.
-     */
-    public ConfigurationChangeBuilder putAll(Map<String, String> changes) {
-        for (Map.Entry<String, String> en : changes.entrySet()) {
-            this.delta.put(en.getKey(), new PropertyChangeEvent(this.source, en.getKey(), null, en.getValue()));
-        }
-        return this;
-    }
-
-    /**
-     * This method will create a change set that clears all entries fromMap the given base configuration/properties.
-     *
-     * @return the builder for chaining.
-     */
-    public ConfigurationChangeBuilder removeAllKeys() {
-        this.delta.clear();
-        for (Map.Entry<String, String> en : this.source.getProperties().entrySet()) {
-            this.delta.put(en.getKey(), new PropertyChangeEvent(this.source, en.getKey(), en.getValue(), null));
-        }
-//        this.source.getProperties().forEach((k, v) ->
-//                this.delta.put(k, new PropertyChangeEvent(this.source, k, v, null)));
-        return this;
-    }
-
-    /**
-     * Checks if the change set is empty, i.e. does not contain any changes.
-     *
-     * @return true, if the set is empty.
-     */
-    public boolean isEmpty() {
-        return this.delta.isEmpty();
-    }
-
-    /**
-     * Resets this change set instance. This will clear all changes done to this builder, so the
-     * set will be empty.
-     */
-    public void reset() {
-        this.delta.clear();
-    }
-
-    /**
-     * Builds the corresponding change set.
-     *
-     * @return the new change set, never null.
-     */
-    public ConfigurationChange build() {
-        return new ConfigurationChange(this);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return "ConfigurationChangeSetBuilder [config=" + source + ", " +
-                ", delta=" + delta + "]";
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
deleted file mode 100644
index 4e12d42..0000000
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
+++ /dev/null
@@ -1,210 +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.events;
-
-import org.apache.tamaya.spi.ConfigurationContext;
-import org.apache.tamaya.spi.PropertySource;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-
-/**
- * Event that contains a set of current changes that were applied or can be applied.
- * This class is immutable and thread-safe. To create instances use
- * {@link PropertySourceChangeBuilder}.
- *
- * Created by Anatole on 22.10.2014.
- */
-public final class ConfigurationContextChange implements ConfigEvent<ConfigurationContext>, Serializable{
-
-    private static final long serialVersionUID = 1L;
-    /** The base property provider/configuration. */
-    private final List<PropertySourceChange> changedPropertySources = new ArrayList<>();
-    /** The base version, usable for optimistic locking. */
-    private String version = UUID.randomUUID().toString();
-    /** The timestamp of the change set in millis from the epoch. */
-    private long timestamp = System.currentTimeMillis();
-    /** The configuration context. */
-    private final ConfigurationContext configurationContext;
-
-    /**
-     * Get an empty change set for the given provider.
-     * 
-     * @param configurationContext context to use for creating changesets.
-     * @return an empty ConfigurationContextChange instance.
-     */
-    public static ConfigurationContextChange emptyChangeSet(ConfigurationContext configurationContext){
-        return ConfigurationContextChangeBuilder.of(configurationContext).build();
-    }
-
-    /**
-     * Constructor used by {@link PropertySourceChangeBuilder}.
-     * @param builder The builder used, not null.
-     */
-    ConfigurationContextChange(ConfigurationContextChangeBuilder builder) {
-        this.changedPropertySources.addAll(builder.changedPropertySources);
-        if(builder.version!=null){
-            this.version = builder.version;
-        }
-        if(builder.timestamp!=null){
-            this.timestamp = builder.timestamp;
-        }
-        this.configurationContext = builder.configurationContext;
-    }
-
-    @Override
-    public Class<ConfigurationContext> getResourceType() {
-        return ConfigurationContext.class;
-    }
-
-    @Override
-    public ConfigurationContext getResource() {
-        return configurationContext;
-    }
-
-    /**
-     * Get the base version, usable for optimistic locking.
-     * @return the base version.
-     */
-    @Override
-    public String getVersion(){
-        return version;
-    }
-
-    /**
-     * Get the timestamp in millis from the current epoch. it is expected that the timestamp and the version are unique to
-     * identify a changeset.
-     * @return the timestamp, when this changeset was created.
-     */
-    @Override
-    public long getTimestamp(){
-        return timestamp;
-    }
-
-    /**
-     * Get the changes recorded.
-     * @return the recorded changes, never null.
-     */
-    public Collection<PropertySourceChange> getPropertySourceChanges(){
-        return Collections.unmodifiableCollection(this.changedPropertySources);
-    }
-
-    /**
-     * Get the property source updates.
-     * @return the recorded changes, never null.
-     */
-    public Collection<PropertySourceChange> getPropertySourceUpdates(){
-        List<PropertySourceChange> result = new ArrayList<>();
-        for (PropertySourceChange pc : this.changedPropertySources) {
-            if (pc.getChangeType() == ChangeType.UPDATED) {
-                result.add(pc);
-            }
-        }
-        return result;
-//        return Collections.unmodifiableCollection(this.changedPropertySources).stream()
-//                .filter(pc -> pc.getChangeType()==ChangeType.UPDATED).collect(Collectors.toList());
-    }
-
-    /**
-     * Get the property sources to be removed.
-     * @return the recorded changes, never null.
-     */
-    public Collection<PropertySource> getRemovedPropertySources(){
-        List<PropertySource> result = new ArrayList<>();
-        for (PropertySourceChange pc : this.changedPropertySources) {
-            if (pc.getChangeType() == ChangeType.DELETED) {
-                result.add(pc.getResource());
-            }
-        }
-        return result;
-//        return getPropertySourceChanges().stream().filter(pc -> pc.getChangeType()==ChangeType.DELETED).
-//                map(ps -> ps.getPropertySource()).collect(Collectors.toList());
-    }
-
-    /**
-     * Get the property sources to be added.
-     * @return the recorded changes, never null.
-     */
-    public Collection<PropertySource> getAddedPropertySources(){
-        List<PropertySource> result = new ArrayList<>();
-        for (PropertySourceChange pc : this.changedPropertySources) {
-            if (pc.getChangeType() == ChangeType.NEW) {
-                result.add(pc.getResource());
-            }
-        }
-        return result;
-//        return getPropertySourceChanges().stream().filter(pc -> pc.getChangeType()==ChangeType.NEW).
-//                map(ps -> ps.getPropertySource()).collect(Collectors.toList());
-    }
-
-    /**
-     * Get the property sources to be updated.
-     * @return the recorded changes, never null.
-     */
-    public Collection<PropertySource> getUpdatedPropertySources(){
-        List<PropertySource> result = new ArrayList<>();
-        for (PropertySourceChange pc : this.changedPropertySources) {
-            if (pc.getChangeType() == ChangeType.UPDATED) {
-                result.add(pc.getResource());
-            }
-        }
-        return result;
-//        return getPropertySourceChanges().stream().filter(pc -> pc.getChangeType()==ChangeType.UPDATED).
-//                map(ps -> ps.getPropertySource()).collect(Collectors.toList());
-    }
-
-    /**
-     * Checks if the given propertySource is affected (added, changed or removed).
-     * @param propertySource the propertySource, not null.
-     * @return true, if the given propertySource ia affected.
-     */
-    public boolean isAffected(PropertySource propertySource) {
-        for (PropertySourceChange ps : this.changedPropertySources) {
-            if (ps.getResource() == propertySource ||
-                    ps.getResource().getName().equals(propertySource.getName())) {
-                return true;
-            }
-        }
-        return false;
-//        return this.changedPropertySources.stream().filter(ps ->  ps.getPropertySource()==propertySource ||
-//                ps.getPropertySource().getName().equals(propertySource.getName())).findAny().isPresent();
-    }
-
-    /**
-     * CHecks if the current change set does not contain any changes.
-     * @return tru, if the change set is empty.
-     */
-    public boolean isEmpty(){
-        return this.changedPropertySources.isEmpty();
-    }
-
-
-    @Override
-    public String toString() {
-        return "ConfigurationContextChange{" +
-                "changedPropertySources=" + changedPropertySources +
-                ", version='" + version + '\'' +
-                ", timestamp=" + timestamp +
-                '}';
-    }
-}


Mime
View raw message